royto / logbook-card

Logbook card for Home Assistant UI Lovelace
GNU General Public License v3.0
203 stars 9 forks source link

error date #107

Closed NJPYY closed 8 months ago

NJPYY commented 9 months ago

Describe the bug The start and end times displayed on the card are inconsistent with HA's own history WechatIMG3731

WechatIMG3729

royto commented 9 months ago

Hello, do you have a user time settings like in #101 ?

NJPYY commented 8 months ago

Hello, do you have a user time settings like in #101 ?

No, but it doesn't seem to be a time zone issue, as the time difference is over 20 days

NJPYY commented 8 months ago

All time displays in HA are correct, only this card is incorrect

royto commented 8 months ago

Are you using a custom date format? Can you paste the configuration of the card ?

NJPYY commented 8 months ago
cards:
  - type: grid
    view_layout:
      grid-area: alarm
    square: false
    columns: 1
    cards:
      # 告警记录
      - type: custom:logbook-card
        desc: true
        entity: input_text.wen_du_chuan_gan_qi_zi_yan_gao_jing_wen_ben
        scroll: true
        date_format: YYYY-MM-dd hh:mm:ss
        hidden_state:
          - ok
          - 未知
          - None
          - unavailable
        title: 告警记录
        history: 180
        max_items: 500
        no_event: 暂无告警
        show:
          state: true
          duration: false
          start_date: true
          end_date: false
          icon: false
          separator: false
          entity_name: true
        card_mod:
          style: |
            .card-content-scroll {
                max-height: 76vh !important;
            }
NJPYY commented 8 months ago

It was normal for some time before, whether the card had a problem with the February date processing?

NJPYY commented 8 months ago

Snipaste_2024-02-29_16-31-24

Sorry!!!