Grok made me the following condition and im wondering if its valid:
value_template: >
{{ state_attr('calendar.gelbe_tonne', 'start_time') is not none and now() >=
(state_attr('calendar.gelbe_tonne', 'start_time') | as_datetime -
timedelta(hours=12)) and now() <= (state_attr('calendar.gelbe_tonne',
'start_time') | as_datetime + timedelta(hours=8)) }}
So this condition should pass if the calendar event is between 12 hours before it starts and 8 hours after.
Sounds right?