Fix yolink abnormal status when LeakSensor detection mode changes to "no water detect" (#109575)

Add no water detect support
This commit is contained in:
Matrix
2024-02-04 15:27:57 +08:00
committed by Franck Nijhof
parent 7be6aa455e
commit b14add5914

View File

@@ -63,7 +63,7 @@ SENSOR_TYPES: tuple[YoLinkBinarySensorEntityDescription, ...] = (
YoLinkBinarySensorEntityDescription(
key="leak_state",
device_class=BinarySensorDeviceClass.MOISTURE,
value=lambda value: value == "alert" if value is not None else None,
value=lambda value: value in ("alert", "full") if value is not None else None,
exists_fn=lambda device: device.device_type == ATTR_DEVICE_LEAK_SENSOR,
),
YoLinkBinarySensorEntityDescription(