zBernie
(Bernie)
1
When I try to set the date of the input_datetime helper below, I get the following error:
Can someone explain to me how to set input_datetime to the current date?
-Thanks
action: input_datetime.set_datetime
metadata: {}
target:
entity_id: input_datetime.catlink_garbage_start_date
data:
date: "\"{{ now().strftime('%m-%d-%Y') }}\""
Too many quotes…
action: input_datetime.set_datetime
metadata: {}
target:
entity_id: input_datetime.catlink_garbage_start_date
data:
date: "{{ now().strftime('%Y-%m-%d') }}"
Edit: Corrected format string to match what is shown in docs
zBernie
(Bernie)
3
I had screwed that syntax up at some point. But the quotes are correct now and I still get the error.
zBernie
(Bernie)
4
I got it I wound up using:
“{{ now().date() }}”
-Thanks