Hi out there.
in my configuration yaml i have a rest command:
shelly_set_on_with_time:
url: 'http://{{ ip }}/relay/0?turn=on&timer={{ settime }}'
in a script i want to call now the rest url:
service: rest_command.shelly_set_on_with_time
data:
ip: xxxxx
settime: >
{% (float(states("input_number.irrigation_bewaesserungszeit_ventil_1"))) %}
And here i get the following error:
Message malformed: template value should be a string for dictionary value @ data[‘sequence’][0][‘data’]
But if im am putting the template directly in the configuration yaml it works:
shelly_set_on_with_time:
url: 'http://{{ ip }}/relay/0?turn=on&timer={{ (float(states("input_number.irrigation_bewaesserungszeit_ventil_1"))) }}'
So does someone know why this template is not working in a script?
Many Thanks for help