Sun.sun elevation stuck, not updating

I recently switched my HA server from a docker install (Umbrel node) to a VirtualBox VM (an old MacMini). A few odd things are happening but the most frustrating is sun.sun elevation refuses to update unless I manually reload the entity from the Settings > Devices & Services page.

Sun elevation was working as expected in my old docker instance (e.g: updating value every few minutes around dusk/dawn etc). but elevation is not updating at all, any time of day, in the new VM setup.

The only major change was going from version 2022.11 to 2023.3 – the VM install was fresh, and installed from a backup of the docker.

Any suggestions were to resolve this? Other information from the Sun is updating (Next Setting, Next Rising etc.) but not elevation! Thanks in advance.

Did you set a timezone? I know that changed in 2022.12
Also check if your location is set there

1 Like

Hi – thanks for the suggestion – I tried all the time zone / location based stuff, plus numerous restarts / VM reboots and yaml cleanses etc. No impact sadly.

Meanwhile … I think I got sun elevation working again? I’ll report back in a day or so if true, but I deleted the HA database file, did a complete VM reboot and so far it’s updating values as I would expect. Via ssh / CLI:

</s> <s>cd config</s> <s>rm home-assistant_v2.db</s> <s>

I did not copy the database file from my old install, so I don’t know if this problem arose from the migration or what.

Nope. Elevation values updated during the afternoon but has been frozen around 9Deg well past sunset.

Fixed. Here is the root cause of the problem and the solution:

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

System > Acceleration > Paravirtualization Interface = None

Time triggers and sun triggers are now working as expected.

It might be of interest for you to review the following topic which takes a deep-dive into how that parameter’s value may affect the clock. I think if you start from this post and continue from there it will reveal that the user’s problem with clock-drift (VM on an iMac) was fixed by setting Paravirtualization to “Legacy”.

If “None” works for you then all’s well but if you start noticing clock-drift then keep that topic’s discussion in mind.

1 Like

@123 Good point – & thanks for bringing it up – will definitely bear in mind.