Skip to content

Commit

Permalink
Merge e06f3a4 into 0e36b26
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmerza committed Mar 7, 2019
2 parents 0e36b26 + e06f3a4 commit 27a7b27
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions homeassistant/components/tplink/__init__.py
Expand Up @@ -107,10 +107,15 @@ def _device_for_type(host, type_):
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:
Expand Down

0 comments on commit 27a7b27

Please sign in to comment.