From 9fcde4ead2cae8a96c109f986c095b9e3a5fd1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Nenz=C3=A9n?= Date: Fri, 10 Jan 2025 12:40:39 +0100 Subject: [PATCH] Set min version of HA to 2025.1 (#163) --- custom_components/wellbeing/fan.py | 21 +++++++-------------- hacs.json | 2 +- requirements.txt | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/custom_components/wellbeing/fan.py b/custom_components/wellbeing/fan.py index 8059f35..190b9e8 100644 --- a/custom_components/wellbeing/fan.py +++ b/custom_components/wellbeing/fan.py @@ -15,14 +15,6 @@ _LOGGER: logging.Logger = logging.getLogger(__package__) -SUPPORTED_FEATURES = ( - FanEntityFeature.SET_SPEED - | FanEntityFeature.PRESET_MODE - | FanEntityFeature.TURN_OFF - | FanEntityFeature.TURN_ON -) - - async def async_setup_entry(hass, entry, async_add_devices): """Setup sensor platform.""" coordinator = hass.data[DOMAIN][entry.entry_id] @@ -41,7 +33,13 @@ async def async_setup_entry(hass, entry, async_add_devices): class WellbeingFan(WellbeingEntity, FanEntity): """wellbeing Sensor class.""" - _enable_turn_on_off_backwards_compatibility = False + + _attr_supported_features = ( + FanEntityFeature.SET_SPEED + | FanEntityFeature.PRESET_MODE + | FanEntityFeature.TURN_OFF + | FanEntityFeature.TURN_ON + ) def __init__(self, coordinator: WellbeingDataUpdateCoordinator, config_entry, pnc_id, entity_type, entity_attr): super().__init__(coordinator, config_entry, pnc_id, entity_type, entity_attr) @@ -91,11 +89,6 @@ async def async_set_percentage(self, percentage: int) -> None: await asyncio.sleep(10) await self.coordinator.async_request_refresh() - @property - def supported_features(self): - """Flag supported features.""" - return SUPPORTED_FEATURES - @property def preset_mode(self): """Return the current preset mode, e.g., auto, smart, interval, favorite.""" diff --git a/hacs.json b/hacs.json index 8eb211a..6cf7520 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Electrolux Wellbeing", "hacs": "1.6.0", - "homeassistant": "2024.8.0" + "homeassistant": "2025.1.0" } diff --git a/requirements.txt b/requirements.txt index 6f4bc2f..6819952 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ aiohttp -homeassistant==2024.8.0 +homeassistant==2025.1.0 pyelectroluxgroup==0.2.1