mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fixed YoLink incorrect valve status (#147021)
* Fix valve status * Fix as suggested
This commit is contained in:
parent
4d2f0f2de6
commit
436fcb7e85
@ -6,5 +6,5 @@
|
|||||||
"dependencies": ["auth", "application_credentials"],
|
"dependencies": ["auth", "application_credentials"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/yolink",
|
"documentation": "https://www.home-assistant.io/integrations/yolink",
|
||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"requirements": ["yolink-api==0.5.2"]
|
"requirements": ["yolink-api==0.5.5"]
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,10 @@ class YoLinkValveEntity(YoLinkEntity, ValveEntity):
|
|||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
"""Return true is device is available."""
|
"""Return true is device is available."""
|
||||||
if self.coordinator.dev_net_type is not None:
|
if (
|
||||||
|
self.coordinator.device.is_support_mode_switching()
|
||||||
|
and self.coordinator.dev_net_type is not None
|
||||||
|
):
|
||||||
# When the device operates in Class A mode, it cannot be controlled.
|
# When the device operates in Class A mode, it cannot be controlled.
|
||||||
return self.coordinator.dev_net_type != ATTR_DEVICE_MODEL_A
|
return self.coordinator.dev_net_type != ATTR_DEVICE_MODEL_A
|
||||||
return super().available
|
return super().available
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -3154,7 +3154,7 @@ yeelight==0.7.16
|
|||||||
yeelightsunflower==0.0.10
|
yeelightsunflower==0.0.10
|
||||||
|
|
||||||
# homeassistant.components.yolink
|
# homeassistant.components.yolink
|
||||||
yolink-api==0.5.2
|
yolink-api==0.5.5
|
||||||
|
|
||||||
# homeassistant.components.youless
|
# homeassistant.components.youless
|
||||||
youless-api==2.2.0
|
youless-api==2.2.0
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -2598,7 +2598,7 @@ yalexs==8.10.0
|
|||||||
yeelight==0.7.16
|
yeelight==0.7.16
|
||||||
|
|
||||||
# homeassistant.components.yolink
|
# homeassistant.components.yolink
|
||||||
yolink-api==0.5.2
|
yolink-api==0.5.5
|
||||||
|
|
||||||
# homeassistant.components.youless
|
# homeassistant.components.youless
|
||||||
youless-api==2.2.0
|
youless-api==2.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user