elRadix
(elRadix)
November 8, 2017, 7:52pm
1
I have a slider for the setpoint temperature when changing it’s value I would also that the climate target temperate is adjusted to the same value.
Can someone help me to achieve this:
Slider:
input_number:
setpoint:
name: 'Living setpoint'
min: 5
max: 25
step: 1
initial: 10
mode: slider
unit_of_measurement: "°C"
Script:
setpoint_living_on:
sequence:
- service: shell_command.tmp_living_on
Shell command:
tmp_living_on: "/opt/scripts/apex.sh 'setsetpoint 0,{{ states.input_number.setpoint_living.state | int}}'"`
Automation to combine both value - is not working
- id: setpoint_living
alias: setpoint_living
trigger:
- platform: state
entity_id: input_number.setpoint_living
action:
- service: script.setpoint_living_on
action:
- service: climate.set_temperature
data:
entity_id: climate.living
temperature: '{{ (float(states.sensor.tmp_set_living.state) ) }}' # does not work
elRadix
(elRadix)
November 9, 2017, 8:11am
2
Tried various ways, any help is appreciated
You need data_template not data for the second action
elRadix
(elRadix)
November 9, 2017, 10:23am
4
andrewdolphin:
data_template
tried that still does not work, it’s complaining with this error " mapping values are not allowed here "
- id: setpoint_living
alias: setpoint_living
trigger:
- platform: state
entity_id: input_number.setpoint
action:
- service: script.setpoint_living_on
action:
- service: climate.set_temperature
data_template:
entity_id: climate.living
temperature: '{{ (float(states.sensor.tmp_set_living.state) }}'
elRadix
(elRadix)
November 9, 2017, 10:29am
5
So basically what I try to achieve when I increase setpoint temp (nr 1) higher that 19 degrees to have climate target set at the same temperature (nr 2) with “heating” status and when I lower these below 10 degrees to shutdown the heating to “idle/off”.
I’m assuming you made a sensor that is made with input from the slider?
try:
- id: setpoint_living
alias: setpoint_living
trigger:
platform: state
entity_id: input_number.setpoint
action:
- service: script.setpoint_living_on
- service: climate.set_temperature
data_template:
entity_id: climate.living
temperature: '{{ states.sensor.tmp_set_living.state | float }}'
As has been suggested I think your float conversion might be the problem
i’d like to do something similar.
I.e. i tried to rise by 1 degree the temperature of the climate.
heat_up:
alias: heat_up
sequence:
- data:
entity_id: climate.ac_corridoio
temperature: state_attr("climate.ac_corridoio.temperature")|int + 1
service: climate.set_temperature
with brachets or without, in every combination. i havernt had any feedback.
if i substitute an int to the “state_attr(“climate.ac_corridoio.temperature”)|int + 1” statement it works.
can someone help me? ( and help el Radix too)