floringhimie / salusfy

SALUS THERMOSTAT Custom component for Home-Assistant
34 stars 14 forks source link

Warning regarding HVACMode(s) #19

Open romicaiarca opened 7 months ago

romicaiarca commented 7 months ago

Warning regarding HVACMode(s)

Entity None (<class 'custom_components.salusfy.climate.SalusThermostat'>) implements HVACMode(s): heat, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/floringhimie/salusfy/issues

Screenshot 2024-02-15 at 10 27 01
matthewturner commented 6 months ago

I've been able to resolve this issue with:

class Entity(ClimateEntity):
    def __init__(self):
          self._enable_turn_on_off_backwards_compatibility = False

    @property
    def supported_features(self):
        return ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_ON | ClimateEntityFeature.TURN_OFF

I've fixed it in my fork. There are quite a lot of changes so I can't easily submit a PR for just this change.

Hope it helps!

romicaiarca commented 6 months ago

it works. I've added your fork into my instance and looks like works like a charm!

matthewturner commented 6 months ago

Great! Glad it works for you.