wassy92x / lovelace-digital-clock

A custom digital clock card for Home Assistant
MIT License
96 stars 17 forks source link

Digital Clock Card only updating every hour #40

Open Landshark77 opened 7 months ago

Landshark77 commented 7 months ago

Having an issue where the clock card is not updating. Seems to only be updating about every hour. This occurs no matter which device is being used to present my dashboard -- iPhone, iPad, Fire tablet, Windows.

I have confirmed the time is correct within HA, only the card is not updating.

I'm running:

Here's my yaml:

type: custom:digital-clock
dateFormat:
  weekday: long
  day: 2-digit
  month: long
timeFormat: h:hh a
timeZone: America/Chicago
locale: en
card_mod:
  style: |
    ha-card {
      --ha-card-background: black;
      color: white;
      font-size: 11px;
      text-align-last: left;
    }
Landshark77 commented 7 months ago

Noticed it was just the hour getting updated. Minutes were never updating. Did not like the 'h:hh a' format I was using. After changing to the below yaml, it works.

So maybe the question is why does it accept 'h:hh a' and displays it correctly on the dashboard, but just doesn't update the minute?

type: custom:digital-clock
dateFormat:
  weekday: long
  day: 2-digit
  month: long
timeFormat:
  hour: 2-digit
  minute: 2-digit
timeZone: America/Chicago
locale: en
card_mod:
  style: |
    ha-card {
      --ha-card-background: black;
      color: white;
      font-size: 11px;
      text-align-last: left;
    }
dpmeixner commented 6 months ago

Thanks for the workaround. I ran into this problem, too.