Update Inovelli Blue Series switch support in ZHA (#91254)
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>pull/91305/head
parent
fd7d0fff1f
commit
4f507e7f57
|
@ -251,14 +251,20 @@ class InovelliConfigEntityChannel(ZigbeeChannel):
|
||||||
"active_energy_reports": True,
|
"active_energy_reports": True,
|
||||||
"power_type": False,
|
"power_type": False,
|
||||||
"switch_type": False,
|
"switch_type": False,
|
||||||
|
"increased_non_neutral_output": True,
|
||||||
"button_delay": False,
|
"button_delay": False,
|
||||||
"smart_bulb_mode": False,
|
"smart_bulb_mode": False,
|
||||||
"double_tap_up_for_max_brightness": True,
|
"double_tap_up_enabled": True,
|
||||||
"double_tap_down_for_min_brightness": True,
|
"double_tap_down_enabled": True,
|
||||||
|
"double_tap_up_level": True,
|
||||||
|
"double_tap_down_level": True,
|
||||||
"led_color_when_on": True,
|
"led_color_when_on": True,
|
||||||
"led_color_when_off": True,
|
"led_color_when_off": True,
|
||||||
"led_intensity_when_on": True,
|
"led_intensity_when_on": True,
|
||||||
"led_intensity_when_off": True,
|
"led_intensity_when_off": True,
|
||||||
|
"led_scaling_mode": True,
|
||||||
|
"aux_switch_scenes": True,
|
||||||
|
"binding_off_to_on_sync_level": True,
|
||||||
"local_protection": False,
|
"local_protection": False,
|
||||||
"output_mode": False,
|
"output_mode": False,
|
||||||
"on_off_led_mode": True,
|
"on_off_led_mode": True,
|
||||||
|
|
|
@ -835,6 +835,34 @@ class InovelliDefaultAllLEDOffIntensity(
|
||||||
_attr_name: str = "Default all LED off intensity"
|
_attr_name: str = "Default all LED off intensity"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(channel_names=CHANNEL_INOVELLI)
|
||||||
|
class InovelliDoubleTapUpLevel(
|
||||||
|
ZHANumberConfigurationEntity, id_suffix="double_tap_up_level"
|
||||||
|
):
|
||||||
|
"""Inovelli double tap up level configuration entity."""
|
||||||
|
|
||||||
|
_attr_entity_category = EntityCategory.CONFIG
|
||||||
|
_attr_icon: str = ICONS[16]
|
||||||
|
_attr_native_min_value: float = 2
|
||||||
|
_attr_native_max_value: float = 254
|
||||||
|
_zcl_attribute: str = "double_tap_up_level"
|
||||||
|
_attr_name: str = "Double tap up level"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(channel_names=CHANNEL_INOVELLI)
|
||||||
|
class InovelliDoubleTapDownLevel(
|
||||||
|
ZHANumberConfigurationEntity, id_suffix="double_tap_down_level"
|
||||||
|
):
|
||||||
|
"""Inovelli double tap down level configuration entity."""
|
||||||
|
|
||||||
|
_attr_entity_category = EntityCategory.CONFIG
|
||||||
|
_attr_icon: str = ICONS[16]
|
||||||
|
_attr_native_min_value: float = 0
|
||||||
|
_attr_native_max_value: float = 254
|
||||||
|
_zcl_attribute: str = "double_tap_down_level"
|
||||||
|
_attr_name: str = "Double tap down level"
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(channel_names="opple_cluster", models={"aqara.feeder.acn001"})
|
@CONFIG_DIAGNOSTIC_MATCH(channel_names="opple_cluster", models={"aqara.feeder.acn001"})
|
||||||
class AqaraPetFeederServingSize(ZHANumberConfigurationEntity, id_suffix="serving_size"):
|
class AqaraPetFeederServingSize(ZHANumberConfigurationEntity, id_suffix="serving_size"):
|
||||||
"""Aqara pet feeder serving size configuration entity."""
|
"""Aqara pet feeder serving size configuration entity."""
|
||||||
|
|
|
@ -472,9 +472,10 @@ class InovelliOutputModeEntity(ZCLEnumSelectEntity, id_suffix="output_mode"):
|
||||||
class InovelliSwitchType(types.enum8):
|
class InovelliSwitchType(types.enum8):
|
||||||
"""Inovelli output mode."""
|
"""Inovelli output mode."""
|
||||||
|
|
||||||
Load_Only = 0x00
|
Single_Pole = 0x00
|
||||||
Three_Way_Dumb = 0x01
|
Three_Way_Dumb = 0x01
|
||||||
Three_Way_AUX = 0x02
|
Three_Way_AUX = 0x02
|
||||||
|
Single_Pole_Full_Sine = 0x03
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
@ -488,6 +489,44 @@ class InovelliSwitchTypeEntity(ZCLEnumSelectEntity, id_suffix="switch_type"):
|
||||||
_attr_name: str = "Switch type"
|
_attr_name: str = "Switch type"
|
||||||
|
|
||||||
|
|
||||||
|
class InovelliLedScalingMode(types.enum1):
|
||||||
|
"""Inovelli led mode."""
|
||||||
|
|
||||||
|
VZM31SN = 0x00
|
||||||
|
LZW31SN = 0x01
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names=CHANNEL_INOVELLI,
|
||||||
|
)
|
||||||
|
class InovelliLedScalingModeEntity(ZCLEnumSelectEntity, id_suffix="led_scaling_mode"):
|
||||||
|
"""Inovelli led mode control."""
|
||||||
|
|
||||||
|
_select_attr = "led_scaling_mode"
|
||||||
|
_enum = InovelliLedScalingMode
|
||||||
|
_attr_name: str = "Led scaling mode"
|
||||||
|
|
||||||
|
|
||||||
|
class InovelliNonNeutralOutput(types.enum1):
|
||||||
|
"""Inovelli non neutral output selection."""
|
||||||
|
|
||||||
|
Low = 0x00
|
||||||
|
High = 0x01
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names=CHANNEL_INOVELLI,
|
||||||
|
)
|
||||||
|
class InovelliNonNeutralOutputEntity(
|
||||||
|
ZCLEnumSelectEntity, id_suffix="increased_non_neutral_output"
|
||||||
|
):
|
||||||
|
"""Inovelli non neutral output control."""
|
||||||
|
|
||||||
|
_select_attr = "increased_non_neutral_output"
|
||||||
|
_enum = InovelliNonNeutralOutput
|
||||||
|
_attr_name: str = "Non neutral output"
|
||||||
|
|
||||||
|
|
||||||
class AqaraFeedingMode(types.enum8):
|
class AqaraFeedingMode(types.enum8):
|
||||||
"""Feeding mode."""
|
"""Feeding mode."""
|
||||||
|
|
||||||
|
|
|
@ -367,25 +367,49 @@ class InovelliSmartBulbMode(ZHASwitchConfigurationEntity, id_suffix="smart_bulb_
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
channel_names=CHANNEL_INOVELLI,
|
channel_names=CHANNEL_INOVELLI,
|
||||||
)
|
)
|
||||||
class InovelliDoubleTapForFullBrightness(
|
class InovelliDoubleTapUpEnabled(
|
||||||
ZHASwitchConfigurationEntity, id_suffix="double_tap_up_for_max_brightness"
|
ZHASwitchConfigurationEntity, id_suffix="double_tap_up_enabled"
|
||||||
):
|
):
|
||||||
"""Inovelli double tap for full brightness control."""
|
"""Inovelli double tap up enabled."""
|
||||||
|
|
||||||
_zcl_attribute: str = "double_tap_up_for_max_brightness"
|
_zcl_attribute: str = "double_tap_up_enabled"
|
||||||
_attr_name: str = "Double tap full brightness"
|
_attr_name: str = "Double tap up enabled"
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
channel_names=CHANNEL_INOVELLI,
|
channel_names=CHANNEL_INOVELLI,
|
||||||
)
|
)
|
||||||
class InovelliDoubleTapForMinBrightness(
|
class InovelliDoubleTapDownEnabled(
|
||||||
ZHASwitchConfigurationEntity, id_suffix="double_tap_down_for_min_brightness"
|
ZHASwitchConfigurationEntity, id_suffix="double_tap_down_enabled"
|
||||||
):
|
):
|
||||||
"""Inovelli double tap down for minimum brightness control."""
|
"""Inovelli double tap down enabled."""
|
||||||
|
|
||||||
_zcl_attribute: str = "double_tap_down_for_min_brightness"
|
_zcl_attribute: str = "double_tap_down_enabled"
|
||||||
_attr_name: str = "Double tap minimum brightness"
|
_attr_name: str = "Double tap down enabled"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names=CHANNEL_INOVELLI,
|
||||||
|
)
|
||||||
|
class InovelliAuxSwitchScenes(
|
||||||
|
ZHASwitchConfigurationEntity, id_suffix="aux_switch_scenes"
|
||||||
|
):
|
||||||
|
"""Inovelli unique aux switch scenes."""
|
||||||
|
|
||||||
|
_zcl_attribute: str = "aux_switch_scenes"
|
||||||
|
_attr_name: str = "Aux switch scenes"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names=CHANNEL_INOVELLI,
|
||||||
|
)
|
||||||
|
class InovelliBindingOffToOnSyncLevel(
|
||||||
|
ZHASwitchConfigurationEntity, id_suffix="binding_off_to_on_sync_level"
|
||||||
|
):
|
||||||
|
"""Inovelli send move to level with on/off to bound devices."""
|
||||||
|
|
||||||
|
_zcl_attribute: str = "binding_off_to_on_sync_level"
|
||||||
|
_attr_name: str = "Binding off to on sync level"
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
|
Loading…
Reference in New Issue