Fix applance connection handling

This commit is contained in:
Andre Basche 2024-03-29 14:48:35 +01:00
parent a6c2c3e992
commit 0e26b4a0f7
7 changed files with 8 additions and 8 deletions

View file

@ -82,7 +82,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
return (
super().available
and int(self._device.get("remoteCtrValid", "1")) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)

View file

@ -76,7 +76,7 @@ class HonLockEntity(HonEntity, LockEntity):
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)
@callback

View file

@ -9,7 +9,7 @@
"iot_class": "cloud_push",
"issue_tracker": "https://github.com/Andre0512/hon/issues",
"requirements": [
"pyhOn==0.17.2"
"pyhOn==0.17.3"
],
"version": "0.14.0-beta.4"
"version": "0.14.0-beta.5"
}

View file

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

View file

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

View file

@ -507,7 +507,7 @@ class HonControlSwitchEntity(HonEntity, SwitchEntity):
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)
@property

View file

@ -1 +1 @@
pyhOn==0.17.2
pyhOn==0.17.3