Improve lists in integrations [C-D] (#113072)
This commit is contained in:
parent
4d77bec681
commit
c75342bd9a
32 changed files with 276 additions and 311 deletions
|
@ -75,11 +75,11 @@ async def async_setup_entry(
|
|||
for device in location.devices:
|
||||
if device.is_online:
|
||||
device_type = device.device_type
|
||||
for sensor_type in SENSOR_TYPES:
|
||||
if device_type.get("name") in sensor_type[4]:
|
||||
sensors.append(
|
||||
CanarySensor(coordinator, sensor_type, location, device)
|
||||
)
|
||||
sensors.extend(
|
||||
CanarySensor(coordinator, sensor_type, location, device)
|
||||
for sensor_type in SENSOR_TYPES
|
||||
if device_type.get("name") in sensor_type[4]
|
||||
)
|
||||
|
||||
async_add_entities(sensors, True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue