From e901dc4ec413c21c317f4f7e1e70573c19b3d2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Wed, 16 Apr 2025 19:43:38 +0100 Subject: [PATCH] Move _attr_should_poll to base Whirlpool entity class (#143100) --- homeassistant/components/whirlpool/climate.py | 1 - homeassistant/components/whirlpool/entity.py | 1 + homeassistant/components/whirlpool/sensor.py | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/whirlpool/climate.py b/homeassistant/components/whirlpool/climate.py index 6829dca3004..0cc9e8bca84 100644 --- a/homeassistant/components/whirlpool/climate.py +++ b/homeassistant/components/whirlpool/climate.py @@ -75,7 +75,6 @@ class AirConEntity(WhirlpoolEntity, ClimateEntity): _attr_hvac_modes = SUPPORTED_HVAC_MODES _attr_max_temp = SUPPORTED_MAX_TEMP _attr_min_temp = SUPPORTED_MIN_TEMP - _attr_should_poll = False _attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE diff --git a/homeassistant/components/whirlpool/entity.py b/homeassistant/components/whirlpool/entity.py index 3f2fc81d358..a53fe0af263 100644 --- a/homeassistant/components/whirlpool/entity.py +++ b/homeassistant/components/whirlpool/entity.py @@ -12,6 +12,7 @@ class WhirlpoolEntity(Entity): """Base class for Whirlpool entities.""" _attr_has_entity_name = True + _attr_should_poll = False def __init__(self, appliance: Appliance, unique_id_suffix: str = "") -> None: """Initialize the entity.""" diff --git a/homeassistant/components/whirlpool/sensor.py b/homeassistant/components/whirlpool/sensor.py index c41fda4197f..60dd215ebb5 100644 --- a/homeassistant/components/whirlpool/sensor.py +++ b/homeassistant/components/whirlpool/sensor.py @@ -174,8 +174,6 @@ async def async_setup_entry( class WhirlpoolSensor(WhirlpoolEntity, SensorEntity): """A class for the Whirlpool sensors.""" - _attr_should_poll = False - def __init__( self, appliance: Appliance, description: WhirlpoolSensorEntityDescription ) -> None: