From 6820faf5a0e38b817c10b1c70ff8b9d8cac35954 Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Sun, 10 Oct 2021 22:39:57 +0300 Subject: [PATCH] Fix Shelly button type in roller mode (#57429) --- homeassistant/components/shelly/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/shelly/utils.py b/homeassistant/components/shelly/utils.py index 6f24b4a64be..783153e2746 100644 --- a/homeassistant/components/shelly/utils.py +++ b/homeassistant/components/shelly/utils.py @@ -133,6 +133,10 @@ def is_block_momentary_input(settings: dict[str, Any], block: Block) -> bool: if settings["device"]["type"] in SHBTN_MODELS: return True + if settings.get("mode") == "roller": + button_type = settings["rollers"][0]["button_type"] + return button_type in ["momentary", "momentary_on_release"] + button = settings.get("relays") or settings.get("lights") or settings.get("inputs") if button is None: return False