Hi, everyone!
I have an external boiler, and i get target temperature from it. It works well. Like this.
zont_target_temp:
value_template: '{{ states.sensor.zont.attributes.devices[0].io["last-boiler-state"]["target_temp"] }}'
friendly_name: "target_temp"
device_class: temperature
unit_of_measurement: '°C'
I want to make a button to inscrease temp to 1 degree. I made REST_command with variable “temp”. Like this
zont_temp_target:
url: url_termostat
method: POST
headers:
x-zont-client: !secret zont_client
x-zont-token: !secret zont_token
Content-Type: application/json
payload: '{
"device_id": device_id,
"thermostat_ext_mode": 5,
"thermostat_ext_modes_config": {
"5": {
"active": true,
"hidden": false,
"name": "Hassio",
"zone_sensors": {"1": null},
"zone_temp": {"1": {{ temp }} }
}
}
}'
And also I made a button in loveace.yaml like this:
- type: button
name: zont_plus
show_name: "false"
icon: mdi:plus
icon_height: 20
action_name: Heat
tap_action:
action: call-service
service: rest_command.zont_temp_target
service_data:
temp: "{{ states('sensor.zont_target_temp') | int +1 }}" '
And it doesn’t work (nothing happens). The problem is in
temp: "{{ states('sensor.zont_target_temp') | int +1 }}"
.
When I change it to temp: 14 (16,17....)
it works properly. Where am I wrong? Could you help me please someone…