Compare commits

..

2 Commits

Author SHA1 Message Date
Andre Basche d39deba973 Bump version 2023-05-16 20:52:17 +02:00
Andre Basche 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
+1 -1
View File
@@ -69,7 +69,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
"""Return True if entity is available.""" """Return True if entity is available."""
return ( return (
super().available super().available
and self._device.get("remoteCtrValid") == "1" and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
) )
+2 -2
View File
@@ -6,6 +6,6 @@
"documentation": "https://github.com/Andre0512/hon/", "documentation": "https://github.com/Andre0512/hon/",
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"issue_tracker": "https://github.com/Andre0512/hon/issues", "issue_tracker": "https://github.com/Andre0512/hon/issues",
"requirements": ["pyhOn==0.10.6"], "requirements": ["pyhOn==0.10.7"],
"version": "0.8.0-beta.1" "version": "0.8.0-beta.2"
} }
+1 -1
View File
@@ -243,7 +243,7 @@ class HonNumberEntity(HonEntity, NumberEntity):
else: else:
return ( return (
super().available super().available
and self._device.get("remoteCtrValid") == "1" and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category") and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED" != "DISCONNECTED"
) )
+1 -1
View File
@@ -207,7 +207,7 @@ class HonSelectEntity(HonEntity, SelectEntity):
else: else:
return ( return (
super().available super().available
and self._device.get("remoteCtrValid") == "1" and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category") and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED" != "DISCONNECTED"
) )
+1 -1
View File
@@ -434,7 +434,7 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
else: else:
return ( return (
super().available super().available
and self._device.get("remoteCtrValid") == "1" and self._device.get("remoteCtrValid", "1") == "1"
and self._device.get("attributes.lastConnEvent.category") and self._device.get("attributes.lastConnEvent.category")
!= "DISCONNECTED" != "DISCONNECTED"
) )