Timebased automations completely out of sync

Hi all!

Since migrating my home assistant instance to HassOS on virtualbox i have a weird issue with time based automations.

I have an automation which turns on all lights in the garden on sunset and an automation which turns them off at 01:00AM.

I also have an automatic backup automation which creates an full snapshot every day at 07:00AM.

When i look at the backup automation trace that has been added in the latest Home assistant release the backup has run at these times:

  • Executed: April 22, 2021, 7:08:56 PM
  • Executed: April 21, 2021, 8:58:27 PM

So it does run everyday but at completely different times.

The automation that turns of the lights at 01:00 did run on these times:

  • Executed: April 23, 2021, 4:03:57 AM
  • Executed: April 22, 2021, 10:36:25 PM
  • Executed: April 21, 2021, 7:21:54 AM

The time on the host machine, HassOs en inside docker is correct but it also doesn’t look like it’s a time or timezone issue.

Anyone seen this before?

Yes - I’ve also been experiencing this exact issue - I commented about this a couple days ago.

[Time trigger automatons fail to trigger timely]

Hello @cor-vo and @mahk8 any resolution (or clues) on this issue?

The issue is definitely in the core of home-assistant. The delay offset seems to be related to the time of day. I suspect a memory leak somewhere that is corrupting the time trigger function. My “time” triggers fire at the same incorrect time everyday but are inconsistent in time offset from hour to hour.

Pretty sad when you can’t rely on “time” for automation triggers.

I found that “state” triggers work properly so that is the workaround until the programmers get to fixing this problem.

Looks like @barberio found the bug behind this issue…

I had the same issue and actually found the problem for me (running HA 2021.8.6 on a 2010 Mac mini via a VirtualBox VM) was the “Paravirtualization Interface” option in the VirtualBox system settings. I had to switch it to “none” and that solved my time issue completely.

5 Likes

Thank you!! Was having this problem and this solved it for me

1 Like

I have a Virtualbox on a MacMini 2010 too. Works like a charm. Thanks.

I am having a similar problem with automations triggering at odd times. But I am running on Windows Hyper-V. rather than VirtualBox. Can anybody think of an equivalent “Paravirtualization Interface” setting in Hyper-V that I could try?

Perhaps related & unresolved: Automations triggering late · Issue #71278 · home-assistant/core · GitHub