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