Why did this automation fire 29 seconds after schedule?

I have an automation with a couple of different time based triggers. This morning my 5:30 am trigger did not actually fire until 5:30:29. It may seem trivial, but I have conditions within the automation that do certain things based on whether the current time is prior to ‘05:30:01’. Meaning, if the trigger fires at 5:30 am, do X. Else do Y.

Any thoughts on why this would have been delayed by 29 seconds?

Are you running Home Assistant in a virtual machine? If so, its system clock may need adjustment.

Hi @123 - Thanks for the suggestion! Since my initial post, I discovered that I have other automations which also ran 29 seconds late today. I was already starting to wonder if it had something to do with my system clock.

HA is running in Docker on a Synology NAS. The Synology is SUPPOSED to automatically sync with an NTP server, but I have wondered for a while if that always works correctly. I have noticed that my 2FA authentication codes fail sometimes until I resync the time - Presumably because the time is off and they are expired.

I just added a scheduled task to resync the time every 2 hours. It’s stupid that I have to do that, but we’ll see if that fixes things…

It’s usually due to the system clock being off.

The only reason I asked if you were using a virtual machine is because complaints about incorrect times are often due to the VM’s clock being off.