Was trying to figure out why all my sunset/sunrise automations had suddenly gone wonky. Then I noticed the time sensor it out of whack and seems to have been frozen!
Have rebooted HA but no help.
I don’t have any records of my automations being triggered (although I can see them being triggered).
It smells like a timezone problem. If I look at my outside temperature sensor, it follows the expected profile except that the overnight low happens at around 2am instead of the actual 7am. The time on my laptop and the time on HA are off by 4:43
I made sure my TZ was set correct. Even changed it to a “bad” one and observed the time shift (but still 5 hours off)
Make sure that the NTP packets are allowed through your firewall both ways.
It is on port 123, but I can’t remember on which protocol. I think it is TCP.
Also make sure that if you run in a VM that the hypervisor provide a good RTC emulation.
Real Time Clock drift is a common problen in a hypervisor.
This instance has been running on the same in-home WiFi + routers for several months without any issues. Looks like the problem started when we had a power outage Sat morning.
My HA Pi4 is on a UPS and I shut it down cleanly. My router & modem are also on a (different) UPS and they didn’t go down.
Yes, and that’s how I solved my problem (by manually setting the time) but it always came up with the right time after a reboot, except those last few times.
My laptop has the correct time and can access NTP servers without problems.