Time is fubar, any suggestions (not Time Zone or Location)

So my host log is literally filled with the following:

Mar 05 22:20:43 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:21:46 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:22:33 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:23:39 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:25:02 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:26:28 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:27:51 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:29:15 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:30:41 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.
Mar 05 22:32:05 homeassistant systemd-resolved[257]: Clock change detected. Flushing caches.

And whatever is causing this, has the knock on effect of breaking all of my time triggered automations (time, sun elevation etc.).

Any ideas where I can start fixing this? Running HA Core 2023.3.1 & HS OA 9.5 in VirtualBox 6.1 on a MacMini running OSX10.13.6 … this has had me stumped for a couple days now.

As a test example, I created a very basic automation using the Automation UI:

alias: Time Trigger Check
description: ""
trigger:
  - platform: time
    at: "22:42:20"
condition: []
action:
  - service: notify.mobile_app_iphone13
    data:
      message: Time {{ now().strftime("%H:%M:%S:%s %Y.%m.%d") }}
mode: single

This sends a notification to my phone at a specific time. If I trigger the notification manually, the phone gets the message instantly. If I leave the automation to send the notification, the messages are sent anywhere from 40~90 seconds delayed, and often not sent at all. The timestamp within my message is also completely unrelated to the Trigger time nor the time my phone received the message. In this case, the Trigger time was 22:42:20 and the timestamp in the message was 22:43:05. My phone received the message around 22:44.

Case in point, something has borked HA’s clock and I’m baffled as to what. Cheers!

UPDATE #2: Here is the root cause of the problem and the solution:

https://github.com/home-assistant/core/issues/71278

I needed to make a change to the default VirtualBox machine settings:

System > Acceleration > Paravirtualization Interface = None

Time triggers and sun triggers now working as expected.

UPDATE: There is some issue specific to my VirtualBox / MacMini setup. I thought it might be a dead PRAM battery (changed for a new one) but no joy.

I moved the Home Assistant VM over to my mac laptop (using VirtuaBox v7, instead of v6) and had zero issue with time triggers. Instead of wasting more energy on this, I booted up another macMini with Ubuntu 22.04 installed + VirtualBox 6.1 and ran a backup of my Home Assistant rig: Time triggers are working OK now.

Still no idea what caused the original issue.

I’m stumbling my way through the same symptoms, almost exactly, except that I’m running on VMWare instead of VirtualBox. In my stumbling I’ve disabled all processor virtualization engine options; “Virtualize Intel VT-x/EPT or AMD-V/RVI”, “Virtualize CPU performance counters”, and “Virtualize IOMMU (IO memory management unit)”.

Still no luck. Does anyone have an idea of a similar fix for VMWare? Thanks.

1 Like

Hi,
I just found something that looks like the solution.

take a look here and give us a feedback, if you do not mind :slight_smile:

My automations with set time triggers always trigger later than requested

:crossed_fingers: