Skip to content

Commit

Permalink
Set min version of HA to 2025.1 (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan authored Jan 10, 2025
1 parent 7a62874 commit 9fcde4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
21 changes: 7 additions & 14 deletions custom_components/wellbeing/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Electrolux Wellbeing",
"hacs": "1.6.0",
"homeassistant": "2024.8.0"
"homeassistant": "2025.1.0"
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aiohttp
homeassistant==2024.8.0
homeassistant==2025.1.0
pyelectroluxgroup==0.2.1

0 comments on commit 9fcde4e

Please sign in to comment.