diff --git a/homeassistant/components/shelly/const.py b/homeassistant/components/shelly/const.py index 41656bbcd6f..7aa86af1e9a 100644 --- a/homeassistant/components/shelly/const.py +++ b/homeassistant/components/shelly/const.py @@ -102,6 +102,7 @@ RPC_INPUTS_EVENTS_TYPES: Final = { "btn_up", "single_push", "double_push", + "triple_push", "long_push", } diff --git a/homeassistant/components/shelly/strings.json b/homeassistant/components/shelly/strings.json index 1f05364ca3e..62a43c5bbc0 100644 --- a/homeassistant/components/shelly/strings.json +++ b/homeassistant/components/shelly/strings.json @@ -56,6 +56,7 @@ "btn_up": "{subtype} button up", "single_push": "{subtype} single push", "double_push": "{subtype} double push", + "triple_push": "{subtype} triple push", "long_push": "{subtype} long push" } }, diff --git a/tests/components/shelly/test_device_trigger.py b/tests/components/shelly/test_device_trigger.py index 31e54545b28..aab81c9ce5e 100644 --- a/tests/components/shelly/test_device_trigger.py +++ b/tests/components/shelly/test_device_trigger.py @@ -91,7 +91,14 @@ async def test_get_triggers_rpc_device(hass, mock_rpc_device): CONF_SUBTYPE: "button1", "metadata": {}, } - for type in ["btn_down", "btn_up", "single_push", "double_push", "long_push"] + for type in [ + "btn_down", + "btn_up", + "single_push", + "double_push", + "triple_push", + "long_push", + ] ] triggers = await async_get_device_automations( diff --git a/tests/components/shelly/test_utils.py b/tests/components/shelly/test_utils.py index d3eae71e5e3..de21ab84573 100644 --- a/tests/components/shelly/test_utils.py +++ b/tests/components/shelly/test_utils.py @@ -215,11 +215,12 @@ async def test_get_rpc_input_triggers(mock_rpc_device, monkeypatch): """Test get RPC input triggers.""" monkeypatch.setattr(mock_rpc_device, "config", {"input:0": {"type": "button"}}) assert set(get_rpc_input_triggers(mock_rpc_device)) == { - ("long_push", "button1"), - ("single_push", "button1"), ("btn_down", "button1"), - ("double_push", "button1"), ("btn_up", "button1"), + ("single_push", "button1"), + ("double_push", "button1"), + ("triple_push", "button1"), + ("long_push", "button1"), } monkeypatch.setattr(mock_rpc_device, "config", {"input:0": {"type": "switch"}})