I have an automation which should be enabled only in a certain time of day which spans over midnight.
Config looks like this (configured via frontend):
condition: time
after: '22:00:00'
before: '06:00:00'
It doesn’t seem to work and the trace gave me this:
after:
__type: <class 'datetime.time'>
repr: datetime.time(22, 0)
now_time:
__type: <class 'datetime.time'>
repr: datetime.time(20, 57, 58, 789787)
before:
__type: <class 'datetime.time'>
repr: datetime.time(6, 0)
result: false
Documentation states that the config should be valid: Time condition windows can span across the midnight threshold if both after
and before
keys are used.
What am I doing wrong here?