mairas/hysen

Add HVAC_ACTION

Closed this issue · 1 comments

Hi, I just got my thermostat in the mail today (BEOK BOT306RF-WIFI) and it is working great (from a seperate VLAN with no outside access!).

Just wanted to point out that with the changes to climate 1.0 in HA 0.96 they also added the attribute HVAC_ACTION. This is used by some other components/lovelace cards (the simple thermostat for example).

As a warning, I'm not a programmer and just installed HA today, so I could have done something wrong, but I implemented it like this:
In climate.py, I first imported the needed climate.consts:

--line42 from homeassistant.components.climate.const import (DOMAIN, SUPPORT_TARGET_TEMPERATURE,SUPPORT_PRESET_MODE, HVAC_MODE_OFF, HVAC_MODE_HEAT, HVAC_MODE_AUTO, PRESET_AWAY,
PRESET_NONE)
++line42 from homeassistant.components.climate.const import (DOMAIN, SUPPORT_TARGET_TEMPERATURE,SUPPORT_PRESET_MODE, HVAC_MODE_OFF, HVAC_MODE_HEAT, HVAC_MODE_AUTO, PRESET_AWAY,
PRESET_NONE, CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE)

Then I set the property:

    @property
    def hvac_action(self):
        """Return current HVAC action."""
        if self._is_heating_active == 1:
            return CURRENT_HVAC_HEAT
        else:
            return CURRENT_HVAC_IDLE

It might even be better to replace the is_heating_active attribute, but not my call.

mcc05 commented

Done