Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Input_datetime.set_datetime not Working

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>