diff --git a/custom_components/petkit/fan.py b/custom_components/petkit/fan.py index f624a9c..e1412c2 100644 --- a/custom_components/petkit/fan.py +++ b/custom_components/petkit/fan.py @@ -45,6 +45,10 @@ async def async_setup_entry( class Purifier(CoordinatorEntity, FanEntity): """Representation of a PetKit air purifier.""" + # Need to remove this in 2025.2 once setting it manually + # isn't required anymore. + _enable_turn_on_off_backwards_compatibility = False + def __init__(self, coordinator, purifier_id): super().__init__(coordinator) self.purifier_id = purifier_id @@ -120,7 +124,11 @@ def preset_mode(self) -> str: def supported_features(self) -> int: """Return supported features.""" - return FanEntityFeature.PRESET_MODE + return ( + FanEntityFeature.PRESET_MODE + | FanEntityFeature.TURN_ON + | FanEntityFeature.TURN_OFF + ) async def async_turn_on(self, **kwargs) -> None: """Turn the air purifier on."""