hello,
i have an input_datetime set to 1am every day to turn of the light in the living room.
i want to create two buttons, one increasing this input_datetime 15mins (on every button press +15 mins), the other decreasing. i already lerned that i need to call a script to do that, however i was only able to do the first +15min, it is not increasing more…how do i need to edit the script to do so?
service: input_datetime.set_datetime
data:
time: >-
{{ (states('input_datetime.time2sleep') | as_datetime | default(now(), true)
+ timedelta(minutes=15)).strftime('%H:%M') }}
target:
entity_id: input_datetime.time2sleep
thanks for your help!