thomasloven / lovelace-template-entity-row

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

Q: How do I emulate the regular entity `secondary-info: last-updated` feature? #57

Closed nickdos closed 3 years ago

nickdos commented 3 years ago

I'm migrating some entities from regular Lovelace entities to template-entity-rowentities and I'm struggling to show the simple secondary_info: last-changed feature.

I thought this might work but It doesn't: secondary: '{{ relative_time( states[config.entity].last_updated }}'. This is for a cover entity and the second line is just blank using the above syntax.

Thanks in advance.

thomasloven commented 3 years ago

relative_time( needs a closing ).

nickdos commented 3 years ago

Did you read the issue description? I stated I tried relative_time() and it didn't work.

thomasloven commented 3 years ago

I did. And there's clearly a ) missing in it.

image

nickdos commented 3 years ago

OK - I didn't understand your answer. I thought "needs a closing" was equivalent to "needs a closure" (in the coding sense) and thus you were saying insert relevant code in here.

thomasloven commented 3 years ago

No worries.

Did a ) help?

nickdos commented 3 years ago

Yes, the missing ) was the problem. I'm too used to using an IDE it seems - I wish LoveLace editor had syntax checking and highlighting. Sorry for the confusion.