kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.96k stars 232 forks source link

12:05 pm being displayed as 00:05 pm #887

Open dunxd opened 1 year ago

dunxd commented 1 year ago

When I mouse over my graph, the time shown is 00:nn pm instead of 12:nn pm

image

If I set hour24: true then it shows 12:nn correctly.

craigusus commented 9 months ago

Hi, I am getting the same. I have the following:

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-title-card
        title: Values
        title_tap_action:
          action: none
        subtitle_tap_action:
          action: none
        alignment: center
  - type: horizontal-stack
    cards:
      - type: custom:mini-graph-card
        hours_to_show: 24
        points_per_hour: 1
        entities:
          - sensor.212_value_almost_daily_dividend
        name: Daily Dividend
        icon: a
      - type: custom:mini-graph-card
        hours_to_show: 24
        points_per_hour: 1
        entities:
          - sensor.212_value_own_the_world_in_50
        name: Own The World in 50
        icon: a

With no hour24 stated it defaults to false as per the readme. But as you can see below, when hovering over the data point it is showing as 0:43 pm. It should be 12:43 pm.

image

When adding hour24: true I get the correct time format shown. image