@bleep-io wrote:
I’m following the docs and trying to create a script to set a datetime input to the current date/time but it’s giving me an error:
- service: input_datetime.set_datetime entity_id: input_datetime.date_and_time data_template: datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
Failed to call service input_datetime/set_datetime. Invalid datetime specified: {{ now().strftime('%Y-%m-%d %H:%M:%S') }} for dictionary value @ data['datetime']
Posts: 4
Participants: 4