probably because ‘after’ has been removed? Not sure if that’s true for template/condition, but for sure for platform: time.
I have a similar problem, my automation doesn’t work anymore. It used to work with after:, now I changed it to at: and it still doesn’t work (syntax error)
alias: ‘open gate at 8.00’
initial_state: false
trigger:
platform: time
at: ‘08:00:00’
Strange enough, my problem suddenly went away.
Another automation was apparently broken that had been working before, too, but as I don’t use that anymore I just commented it out and now everything is back to normal.
Sometimes one should probably stick to ‘never change a running system’
Interesting. I just triggered my front door to lock from the front end and then unlocked it from the front end. The automation then triggered and locked the door.
I then went up and manually unlocked the door and it shows the event in the logbook “Front Door Changed to Unlocked” . Right after that it says “LockFrontDoorNight Triggered” but the lock is still unlocked so it never actually triggered the locking.
So there is something wonky with the state detection going on if I manually unlock the door.
alias: LockFrontDoorNight
trigger:
platform: template
value_template: “{% if is_state(‘lock.front_door_lock_locked’, ‘unlocked’) %}true{% endif %}”
condition:
condition: or
conditions:
- condition: time
after: ‘21:00’
- condition: time
before: ‘08:00’
action:
service: lock.lock
entity_id: group.all_locks
The below is one of mine. You can also refer to it.
alias: Prince Room Veranda Auto Light
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d0001548730
condition:
condition: or
conditions:
- condition: sun
after: sunset
after_offset: “-0:30:00”
- condition: sun
before: sunrise
before_offset: “0:30:00”