Deactivate contols when remotectrl disabled, fixes #28

This commit is contained in:
Andre Basche 2023-05-07 19:12:45 +02:00
parent 74f5887bb2
commit 6935f5f07f
4 changed files with 13 additions and 18 deletions

View file

@ -80,3 +80,8 @@ class HonFeatureRequestButton(HonEntity, ButtonEntity):
pyhon_version = pkg_resources.get_distribution("pyhon").version
info = f"Device Info:\n{self._device.diagnose}pyhOnVersion: {pyhon_version}"
_LOGGER.error(info)
@property
def available(self) -> bool:
"""Return True if entity is available."""
return super().available and self._device.get("remoteCtrValid") == "1"