Hi, in a template is it possible to filter/exclude 2 states of an entity?
sensor:
- name: "Heating State"
unique_id: "heating_state"
icon: mdi:fire
state: >
{% if is_state_attr('climate.smarther_thermostat','hvac_action','idle') %}
INACTIVE
{% else %}
ACTIVE
{% endif %}
When the entity “climate.smarther_thermostat” becomes unavailable or unknown, the template returns the ACTIVE result.
Is it possible to ignore these 2 states in the template? Or alternatively, that the unknown/unavailable state returns INACTIVE instead of ACTIVE.
Thanks
4 posts - 2 participants