thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Issue with timestamp class layout #29

Closed chemelli74 closed 3 years ago

chemelli74 commented 4 years ago

I defined a sensor with the proper timestamp as for all the other: | timestamp_custom('%Y-%m-%dT%H:%M:%S.%f+00:00', false) }}

I noticed that adding it as entity works, when instead is evaluated by this row template it doesn't:

image

Am I missing something ?

Simone

chemelli74 commented 4 years ago

If I read correctly the code, is the state representation that needs a tweak for timestamp class:

https://github.com/thomasloven/lovelace-template-entity-row/blob/master/src/main.js#L89

Simone

chemelli74 commented 3 years ago

May I kindly ask for a confirmation of the issue ? ;-)

Thx,

Simone

chemelli74 commented 3 years ago

Suggestion from discord chat is to leverage relative_time.ts from HA frontend

Simone

chemelli74 commented 3 years ago

Fixed with a different approach

Simone