MizterB / homeassistant-infinitude-beyond

Home Assistant custom component for controlling Carrier Infinity Touch thermostats through an Infinitude proxy server.
20 stars 4 forks source link

Log message regarding implicit setting of ClimateEntityFeature #5

Closed brettonw closed 5 months ago

brettonw commented 7 months ago

2024-04-14 11:27:56.387 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.infinitude_beyond.climate.InfinitudeClimate'>) implements HVACMode(s): off, heat, cool, heat_cool, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'infinitude_beyond' custom integration

kdjordjev commented 5 months ago

I added the "_enable_turn_on_off_backwards_compatibility = False" to the end of the attribute definition of the class to suppress this warning

class InfinitudeClimate(InfinitudeEntity, ClimateEntity):
    """Representation of an Infinitude climate entity."""
    _attr_supported_features = (
        ClimateEntityFeature.TARGET_TEMPERATURE
        | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
        | ClimateEntityFeature.FAN_MODE
        | ClimateEntityFeature.PRESET_MODE
    )
    _attr_precision = PRECISION_TENTHS
    _attr_temperature_step = PRECISION_WHOLE
    _attr_name = "Thermostat"
    _enable_turn_on_off_backwards_compatibility = False
MizterB commented 5 months ago

Fixed in 2024.6.0