Help with binary sensor not changing

hey all,

Home Assistant 0.101.2

i have an evohome rad and when its “heating” i want a new binary sensor to be “on” otherwise, it should always just be “off”

i have the following setup, which works as a template, but the binary sensor is not changing?

from config.yaml

  - platform: template
    sensors:
      rad_boolean_jamie_office:
        friendly_name: "Radiator Boolean Jamie Office"
        value_template: >
          {% set rad_status = states.climate.jamie_office.attributes.hvac_action %}
          {% if rad_status == "heating" %}
            on
          {% else %}
            off
          {% endif %}

in the template = “on”
however the sensor still shows “off”

your template return on instead of true
Amend as follows

  - platform: template
    sensors:
      rad_boolean_jamie_office:
        friendly_name: "Radiator Boolean Jamie Office"
        value_template: '{{state_attr("climate.jamie_office","hvac_action ") == "heating"}}'
2 Likes

thanks!!
this did it :slight_smile:

1 Like