mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Guard both Shelly 2 & Shelly 2.5 in roller mode (#40086)
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
This commit is contained in:
parent
b116e58620
commit
4fbd4957bd
@ -14,7 +14,10 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
wrapper = hass.data[DOMAIN][config_entry.entry_id]
|
wrapper = hass.data[DOMAIN][config_entry.entry_id]
|
||||||
|
|
||||||
# In roller mode the relay blocks exist but do not contain required info
|
# In roller mode the relay blocks exist but do not contain required info
|
||||||
if wrapper.model == "SHSW-25" and wrapper.device.settings["mode"] != "relay":
|
if (
|
||||||
|
wrapper.model in ["SHSW-21", "SHSW-25"]
|
||||||
|
and wrapper.device.settings["mode"] != "relay"
|
||||||
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
relay_blocks = [block for block in wrapper.device.blocks if block.type == "relay"]
|
relay_blocks = [block for block in wrapper.device.blocks if block.type == "relay"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user