fix: get_devices only checks for the first type (#103583)

This commit is contained in:
suaveolent 2023-11-07 14:46:02 +01:00 committed by GitHub
parent b636a4d5cf
commit 5b43351807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)