parent
6c80f865f5
commit
528422d238
1 changed files with 4 additions and 2 deletions
|
@ -31,8 +31,10 @@ CONTROLLER_BINARY_SENSORS: tuple[HydrawiseBinarySensorEntityDescription, ...] =
|
||||||
HydrawiseBinarySensorEntityDescription(
|
HydrawiseBinarySensorEntityDescription(
|
||||||
key="status",
|
key="status",
|
||||||
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||||
value_fn=lambda status_sensor: status_sensor.coordinator.last_update_success
|
value_fn=(
|
||||||
and status_sensor.controller.online,
|
lambda status_sensor: status_sensor.coordinator.last_update_success
|
||||||
|
and status_sensor.controller.online
|
||||||
|
),
|
||||||
# Connectivtiy sensor is always available
|
# Connectivtiy sensor is always available
|
||||||
always_available=True,
|
always_available=True,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue