Closed rarroyo6 closed 5 years ago
As described in the issue template, issues missing the required info will be closed. Please open a new issue, fill in as much as you can, and do not remove anything in the template.
Fixed issue so the bot won't close: "do not remove anything in the template"
never mind, you made a new one
Is your feature request related to a problem? Please describe. Right now the header clock updates every 60 seconds based on the time the page was loaded. This causes the clock to be off sync with the computer clock. If several tablets are running lovelace with compact-custom-header, their header clock gets updated at different times.
Describe the solution you'd like I propose making the following changes to "compact-custom-header.js": After line 1027 add the line:
let seconds = date.getSeconds();
Then change line 1041 from:window.setTimeout(() => updateClock(clock, clockFormat), 60000);
to:window.setTimeout(() => updateClock(clock, clockFormat), (60 - seconds) * 1000);
This will cause the clock to update at '00' seconds, causing it to change in sync with the computer clock, and with all the other tablets.