mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Make tplink SmartStrip communication more robust (#40281)
This commit is contained in:
parent
052e8f0983
commit
94dfb66824
@ -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…
x
Reference in New Issue
Block a user