kasper1
(Kasper)
1
Sun conditions support optional offset value ( before_offset
, after_offset
)
I’d like to see the same feature for time conditions.
Example of how it could look like:
condition: time
before: input_datetime.bedtime
before_offset: '-00:15:00'
Current workaround with templates is rather difficult to read.
fedot
2
Especially useful for alarms, like turning on the heating an hour before waking you up 
Hellis81
(Hellis81)
3
Just to give you an option.
This is also a working solution. Not sure if it’s better.
{{ strptime(states('input_datetime.bedtime'), '%Y-%m-%d %H:%M:%S') - timedelta( minutes = 1 ) }}
You could format it like this:
{{ strptime(states('
input_datetime.bedtime'), '%Y-%m-%d %H:%M:%S')
- timedelta( minutes = 1 ) }}
Now you can kind of read input_datetime.bedtime - timedelta
if you read up -> down