Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,213 changes: 1,171 additions & 42 deletions tests/data/devices/inovelli-vzm30-sn-0x01100100.json

Large diffs are not rendered by default.

814 changes: 753 additions & 61 deletions tests/data/devices/inovelli-vzm30-sn.json

Large diffs are not rendered by default.

418 changes: 319 additions & 99 deletions tests/data/devices/inovelli-vzm31-sn-0x01020212.json

Large diffs are not rendered by default.

2,427 changes: 2,427 additions & 0 deletions tests/data/devices/inovelli-vzm32-sn-0x0103000a.json

Large diffs are not rendered by default.

254 changes: 143 additions & 111 deletions tests/data/devices/inovelli-vzm35-sn-0x02020107.json

Large diffs are not rendered by default.

2,025 changes: 2,025 additions & 0 deletions tests/data/devices/inovelli-vzm36.json

Large diffs are not rendered by default.

416 changes: 0 additions & 416 deletions zha/application/platforms/number/__init__.py

Large diffs are not rendered by default.

170 changes: 0 additions & 170 deletions zha/application/platforms/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
register_entity,
)
from zha.application.platforms.const import (
INOVELLI_CLUSTER,
SINOPE_MANUFACTURER_CLUSTER,
TUYA_MANUFACTURER_CLUSTER,
)
Expand Down Expand Up @@ -701,175 +700,6 @@ class AqaraT2RelayDecoupledMode(ZCLEnumSelectEntity):
)


class InovelliOutputMode(types.enum1):
"""Inovelli output mode."""

Dimmer = 0x00
OnOff = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliOutputModeEntity(ZCLEnumSelectEntity):
"""Inovelli output mode control."""

_unique_id_suffix = "output_mode"
_attribute_name = "output_mode"
_enum = InovelliOutputMode
_attr_translation_key: str = "output_mode"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
)


class InovelliSwitchType(types.enum8):
"""Inovelli switch mode."""

Single_Pole = 0x00
Three_Way_Dumb = 0x01
Three_Way_AUX = 0x02
Single_Pole_Full_Sine = 0x03


@register_entity(INOVELLI_CLUSTER)
class InovelliSwitchTypeEntity(ZCLEnumSelectEntity):
"""Inovelli switch type control."""

_unique_id_suffix = "switch_type"
_attribute_name = "switch_type"
_enum = InovelliSwitchType
_attr_translation_key: str = "switch_type"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
models=frozenset({"VZM31-SN"}),
)


class InovelliFanSwitchType(types.enum1):
"""Inovelli fan switch mode."""

Load_Only = 0x00
Three_Way_AUX = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliFanSwitchTypeEntity(ZCLEnumSelectEntity):
"""Inovelli fan switch type control."""

_unique_id_suffix = "switch_type"
_attribute_name = "switch_type"
_enum = InovelliFanSwitchType
_attr_translation_key: str = "switch_type"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
models=frozenset({"VZM35-SN"}),
)


class InovelliLedScalingMode(types.enum1):
"""Inovelli led mode."""

VZM31SN = 0x00
LZW31SN = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliLedScalingModeEntity(ZCLEnumSelectEntity):
"""Inovelli led mode control."""

_unique_id_suffix = "led_scaling_mode"
_attribute_name = "led_scaling_mode"
_enum = InovelliLedScalingMode
_attr_translation_key: str = "led_scaling_mode"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
)


class InovelliFanLedScalingMode(types.enum8):
"""Inovelli fan led mode."""

VZM31SN = 0x00
Grade_1 = 0x01
Grade_2 = 0x02
Grade_3 = 0x03
Grade_4 = 0x04
Grade_5 = 0x05
Grade_6 = 0x06
Grade_7 = 0x07
Grade_8 = 0x08
Grade_9 = 0x09
Adaptive = 0x0A


@register_entity(INOVELLI_CLUSTER)
class InovelliFanLedScalingModeEntity(ZCLEnumSelectEntity):
"""Inovelli fan switch led mode control."""

_unique_id_suffix = "smart_fan_led_display_levels"
_attribute_name = "smart_fan_led_display_levels"
_enum = InovelliFanLedScalingMode
_attr_translation_key: str = "smart_fan_led_display_levels"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
models=frozenset({"VZM35-SN"}),
)


class InovelliNonNeutralOutput(types.enum1):
"""Inovelli non neutral output selection."""

Low = 0x00
High = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliNonNeutralOutputEntity(ZCLEnumSelectEntity):
"""Inovelli non neutral output control."""

_unique_id_suffix = "increased_non_neutral_output"
_attribute_name = "increased_non_neutral_output"
_enum = InovelliNonNeutralOutput
_attr_translation_key: str = "increased_non_neutral_output"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
)


class InovelliDimmingMode(types.enum1):
"""Inovelli dimming mode selection."""

LeadingEdge = 0x00
TrailingEdge = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliDimmingModeEntity(ZCLEnumSelectEntity):
"""Inovelli dimming mode control."""

_unique_id_suffix = "leading_or_trailing_edge"
_attribute_name = "leading_or_trailing_edge"
_enum = InovelliDimmingMode
_attr_translation_key: str = "leading_or_trailing_edge"
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
models=frozenset({"VZM31-SN", "VZM36"}),
)


class AqaraFeedingMode(types.enum8):
"""Feeding mode."""

Expand Down
41 changes: 0 additions & 41 deletions zha/application/platforms/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
from zha.application.platforms.climate.const import HVACAction
from zha.application.platforms.const import (
IKEA_AIR_PURIFIER_CLUSTER,
INOVELLI_CLUSTER,
SMARTTHINGS_HUMIDITY_CLUSTER,
SONOFF_CLUSTER,
TUYA_MANUFACTURER_CLUSTER,
Expand Down Expand Up @@ -2703,46 +2702,6 @@ class DeviceTemperature(Sensor):
}


@register_entity(INOVELLI_CLUSTER)
class InovelliInternalTemperature(Sensor):
"""Switch Internal Temperature Sensor."""

_attribute_name = "internal_temp_monitor"
_attr_device_class: SensorDeviceClass = SensorDeviceClass.TEMPERATURE
_attr_state_class: SensorStateClass = SensorStateClass.MEASUREMENT
_attr_translation_key: str = "internal_temp_monitor"
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
_attr_entity_category = EntityCategory.DIAGNOSTIC
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
)


class InovelliOverheatedState(types.enum8):
"""Inovelli overheat protection state."""

Normal = 0x00
Overheated = 0x01


@register_entity(INOVELLI_CLUSTER)
class InovelliOverheated(EnumSensor):
"""Sensor that displays the overheat protection state."""

_attribute_name = "overheated"
_unique_id_suffix = "overheated"
_attr_translation_key: str = "overheated"
_enum = InovelliOverheatedState
_attr_entity_category = EntityCategory.DIAGNOSTIC
_cluster_id = INOVELLI_CLUSTER

_cluster_match = ClusterMatch(
server_clusters=frozenset({INOVELLI_CLUSTER}),
)


@register_entity(CarbonDioxideConcentrationCluster.cluster_id)
class CarbonDioxideConcentration(Sensor):
"""Carbon Dioxide Concentration sensor."""
Expand Down
Loading
Loading