I would like to set the time of a helper in a script depending on the weekday. I can’t seem to find the approach to this. My current attempt is as follows:
I think the time needs to be in the format “09:00:00”.
Also you could use the binary workday sensor in your expression which would give you the ability to allow for holidays as well as weekends (which is what I assume day 6 & 7 are).
Thanks, yes the helper is set to only time. Unfortunately, I am still getting the error posted above. For reference, the full yaml for your suggestion is as follows:
service: input_datetime.set_datetime
target:
entity_id: input_datetime.jal_oeffnungszeit_morgen
data:
value: 0{{ '9' if now().weekday() in (6,7) else '8' }}:00:00