mirror of
https://github.com/Andre0512/hon.git
synced 2024-12-22 02:35:32 +00:00
Fix applance connection handling
This commit is contained in:
parent
a6c2c3e992
commit
0e26b4a0f7
|
@ -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
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
pyhOn==0.17.2
|
||||
pyhOn==0.17.3
|
||||
|
|
Loading…
Reference in a new issue