How is that done?
I have a input_datetime with both time and date, and I get API fail.
“Call-service API error. Error Message: Invalid datetime specified: for dictionary value @ data[‘datetime’]”
[{"id":"4fb106f4.26d9c8","type":"inject","z":"ae8e980a.d3b8f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1530,"y":880,"wires":[["8d1506b4.905c98"]]},{"id":"8d1506b4.905c98","type":"api-call-service","z":"ae8e980a.d3b8f8","name":"","server":"4bbca37b.1700ec","version":1,"debugenabled":false,"service_domain":"input_datetime","service":"set_datetime","entityId":"input_datetime.laddare_vardagsrum_tid","data":"{\"entity_id\":\"input_datetime.laddare_vardagsrum_tid\",\"datetime\":\"{{ ((as_timestamp(now()) | int + 7200) | timestamp_custom('%Y-%m-%d %H:%M:%S', true)) }}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1780,"y":760,"wires":[[]]},{"id":"4bbca37b.1700ec","type":"server","z":"","name":"Home Assistant","addon":true}]
json:
{
"entity_id": "input_datetime.laddare_vardagsrum_tid",
"datetime": "{{ ((as_timestamp(now()) | int + 7200) | timestamp_custom('%Y-%m-%d %H:%M:%S', true)) }}"
}
So I try to set the time two hours ahead.
When I template the… template… it looks correct