From f5b2002057164247aac0fe23362d68fb9fa4fd34 Mon Sep 17 00:00:00 2001 From: dotvav Date: Mon, 25 Nov 2024 10:37:05 +0100 Subject: [PATCH] Make every palazzetti entity unavailable if appropriate (#131385) --- homeassistant/components/palazzetti/climate.py | 5 ----- homeassistant/components/palazzetti/entity.py | 5 +++++ homeassistant/components/palazzetti/quality_scale.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/palazzetti/climate.py b/homeassistant/components/palazzetti/climate.py index 95e267301bc..356f3a7306f 100644 --- a/homeassistant/components/palazzetti/climate.py +++ b/homeassistant/components/palazzetti/climate.py @@ -64,11 +64,6 @@ class PalazzettiClimateEntity(PalazzettiEntity, ClimateEntity): if client.has_fan_auto: self._attr_fan_modes.append(FAN_AUTO) - @property - def available(self) -> bool: - """Is the entity available.""" - return super().available and self.coordinator.client.connected - @property def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat or off mode.""" diff --git a/homeassistant/components/palazzetti/entity.py b/homeassistant/components/palazzetti/entity.py index ec850848154..677c6ccbdc4 100644 --- a/homeassistant/components/palazzetti/entity.py +++ b/homeassistant/components/palazzetti/entity.py @@ -25,3 +25,8 @@ class PalazzettiEntity(CoordinatorEntity[PalazzettiDataUpdateCoordinator]): sw_version=client.sw_version, hw_version=client.hw_version, ) + + @property + def available(self) -> bool: + """Is the entity available.""" + return super().available and self.coordinator.client.connected diff --git a/homeassistant/components/palazzetti/quality_scale.yaml b/homeassistant/components/palazzetti/quality_scale.yaml index da51f1002dc..c8e19920dbe 100644 --- a/homeassistant/components/palazzetti/quality_scale.yaml +++ b/homeassistant/components/palazzetti/quality_scale.yaml @@ -36,7 +36,7 @@ rules: comment: | This integration does not have configuration. docs-installation-parameters: todo - entity-unavailable: todo + entity-unavailable: done integration-owner: done log-when-unavailable: done parallel-updates: todo