Apply changes for new pyhon version

This commit is contained in:
Andre Basche 2023-06-13 00:14:51 +02:00
parent b1448ddfd8
commit 1ea9153c2e
10 changed files with 170 additions and 165 deletions

View file

@ -77,7 +77,7 @@ class HonButtonEntity(HonEntity, ButtonEntity):
"""Return True if entity is available."""
return (
super().available
and self._device.get("remoteCtrValid", "1") == "1"
and int(self._device.get("remoteCtrValid", "1")) == 1
and self._device.get("attributes.lastConnEvent.category") != "DISCONNECTED"
)