From 157d6dc83f5c45d0ca050e53c373e0f714f52226 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 9 Jul 2022 16:45:49 -0500 Subject: [PATCH] Add missing Start Dimmer mapping for bond buttons (#74555) --- homeassistant/components/bond/button.py | 7 +++++++ tests/components/bond/test_button.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/homeassistant/components/bond/button.py b/homeassistant/components/bond/button.py index 9a82309e347..6f57a23b079 100644 --- a/homeassistant/components/bond/button.py +++ b/homeassistant/components/bond/button.py @@ -88,6 +88,13 @@ BUTTONS: tuple[BondButtonEntityDescription, ...] = ( mutually_exclusive=Action.TURN_DOWN_LIGHT_ON, argument=None, ), + BondButtonEntityDescription( + key=Action.START_DIMMER, + name="Start Dimmer", + icon="mdi:brightness-percent", + mutually_exclusive=Action.SET_BRIGHTNESS, + argument=None, + ), BondButtonEntityDescription( key=Action.START_UP_LIGHT_DIMMER, name="Start Up Light Dimmer", diff --git a/tests/components/bond/test_button.py b/tests/components/bond/test_button.py index 4411b25657b..24ea4730d6c 100644 --- a/tests/components/bond/test_button.py +++ b/tests/components/bond/test_button.py @@ -30,6 +30,7 @@ def light_brightness_increase_decrease_only(name: str): "actions": [ Action.TURN_LIGHT_ON, Action.TURN_LIGHT_OFF, + Action.START_DIMMER, Action.START_INCREASING_BRIGHTNESS, Action.START_DECREASING_BRIGHTNESS, Action.STOP, @@ -75,6 +76,8 @@ async def test_entity_registry(hass: core.HomeAssistant): assert entity.unique_id == "test-hub-id_test-device-id_startincreasingbrightness" entity = registry.entities["button.name_1_start_decreasing_brightness"] assert entity.unique_id == "test-hub-id_test-device-id_startdecreasingbrightness" + entity = registry.entities["button.name_1_start_dimmer"] + assert entity.unique_id == "test-hub-id_test-device-id_startdimmer" async def test_mutually_exclusive_actions(hass: core.HomeAssistant):