Skip to content

Commit

Permalink
Update Inovelli Blue Series switch support in ZHA (home-assistant#86711)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey authored Jan 26, 2023
1 parent 2e70de9 commit 6e285c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ class InovelliConfigEntityChannel(ZigbeeChannel):
"switch_type": False,
"button_delay": False,
"smart_bulb_mode": False,
"double_tap_up_for_full_brightness": True,
"double_tap_up_for_max_brightness": True,
"double_tap_down_for_min_brightness": True,
"led_color_when_on": True,
"led_color_when_off": True,
"led_intensity_when_on": True,
Expand Down
16 changes: 14 additions & 2 deletions homeassistant/components/zha/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,26 @@ class InovelliSmartBulbMode(ZHASwitchConfigurationEntity, id_suffix="smart_bulb_
channel_names=CHANNEL_INOVELLI,
)
class InovelliDoubleTapForFullBrightness(
ZHASwitchConfigurationEntity, id_suffix="double_tap_up_for_full_brightness"
ZHASwitchConfigurationEntity, id_suffix="double_tap_up_for_max_brightness"
):
"""Inovelli double tap for full brightness control."""

_zcl_attribute: str = "double_tap_up_for_full_brightness"
_zcl_attribute: str = "double_tap_up_for_max_brightness"
_attr_name: str = "Double tap full brightness"


@CONFIG_DIAGNOSTIC_MATCH(
channel_names=CHANNEL_INOVELLI,
)
class InovelliDoubleTapForMinBrightness(
ZHASwitchConfigurationEntity, id_suffix="double_tap_down_for_min_brightness"
):
"""Inovelli double tap down for minimum brightness control."""

_zcl_attribute: str = "double_tap_down_for_min_brightness"
_attr_name: str = "Double tap minimum brightness"


@CONFIG_DIAGNOSTIC_MATCH(
channel_names=CHANNEL_INOVELLI,
)
Expand Down

0 comments on commit 6e285c8

Please sign in to comment.