Improve lists in integrations [N-O] (#113231)

This commit is contained in:
Joost Lekkerkerker 2024-03-13 21:51:38 +01:00 committed by GitHub
parent 595d07f1c6
commit e6a692f354
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 254 additions and 310 deletions

View file

@ -30,10 +30,8 @@ async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Neato sensor using config entry."""
dev = []
neato: NeatoHub = hass.data[NEATO_LOGIN]
for robot in hass.data[NEATO_ROBOTS]:
dev.append(NeatoSensor(neato, robot))
dev = [NeatoSensor(neato, robot) for robot in hass.data[NEATO_ROBOTS]]
if not dev:
return