mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix Shelly button type in roller mode (#57429)
This commit is contained in:
parent
ee80ccf7a6
commit
6820faf5a0
@ -133,6 +133,10 @@ def is_block_momentary_input(settings: dict[str, Any], block: Block) -> bool:
|
|||||||
if settings["device"]["type"] in SHBTN_MODELS:
|
if settings["device"]["type"] in SHBTN_MODELS:
|
||||||
return True
|
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")
|
button = settings.get("relays") or settings.get("lights") or settings.get("inputs")
|
||||||
if button is None:
|
if button is None:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user