Hi,
I’d need a bit help getting restful command sent with parameters taken from other items, I have created buttons using lovelace gui for replicating AC remote.
I’ve created also automation which calls rest command if such send button is pressed. So far it works, button calls the automation.
Then I have done rest command like this, in configuration.yml:
heatpump_with_params:
url: http://192.168.1.100:1880/api
method: POST
content_type: "application/json"
headers:
accept: "application/json"
payload: '{ "token": "xxxx", "cmd":"on", "temp":"{{ states(input_number.heatpump_temp) | int }}", "mode":"{{ states(input_select.heatpump_mode) }}", "fan": "{{ states(input_select.heatpump_fan) }}" }'
But such variables are not found. The entity ids are copied from items, so no spelling mistakes should be there.
What is wrong with the syntax?
Error:
Stopped because an error was encountered at August 3, 2022 at 12:09:18 (runtime: 0.02 seconds)
UndefinedError: 'input_number' is undefined