Use an input to set a value in a script

I create a script that take 2 input_datetime to set the start and end of the holyday mode of my heatpump and then activate the holyday mode, but the script is not working:

here is the script

alias: Mode vacances pompe à chaleur
sequence:

* service: waterkotte_heatpump.set_holiday
data:
start: input_datetime.debut_vacances
end: input_datetime.fin_vacances
* type: toggle
device_id: c5ec0343e5042c6950da7abadf9ca015
entity_id: 1f0169e10b8c0b5973d0141ad37f7437
domain: switch
icon: mdi:island
mode: single

I have this error message

Stopped because an error was encountered at 15 octobre 2023 à 20:58:34 (runtime: 0.03 seconds)
time data ‘input_datetime.debut_vacances’ does not match format ‘%Y-%m-%d %H:%M:%S’

At first i though the format was incorrect (like thh seconds are missing) but then I check the value of my imput_datetime, it shows the date and time with the second, and if I change my imput_datetime for the function now().strftime(’%Y-%m-%d %H:%M:%S’), i’ve got the same error.

the custome integration I use is here: GitHub - pattisonmichael/waterkotte-integration

Anybody can help me ?

In the future, please follow Community Guidline #11 and format your code blocks properly… Also, if you are using a custom integration make sure to include a link to its repository.

start: "{{ states('input_datetime.debut_vacances') }}"
end: "{{ states('input_datetime.fin_vacances') }}"

Thanks for the reply, it works :slight_smile:

I made some corrections of my first post in order to format my code and give the adresse of the repository of the custom integration