Skip to content

Commit

Permalink
Fix applance connection handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Mar 29, 2024
1 parent a6c2c3e commit 0e26b4a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion custom_components/hon/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def available(self) -> bool:
return (
super().available
and int(self._device.get("remoteCtrValid", "1")) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)


Expand Down
2 changes: 1 addition & 1 deletion custom_components/hon/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def available(self) -> bool:
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)

@callback
Expand Down
4 changes: 2 additions & 2 deletions custom_components/hon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion custom_components/hon/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def available(self) -> bool:
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)


Expand Down
2 changes: 1 addition & 1 deletion custom_components/hon/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def available(self) -> bool:
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)

@callback
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hon/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def available(self) -> bool:
return (
super().available
and int(self._device.get("remoteCtrValid", 1)) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
and self._device.connection
)

@property
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyhOn==0.17.2
pyhOn==0.17.3

0 comments on commit 0e26b4a

Please sign in to comment.