mirror of
https://github.com/Andre0512/hon.git
synced 2026-06-19 16:11:19 +02:00
Fix applance connection handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user