Skip to content

Commit

Permalink
Fix backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan committed Aug 22, 2024
1 parent ba0e7df commit 4d8a61e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/wellbeing/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
_LOGGER: logging.Logger = logging.getLogger(__package__)

SUPPORTED_FEATURES = (
FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE | FanEntityFeature.TURN_OFF | FanEntityFeature.TURN_ON
FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
)


Expand All @@ -39,6 +39,9 @@ async def async_setup_entry(hass, entry, async_add_devices):
class WellbeingFan(WellbeingEntity, FanEntity):
"""wellbeing Sensor class."""

# Add FanEntityFeature.TURN_OFF | FanEntityFeature.TURN_ON and set to True before 2025.2
_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)
self._preset_mode = self.get_appliance.mode
Expand Down

0 comments on commit 4d8a61e

Please sign in to comment.