aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Basche <andre.basche@gmail.com>2024-03-29 14:48:35 +0100
committerAndre Basche <andre.basche@gmail.com>2024-03-29 14:48:35 +0100
commit0e26b4a0f7d5919044b2ba0b9a5d74950e7fb51c (patch)
tree43870ae9ebeae2349480cbe0e0ac1e12dd9862c0
parenta6c2c3e9927b9ec58f68f7e84ebff22c0f0d0eb0 (diff)
Fix applance connection handlingv0.14.0-beta.5
-rw-r--r--custom_components/hon/button.py2
-rw-r--r--custom_components/hon/lock.py2
-rw-r--r--custom_components/hon/manifest.json4
-rw-r--r--custom_components/hon/number.py2
-rw-r--r--custom_components/hon/select.py2
-rw-r--r--custom_components/hon/switch.py2
-rw-r--r--requirements.txt2
7 files changed, 8 insertions, 8 deletions
diff --git a/custom_components/hon/button.py b/custom_components/hon/button.py
index f5f3d28..ce0f548 100644
--- a/custom_components/hon/button.py
+++ b/custom_components/hon/button.py
@@ -82,7 +82,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
82 return ( 82 return (
83 super().available 83 super().available
84 and int(self._device.get("remoteCtrValid", "1")) == 1 84 and int(self._device.get("remoteCtrValid", "1")) == 1
85 and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" 85 and self._device.connection
86 ) 86 )
87 87
88 88
diff --git a/custom_components/hon/lock.py b/custom_components/hon/lock.py
index 510641c..63304c1 100644
--- a/custom_components/hon/lock.py
+++ b/custom_components/hon/lock.py
@@ -76,7 +76,7 @@ class HonLockEntity(HonEntity, LockEntity):
76 return ( 76 return (
77 super().available 77 super().available
78 and int(self._device.get("remoteCtrValid", 1)) == 1 78 and int(self._device.get("remoteCtrValid", 1)) == 1
79 and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" 79 and self._device.connection
80 ) 80 )
81 81
82 @callback 82 @callback
diff --git a/custom_components/hon/manifest.json b/custom_components/hon/manifest.json
index 49abb37..637fd88 100644
--- a/custom_components/hon/manifest.json
+++ b/custom_components/hon/manifest.json
@@ -9,7 +9,7 @@
9 "iot_class": "cloud_push", 9 "iot_class": "cloud_push",
10 "issue_tracker": "https://github.com/Andre0512/hon/issues", 10 "issue_tracker": "https://github.com/Andre0512/hon/issues",
11 "requirements": [ 11 "requirements": [
12 "pyhOn==0.17.2" 12 "pyhOn==0.17.3"
13 ], 13 ],
14 "version": "0.14.0-beta.4" 14 "version": "0.14.0-beta.5"
15} 15}
diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py
index 8cf8a1e..fc6e88f 100644
--- a/custom_components/hon/number.py
+++ b/custom_components/hon/number.py
@@ -276,7 +276,7 @@ class HonNumberEntity(HonEntity, NumberEntity):
276 return ( 276 return (
277 super().available 277 super().available
278 and int(self._device.get("remoteCtrValid", 1)) == 1 278 and int(self._device.get("remoteCtrValid", 1)) == 1
279 and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" 279 and self._device.connection
280 ) 280 )
281 281
282 282
diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py
index 1eb620e..7bd9440 100644
--- a/custom_components/hon/select.py
+++ b/custom_components/hon/select.py
@@ -325,7 +325,7 @@ class HonSelectEntity(HonEntity, SelectEntity):
325 return ( 325 return (
326 super().available 326 super().available
327 and int(self._device.get("remoteCtrValid", 1)) == 1 327 and int(self._device.get("remoteCtrValid", 1)) == 1
328 and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" 328 and self._device.connection
329 ) 329 )
330 330
331 @callback 331 @callback
diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py
index 36d283e..063e6db 100644
--- a/custom_components/hon/switch.py
+++ b/custom_components/hon/switch.py
@@ -507,7 +507,7 @@ class HonControlSwitchEntity(HonEntity, SwitchEntity):
507 return ( 507 return (
508 super().available 508 super().available
509 and int(self._device.get("remoteCtrValid", 1)) == 1 509 and int(self._device.get("remoteCtrValid", 1)) == 1
510 and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED" 510 and self._device.connection
511 ) 511 )
512 512
513 @property 513 @property
diff --git a/requirements.txt b/requirements.txt
index 11d498a..fb9018e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
pyhOn==0.17.2 pyhOn==0.17.3