Automatic heat control


I’m trying to make an automatic heating control. I got some Danfoss LC-13 thermostats, which will be included in the control system.

In my automation, I would like to take the current temperature setting for the thermostat, and add / subtract 0.5 degrees depending on whether the temperature is too high or too low. Can I do this when i call the service climate.thermostat in actions?

Something like this for adding 0.5 degress;

  "entity_id": "climate.danfoss_z_thermostat_014g0013_heating_1",
  "temperature": "{{float(states.climate.danfoss_z_thermostat_014g0013_heating_1.attributes.temperature+0.5)}}"

However, when I call this action I get the following error;

2017-09-21 09:43:07 ERROR (MainThread) [homeassistant.core] Invalid service data for climate.set_temperature: expected float for dictionary value @ data[‘temperature’]. Got “{{float(states.climate.danfoss_z_thermostat_014g0013_heating_1.attributes.temperature+0.5)}}”

This works for me:

    alias: "Increase temp 0.5"
    - service: climate.set_temperature
        entity_id: "climate.termostat_stue"
        temperature: '{{ (float(states.climate.termostat_stue.attributes.temperature+0.5)|min(25)) }}'

Thank you! Mine works now too - I needed to switch out “data” with “data_template” as you suggested. I guess the automation editor can’t handle this :frowning: