mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 02:51:40 +02:00
Update homeassistant/components/zimi/sensor.py
Co-authored-by: Josef Zweck <josef@zweck.dev>
This commit is contained in:
@@ -64,12 +64,7 @@ async def async_setup_entry(
|
|||||||
|
|
||||||
api = config_entry.runtime_data
|
api = config_entry.runtime_data
|
||||||
|
|
||||||
sensors: list[ZimiSensor] = []
|
async_add_entities(ZimiSensor(device, description, api) for device in api.sensors for description in GARAGE_SENSOR_DESCRIPTIONS)
|
||||||
|
|
||||||
for description in GARAGE_SENSOR_DESCRIPTIONS:
|
|
||||||
sensors.extend([ZimiSensor(device, description, api) for device in api.sensors])
|
|
||||||
|
|
||||||
async_add_entities(sensors)
|
|
||||||
|
|
||||||
|
|
||||||
class ZimiSensor(ZimiEntity, SensorEntity):
|
class ZimiSensor(ZimiEntity, SensorEntity):
|
||||||
|
Reference in New Issue
Block a user