Make tplink SmartStrip communication more robust (#40281)
This commit is contained in:
parent
052e8f0983
commit
94dfb66824
1 changed files with 8 additions and 1 deletions
|
@ -119,7 +119,14 @@ def get_static_devices(config_data) -> SmartDevices:
|
|||
elif type_ == CONF_SWITCH:
|
||||
switches.append(SmartPlug(host))
|
||||
elif type_ == CONF_STRIP:
|
||||
for plug in SmartStrip(host).plugs.values():
|
||||
try:
|
||||
ss_host = SmartStrip(host)
|
||||
except SmartDeviceException as sde:
|
||||
_LOGGER.error(
|
||||
"Failed to setup SmartStrip at %s: %s; not retrying", host, sde
|
||||
)
|
||||
continue
|
||||
for plug in ss_host.plugs.values():
|
||||
switches.append(plug)
|
||||
# Dimmers need to be defined as smart plugs to work correctly.
|
||||
elif type_ == CONF_DIMMER:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue