mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 10:08:23 +00:00
fix: get_devices only checks for the first type (#103583)
This commit is contained in:
parent
70f0ee81c9
commit
f9c70fd3c8
@ -28,9 +28,10 @@ def setup_platform(
|
|||||||
|
|
||||||
data = hass.data[LUPUSEC_DOMAIN]
|
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))
|
devices.append(LupusecSwitch(data, device))
|
||||||
|
|
||||||
add_entities(devices)
|
add_entities(devices)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user