Skip to content

Commit

Permalink
Add feature flags to fan due to upcoming deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan authored Nov 14, 2024
1 parent dc3a440 commit 81beefd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/wellbeing/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand All @@ -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)
Expand Down

0 comments on commit 81beefd

Please sign in to comment.