Fix filter & room occupied binary sensors (#73827)
This commit is contained in:
parent
0461ec1566
commit
7a407d09dc
1 changed files with 10 additions and 1 deletions
|
@ -92,6 +92,9 @@ MOTION_DEVICE_SENSOR_TYPES: tuple[SensiboDeviceBinarySensorEntityDescription, ..
|
|||
icon="mdi:motion-sensor",
|
||||
value_fn=lambda data: data.room_occupied,
|
||||
),
|
||||
)
|
||||
|
||||
DEVICE_SENSOR_TYPES: tuple[SensiboDeviceBinarySensorEntityDescription, ...] = (
|
||||
FILTER_CLEAN_REQUIRED_DESCRIPTION,
|
||||
)
|
||||
|
||||
|
@ -161,7 +164,7 @@ async def async_setup_entry(
|
|||
SensiboDeviceSensor(coordinator, device_id, description)
|
||||
for description in MOTION_DEVICE_SENSOR_TYPES
|
||||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
if device_data.motion_sensors is not None
|
||||
if device_data.motion_sensors
|
||||
)
|
||||
entities.extend(
|
||||
SensiboDeviceSensor(coordinator, device_id, description)
|
||||
|
@ -169,6 +172,12 @@ async def async_setup_entry(
|
|||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
if device_data.model == "pure"
|
||||
)
|
||||
entities.extend(
|
||||
SensiboDeviceSensor(coordinator, device_id, description)
|
||||
for description in DEVICE_SENSOR_TYPES
|
||||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
if device_data.model != "pure"
|
||||
)
|
||||
|
||||
async_add_entities(entities)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue