custom-cards / secondaryinfo-entity-row

Custom entity row for HomeAssistant, providing additional types of data to be displayed in the secondary info area of the Lovelace Entities card
172 stars 15 forks source link

time zone #26

Open ronniebee opened 4 years ago

ronniebee commented 4 years ago

Great card! Many thanks!! I have a question, which timezone is being used? I use GMT+1 (local time) but the time being displayed GMT+0:00 (so one hour too early). I changed my ubuntu TZ into:

image

But still no result.. What to do?

hulkhaugen commented 4 years ago

First of all, thanks for this awesome little mod, it's great. I'm also struggle with time zone and formatting. What i'm trying to achieve is using the next_sunset or next_sunrise attributes display, depending on which one comes first, for instance "Sunset at 20:00" or "Sunrise at 06:00". I've not been able to combine if/else-dependent text with attribute data. And also formatting, i'd prefer a short readable "20:00" over "2020-04-13 18:00:00+00:00". This might be me not understanding how to apply the right properties, but this is where i'm at atm. What i've got so far, only full date/time without text:

    secondary_info: >-
      [[ if({entity}.attributes.next_rising > {entity}.attributes.next_setting,
      sun.sun.attributes.next_rising, sun.sun.attributes.next_setting ) ]]
gerliczky commented 4 years ago

It would be really nice to be able to format date/time.

JvdMaat commented 1 year ago

Came here looking for the answer to this exact same question. It's been three years. Did any of you figure it out?

ildar170975 commented 1 year ago

Templating is done by jinja and core HA extensions. Address all your questions to jinja and HA developers.