From 7a62874f84e85ca7c1c98ed69f6f00ef43a956f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Nenz=C3=A9n?= Date: Thu, 14 Nov 2024 23:10:23 +0100 Subject: [PATCH] Add feature flags to fan due to upcoming deprecation (#158) * Add feature flags to fan due to upcoming deprecation * Update hacs.json --- custom_components/wellbeing/fan.py | 6 +++++- hacs.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_components/wellbeing/fan.py b/custom_components/wellbeing/fan.py index ad72aa4..8059f35 100644 --- a/custom_components/wellbeing/fan.py +++ b/custom_components/wellbeing/fan.py @@ -16,7 +16,10 @@ _LOGGER: logging.Logger = logging.getLogger(__package__) SUPPORTED_FEATURES = ( - FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE + FanEntityFeature.SET_SPEED + | FanEntityFeature.PRESET_MODE + | FanEntityFeature.TURN_OFF + | FanEntityFeature.TURN_ON ) @@ -38,6 +41,7 @@ async def async_setup_entry(hass, entry, async_add_devices): class WellbeingFan(WellbeingEntity, FanEntity): """wellbeing Sensor class.""" + _enable_turn_on_off_backwards_compatibility = False def __init__(self, coordinator: WellbeingDataUpdateCoordinator, config_entry, pnc_id, entity_type, entity_attr): super().__init__(coordinator, config_entry, pnc_id, entity_type, entity_attr) diff --git a/hacs.json b/hacs.json index 0676249..8eb211a 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Electrolux Wellbeing", "hacs": "1.6.0", - "homeassistant": "2024.6.0" + "homeassistant": "2024.8.0" }