mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
tplink - catch SmartDeviceException on is_dimmable call (#21726)
* automated commit 06/03/2019 20:49:50 * automated commit 06/03/2019 20:53:13 * automated commit 06/03/2019 20:53:48
This commit is contained in:
parent
38a93afa66
commit
9c70b00403
@ -107,10 +107,15 @@ async def async_setup_entry(hass, config_entry):
|
||||
def _fill_device_lists():
|
||||
for dev in devices.values():
|
||||
if isinstance(dev, SmartPlug):
|
||||
if dev.is_dimmable: # Dimmers act as lights
|
||||
lights.append(dev)
|
||||
else:
|
||||
switches.append(dev)
|
||||
try:
|
||||
if dev.is_dimmable: # Dimmers act as lights
|
||||
lights.append(dev)
|
||||
else:
|
||||
switches.append(dev)
|
||||
except SmartDeviceException as ex:
|
||||
_LOGGER.error("Unable to connect to device %s: %s",
|
||||
dev.host, ex)
|
||||
|
||||
elif isinstance(dev, SmartBulb):
|
||||
lights.append(dev)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user