Hi there,
I have built a simple, custom REST API which can set the temperature on a thermostat through a POST request. All it requires is the temperature that it needs to be set at.
I want to use an input slider, with a trigger, to then call the REST service with the updated temperature. I can’t work out how to do it - would anyone be able to help? I’ve tried with the REST sensor and then with the REST switch:s
# Thermostat slider
input_slider:
potage_thermostat:
name: Potage Temperature
initial: 10
min: 10
max: 90
step: 1
automation:
alias: Set thermostat
trigger:
platform: state
entity_id: input_slider.potage_thermostat
action:
service: switch.turn_on
switch:
name: Potage Heater
platform: rest
resource: http://192.168.0.37:8080/thermostat
body_on: input_slider.potage_thermostat
body_off: 0
is_on_template: '{{ value_json.state != 0 }}'