Heating Set Points

This worked a treat! Many Thanks :slight_smile:

This worked very well, however it seems to miss the fact the temperature is being reported back in decimal increments, for example:

The condition is asking for greater than or equal to, and this works, but for whole numbers only - if the set point is say 20 degrees, 20.1-20.9 is ignored, its only when 21 is reached the state changes.

Any ideas?

Please try this

alias: Heating Controls
description: ''
mode: single
trigger:
  - platform: time_pattern
    seconds: /10
condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{state_attr('climate.living_room', 'current_temperature') | float <
              state_attr('climate.living_room', 'temperature') | float}}
        sequence:
          - service: (put the actions you want with current_temperature is less than set_temperature)
            data: {}
      - conditions:
          - condition: template
            value_template: >-
              {{state_attr('climate.living_room', 'current_temperature') | float >
              state_attr('climate.living_room', 'temperature') | float}}
        sequence:
          - service: (put the actions you want with current_temperature is more than set_temperature)
            data: {}
    default: []

So this worked, however if i set the set point to 20 degrees, the boiler remains on until it reaches 20.5.

It looks like its missing the “equal to” condition, however i added in a “=” and this didnt work?

Any ideas?

What if the set point is 20.0?

{{state_attr('climate.living_room', 'current_temperature') | float >=
              state_attr('climate.living_room', 'temperature') | float}}

{{state_attr('climate.living_room', 'current_temperature') | float <=
              state_attr('climate.living_room', 'temperature') | float}}

This didnt work, but i solved it - the “off” action should be “equal to or greater than” whereas the “on” should only be “less than”.

Thanks again for your help.

Russell.

1 Like

Hey, me again! Sorry :wink:

How would i go about using this code to fire an automation every time the temperature changes? By this, i mean every time a thermostat reports a change in state (so any state change), the automation fires? I am trying to remove the /30 second firing from the trigger to make things more robust (and prevent my log from bring crammed full of triggers).

Thanks.

Try changing the trigger to this.

trigger:
  - platform: state
    entity_id: climate.living_room
    attribute: current_temperature
  - platform: state
    entity_id: climate.living_room
    attribute: temperature
1 Like

Thanks. That works.