rejuvenate / lovelace-horizon-card

Sun Card successor: Visualize the position of the Sun over the horizon.
MIT License
476 stars 35 forks source link

Version 1.0.0 does not refresh in chromium browser #66

Open nawonpl opened 1 year ago

nawonpl commented 1 year ago

Version 1.0.0 does not refresh in chromium browser (FullPageOS). In Safari everything works, including the color of the moon

tjorim commented 1 year ago

Try to clear your cache.

nawonpl commented 1 year ago

it didn't work

v1k70rk4 commented 1 year ago

It updates flawlessly for me in both Chrome and Edge.

SiriosDev commented 1 year ago

in chrome 114.0.5735.199, after clearing cache reload (right click on reload button with inspection menu opened) worked

avataar commented 1 year ago

@nawonpl, what exactly do you mean by "does not refresh":

nawonpl commented 1 year ago

I see a new version with the moon but neither the sun nor the moon moves

avataar commented 1 year ago

So it has nothing to do with the browser cache. I suspect Chromium on FullPageOS is heavily optimized in some way that interferes with the refresh mechanism of the card. The card uses window.setTimeout to schedule the refresh in case anyone wants to debug this.

avataar commented 1 year ago

Please try lovelace-horizon-card.zip together with adding this to the card config:

refresh_method: hass

It will force an alternative refresh method that relies on HA sending state change events. Note that the card has no control over when HA will send such an event. On a busy production installation it should happen relatively often, on an almost empty test one I have it happens every 8 minutes or so. Also note that the refresh period setting still applies (default 60s) so for example if HA sends state change events every 10 seconds the card won't update until the refresh period has passed.

scinos commented 1 month ago

Isn't this fix in master ?