Improve lists in integrations [L-M] (#113227)

* Improve lists in integrations [L-M]

* Update homeassistant/components/mailbox/__init__.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Fix

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
This commit is contained in:
Joost Lekkerkerker 2024-03-13 21:28:21 +01:00 committed by GitHub
parent 4547131bbc
commit 595d07f1c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 200 additions and 232 deletions

View file

@ -35,13 +35,12 @@ async def async_setup_entry(
device_types = CONST.TYPE_OPENING + CONST.TYPE_SENSOR
sensors = []
partial_func = partial(data.get_devices, generic_type=device_types)
devices = await hass.async_add_executor_job(partial_func)
for device in devices:
sensors.append(LupusecBinarySensor(device, config_entry.entry_id))
async_add_entities(sensors)
async_add_entities(
LupusecBinarySensor(device, config_entry.entry_id) for device in devices
)
class LupusecBinarySensor(LupusecBaseSensor, BinarySensorEntity):