Skip to content

Analog clock card gets out of sync when page is left open for a while / in background #29598

Open

Description

@UweHeidemann

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

The analog display runs too fast. The longer the page is not completely refreshed, the greater the advance. Both the digital and analog clocks use the same sensor. It seems to get worse when the page is running in the background. Browser: Chrome 145.0.7632.46 (Official Build) (64-bit)
Same behavior in Firefox 147.0.3 (64-bit)

Normal operation:

Image

Safe mode:

Image

Code snippet:

  - type: horizontal-stack
    cards:
      - type: tile
        entity: sensor.date
        show_entity_picture: false
        hide_state: false
        vertical: false
        features_position: bottom
      - type: tile
        entity: sensor.time
        show_entity_picture: false
        hide_state: false
        vertical: false
        features_position: bottom
      - clock_style: digital
        clock_size: small
        show_seconds: true
        no_background: false
        type: clock
        time_zone: Europe/Berlin
        face_style: markers
      - type: clock
        clock_style: analog
        clock_size: small
        time_zone: Europe/Berlin
        show_seconds: true
        no_background: false
        border: true
        ticks: minute
        face_style: markers
        grid_options:
          columns: full

Describe the behavior you expected

All clocks should display the same time.

Steps to reproduce the issue

  1. see code snippet above

What version of Home Assistant Core has the issue?

core 2026.2.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

Chrome 145.0.7632.46 (Official Build) (64-bit)

Which operating system are you using to run this browser?

Windows 11 Pro

State of relevant entities

Problem-relevant frontend configuration

JavaScript errors shown in your browser console/inspector

Additional information

No response

Activity

  1. dcapslock commented on Mar 23, 2026

    @dcapslock
    Contributor

    As the code uses CSS animations I expect that the issues is they are running fast. Perhaps just like swiss railway clocks, the anolog clock could use a stop to go action and reset/calibrate every minute to make sure that it the animations are not running fast/slow. But in the swiss railway clocks the minute hand sticks and then advances, but with the anolg clock everything is smooth. However, a regular calibration point, say every minute, would likely help.

  2. github-actions commented on Jun 21, 2026

    @github-actions
    Contributor

    There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
    Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
    This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

  3. added
    staleThis has been marked as stale by the automated bot
    on Jun 21, 2026
  4. removed
    staleThis has been marked as stale by the automated bot
    on Jun 23, 2026
  5. github-actions commented on Sep 21, 2026

    @github-actions
    Contributor

    There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
    Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
    This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

  6. added
    staleThis has been marked as stale by the automated bot
    on Sep 21, 2026
  7. removed
    staleThis has been marked as stale by the automated bot
    on Sep 24, 2026
  8. changed the title [-]clock card - analog[/-] [+]Analog clock card gets out of sync when page is left open for a while / in background[/+] on Sep 24, 2026
  9. added
    BugCurrent Bug in UI - Extra Attention
    on Sep 24, 2026
  10. shazilkhan commented on Oct 15, 2026

    @shazilkhan

    I can reproduce this on current dev. Cause: _handleVisibilityChange recalculates the negative animation-delay for each hand, but the running CSS animations keep their original start time. So the time since they started is counted twice, and the hands jump ahead by however long the card has been on the page. I measured +16s after one return to the tab and +37s after a second. Restarting the hand animations whenever the delays are recalculated fixes it in my testing. I'd like to open a PR for this.

  11. added a commit that references this issue on Oct 15, 2026
    6d402a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCurrent Bug in UI - Extra Attention

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions