1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-13 01:27:57 +01:00

Fixed YoLink water meter controller valve status showing as "Unknown" (#175835)

This commit is contained in:
Matrix
2026-07-07 21:16:38 +08:00
committed by GitHub
parent 426c77d9f7
commit ad8b4b2d6e
+3
View File
@@ -62,6 +62,7 @@ DEVICE_TYPES: tuple[YoLinkValveEntityDescription, ...] = (
device.device_type == ATTR_DEVICE_WATER_METER_CONTROLLER
and not device.device_model_name.startswith(DEV_MODEL_WATER_METER_YS5007)
),
should_update_entity=lambda value: value is not None,
),
YoLinkValveEntityDescription(
key="valve_1_state",
@@ -71,6 +72,7 @@ DEVICE_TYPES: tuple[YoLinkValveEntityDescription, ...] = (
exists_fn=lambda device: (
device.device_type == ATTR_DEVICE_MULTI_WATER_METER_CONTROLLER
),
should_update_entity=lambda value: value is not None,
channel_index=0,
),
YoLinkValveEntityDescription(
@@ -81,6 +83,7 @@ DEVICE_TYPES: tuple[YoLinkValveEntityDescription, ...] = (
exists_fn=lambda device: (
device.device_type == ATTR_DEVICE_MULTI_WATER_METER_CONTROLLER
),
should_update_entity=lambda value: value is not None,
channel_index=1,
),
YoLinkValveEntityDescription(