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:
parent
4547131bbc
commit
595d07f1c6
34 changed files with 200 additions and 232 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue