mirror of
https://github.com/home-assistant/core.git
synced 2025-08-17 19:41:45 +02:00
Make tplink SmartStrip communication more robust (#40281)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user