Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set min version of HA to 2025.1 #163

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading