Input_datetime with only date doesn’t work

Hello everyone,

I try to use without success the input_datetime integration with the following entity in my homeassistant/input_datetime.yaml file

rcdb_stop:
has_date: true
has_time: false

The execution of the following action in a automation failed with the error below
Invalid time specified: 2025-04-13 for dictionary value @ data[‘time’]. Got None

</>
data:
time: “{{ now().strftime(‘%Y-%m-%d’) }}”
target:
entity_id: input_datetime.rcdb_stop
action: input_datetime.set_datetime
</>

Home Assistant core version: 2025.4.1

I use without pronlem other input_datetime entities but with the following attributs
has_date: false
has_time: true

Thanks for your help
Jac

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

If your entity is date-only you can’t use the time configuration variable under data because you’re not setting a time… you need to use date, because you are setting a date.

Thanks for your information.
You’re right it’s better with a date instead a time in the data.
Jac