forked from home-assistant/core
fix: get_devices only checks for the first type (#103583)
This commit is contained in:
committed by
Franck Nijhof
parent
70f0ee81c9
commit
f9c70fd3c8
@@ -28,9 +28,10 @@ def setup_platform(
|
||||
|
||||
data = hass.data[LUPUSEC_DOMAIN]
|
||||
|
||||
devices = []
|
||||
device_types = [CONST.TYPE_SWITCH]
|
||||
|
||||
for device in data.lupusec.get_devices(generic_type=CONST.TYPE_SWITCH):
|
||||
devices = []
|
||||
for device in data.lupusec.get_devices(generic_type=device_types):
|
||||
devices.append(LupusecSwitch(data, device))
|
||||
|
||||
add_entities(devices)
|
||||
|
||||
Reference in New Issue
Block a user