mirror of https://github.com/Andre0512/hon.git
Fix applance connection handling
This commit is contained in:
parent
a6c2c3e992
commit
0e26b4a0f7
|
@ -82,7 +82,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
|
||||||
return (
|
return (
|
||||||
super().available
|
super().available
|
||||||
and int(self._device.get("remoteCtrValid", "1")) == 1
|
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 (
|
return (
|
||||||
super().available
|
super().available
|
||||||
and int(self._device.get("remoteCtrValid", 1)) == 1
|
and int(self._device.get("remoteCtrValid", 1)) == 1
|
||||||
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
|
and self._device.connection
|
||||||
)
|
)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
||||||
"requirements": [
|
"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 (
|
return (
|
||||||
super().available
|
super().available
|
||||||
and int(self._device.get("remoteCtrValid", 1)) == 1
|
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 (
|
return (
|
||||||
super().available
|
super().available
|
||||||
and int(self._device.get("remoteCtrValid", 1)) == 1
|
and int(self._device.get("remoteCtrValid", 1)) == 1
|
||||||
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
|
and self._device.connection
|
||||||
)
|
)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
|
|
@ -507,7 +507,7 @@ class HonControlSwitchEntity(HonEntity, SwitchEntity):
|
||||||
return (
|
return (
|
||||||
super().available
|
super().available
|
||||||
and int(self._device.get("remoteCtrValid", 1)) == 1
|
and int(self._device.get("remoteCtrValid", 1)) == 1
|
||||||
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
|
and self._device.connection
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
pyhOn==0.17.2
|
pyhOn==0.17.3
|
||||||
|
|
Loading…
Reference in New Issue