Hi all,
I am hoping to create a button that sets a datetime helper (input_datetime.date_bottledate) to the date that I pressed a button to track the bottle date. Once this is done I hope to expand it to setting up different trackers of performed tasks.
I have managed to create a “timer” that tracks days since xxx however i am stuck when creating the button to set the date.
Currently I have tried to run a script on button press:
script:
setinput_datetime.date_bottledatetonow:
alias: "12345"
sequence:
service: input_datetime.set_datetime
target:
entity_id: input_datetime.date_bottledate
data:
date: "{{ now().strftime('%Y-%m-%d') }}"
mode: single
However this script is coming back with errors:
The script “12345” (script.script
) is not active because the configuration has errors.
Error:extra keys not allowed @ data['sequence'][0]['mode']. Got None extra keys not allowed @ data['setinput_datetime.date_bottledatetonow']. Got None
.
I am hoping someone can help - I am only new to HA and am trying to get my head around the manual aspect. Thanks in advance!