Fixed bug with all switch devices being excluded (#9555)

This commit is contained in:
Mister Wil 2017-09-23 23:22:15 -07:00 committed by Martin Hjelmare
parent 0d75cd484b
commit e2ce1d05ae

View file

@ -27,7 +27,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
# Get all regular switches that are not excluded or marked as lights
for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):
if data.is_excluded(device) or not data.is_light(device):
if data.is_excluded(device) or data.is_light(device):
continue
devices.append(AbodeSwitch(data, device))