Templates, service calls

Hi all,

Hopefully someone has the answers on here :slight_smile: , I’m trying to achieve hour limits when the wife turns the heating on (evohome)

I have managed to automate this already, but I would like to set it with limit the user input, instead of a fixed temperature, I have already created a template which can show me the temps set, question is how do i use the input from a template to a service call.

The input needs to be on setpoint:

Any help would be super, can show my current automation if it helps…

Please show the current code, and the name of the input_number that holds the value you want to set.

This is being completed in the GUI

Trigger:
platform: state
entity_id: climate.our_room
attribute: preset_mode
from: none
to: temporary

Action:
service: evohome.set_zone_override
data:
entity_id: our_room
setpoint: 21 # this I need as a variable input
duration:
minutes: 60

Template:

  • platform: template
    sensors:

Convert SET TEMPERATURE OF ROOMS

Ourroom_temp:
  friendly_name: 'our Room'
  value_template: "{{ state_attr('climate.our_room','status').setpoint_status.target_heat_temperature }}"

Please read the community guidelines here, especially point 11, and format your code properly.

This should work (if you run HA 0.115 or higher, if you use a lower version you also need to change data to data_template):

setpoint: "{{ state_attr('climate.our_room', 'status').setpoint_status.target_heat_temperature }}"

Or if you anyway want to keep the template sensor:

setpoint: "{{ states('sensor.ourroom_temp') }}"

Thank you, and that worked. Thank you for your help :slight_smile:

1 Like