Address late fritzbox coordinator runtime device discover review comments (#104267)
replace list comprehension by generator expression
This commit is contained in:
parent
ce497dd7ed
commit
f69045fb64
7 changed files with 26 additions and 38 deletions
|
@ -75,12 +75,10 @@ async def async_setup_entry(
|
|||
if not coordinator.new_devices:
|
||||
return
|
||||
async_add_entities(
|
||||
[
|
||||
FritzboxBinarySensor(coordinator, ain, description)
|
||||
for ain in coordinator.new_devices
|
||||
for description in BINARY_SENSOR_TYPES
|
||||
if description.suitable(coordinator.data.devices[ain])
|
||||
]
|
||||
FritzboxBinarySensor(coordinator, ain, description)
|
||||
for ain in coordinator.new_devices
|
||||
for description in BINARY_SENSOR_TYPES
|
||||
if description.suitable(coordinator.data.devices[ain])
|
||||
)
|
||||
|
||||
entry.async_on_unload(coordinator.async_add_listener(_add_entities))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue