Hi, my HVAC setup has three zones connected to a single furnace/air conditioner. Each zone has a thermostat and a damper controls if air is routed to each zone.
The thermostats (Honeywell T6 Pro Wifi) are connected to HA via HomeKit integration, they work fine and are represented as three climate entities.
I can extract each hvac_action from the thermostats with the following sensors:
Thanks! Looks more elegant than my attempt, but functionally equivalent.
However mine still doesn’t work, the sensor shows up as unavailable. What is my error?
- name: HVAC Activity
state: >
{% set pt_hvac_activity = states('sensor.pt_hvac_activity') | string('n/a') %}
{% set pp_hvac_activity = states('sensor.pp_hvac_activity') | string('n/a') %}
{% set flex_room_hvac_activity = states('sensor.flex_room_hvac_activity') | string('n/a') %}
{% if pt_hvac_activity == 'idle' and pp_hvac_activity == 'idle' and flex_room_hvac_activity == 'idle' %}
idle
{% elif pt_hvac_activity == 'heating' or pp_hvac_activity == 'heating' or flex_room_hvac_activity == 'heating' %}
heating
{% elif pt_hvac_activity == 'cooling' or pp_hvac_activity == 'cooling' or flex_room_hvac_activity == 'vooling' %}
cooling
{% else %}
n/a
{% endif %}
Ok, I just discovered the “Template” editor in the developers tools. This is much easier than testing in the config files! This is the output:
Your initial suggestion is working fine and I’m using it now, so that’s settled and thanks a lot for the help! But I feel like my initial attempt should have worked too. I am feeling suspicious about the “| string(‘n/a’)” filter in the initial lines… but it seems correct? What am I missing?
Also, I am having another issue - I activated the utility_meter integration and added it to my dashboard. However, the cooling elements don’t show up:
I guess that’s because there is no data about cooling and there won’t be for a few months, but is there a way to get a flat out zero in there instead of an error message?
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.
I suggest you copy-paste your version into the Template Editor and observe the result of each variable you created. Experimentation in the Template Editor is a good way to learn.
Not sure about that one. It appears that the card you’re using demands a numeric value and the referenced entity’s value isn’t numeric. You can embed the card into a Conditional card and configure it to hide everything if the referenced entity is unknown or unavailable.