Compare commits

...

2 Commits

Author SHA1 Message Date
d39deba973 Bump version 2023-05-16 20:52:17 +02:00
fae4c4c879 Check remote control only if available, fix #50 2023-05-16 20:34:05 +02:00
5 changed files with 6 additions and 6 deletions

View File

@ -69,7 +69,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
"""Return True if entity is available."""
return (
super().available
and self._device.get("remoteCtrValid") == "1"
and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
)

View File

@ -6,6 +6,6 @@
"documentation": "https://github.com/Andre0512/hon/",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/Andre0512/hon/issues",
"requirements": ["pyhOn==0.10.6"],
"version": "0.8.0-beta.1"
"requirements": ["pyhOn==0.10.7"],
"version": "0.8.0-beta.2"
}

View File

@ -243,7 +243,7 @@ class HonNumberEntity(HonEntity, NumberEntity):
else:
return (
super().available
and self._device.get("remoteCtrValid") == "1"
and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED"
)

View File

@ -207,7 +207,7 @@ class HonSelectEntity(HonEntity, SelectEntity):
else:
return (
super().available
and self._device.get("remoteCtrValid") == "1"
and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED"
)

View File

@ -434,7 +434,7 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
else:
return (
super().available
and self._device.get("remoteCtrValid") == "1"
and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED"
)