Skip to content

Instantly share code, notes, and snippets.

@epaulsen
Created March 6, 2023 19:04
Show Gist options
  • Save epaulsen/61b469e4a7c4a36a05a9905b97e678ec to your computer and use it in GitHub Desktop.
Save epaulsen/61b469e4a7c4a36a05a9905b97e678ec to your computer and use it in GitHub Desktop.
Binary sensor based om attributes from climate entity
binary_sensor:
- platform: template
sensors:
heating_status:
friendly_name: "Heating Status YOUR CLIMATE ENTITY"
value_template: >
{% if state_attr('climate.YOUR_CLIMATE_ENTITY_HERE','hvac_action') == 'heating' %}
on
{% else %}
off
{% endif %}
device_class: heat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment