The trigger is a door opening.
I want this helper to be that time when it opens.
What should be the data?
"{{ now().timestamp()|timestamp_custom('%H:%M', true) }}"
1 Like
No you only asked for time.
You can adjust the format of timestamp_custom()
to include the date in the format the input_datetime expects.
%Y-%m-%d %H:%M:%S
Actually, you can just use the timestamp for this:
"{{ now().timestamp() }}"
I assume so, but I donβt use the UI so I donβt really know what format it is expecting.
I tested this and another comment I found somewhere else.
It works in the UI.
This is the other I found:
datetime: β{{ now().strftime(ββ%Y-%m-%d %H:%M:%Sββ) }}β
And @tom_l solution:
β{{ now().timestamp() }}β
Thank you!
1 Like