Climate implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature

Hello,
i’d need some help to understand the warning in object, that comes from the 2024.2 update.

I know the source:

but honestly it is not clear to me how to “fix” code
I tried just adding TURN_OFF to supported features, then TURN_ON but i still get the warning so i’m for sure missing something

    _attr_hvac_modes = [HVACMode.OFF, HVACMode.AUTO, HVACMode.HEAT]
    _attr_supported_features = (
        ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
    )

I’m trying to fix, again, the long time abandoned ELV MAX integration

Thanks a lot

That looks right to me. But i think you need to set

_enable_turn_on_off_backwards_compatibility

i was wondering if i had to declare also some explicit method (turn_on / turn_off) but indeed with _enable_turn_on_off_backwards_compatibility the warning is gone.
i’m not sure i always understand HA Core modifications… why the hell i need to set the _enable_turn_on_off_backwards_compatibility if i fixed the features exactly as they want?
Thanks Mark

1 Like

Here is how I fixed it for my custom integration.

thanks, so at the end of the day i had to insert new methods :slight_smile:

THis is not good for climate which have many hvac_mode COOL, HEATING, …
Which mode should turn_on activate ?

This is a crazy and stupid change or I miss something …