Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference {entity} inside conditional? #20

Closed
JonGilmore opened this issue Jan 20, 2020 · 5 comments
Closed

reference {entity} inside conditional? #20

JonGilmore opened this issue Jan 20, 2020 · 5 comments

Comments

@JonGilmore
Copy link

It appears we're not able to reference {entity} inside of a conditional. Would we be able to enhance this card to support this? For example, this doesn't work:

secondary_info: '[[ if({entity}.attributes.years_at_next_anniversary == "undefined", "", {entity}.attributes.years_at_next_anniversary) ]]'
@majkers
Copy link

majkers commented Mar 3, 2020

Same for me and I neeed it very badly. Could You please fix it?

@Berserkir-Wolf
Copy link

+1 for this as well. Just throws missed comma between flow collection entries.

@ForumHulp
Copy link

After hours of testing found the same problem, please solve this problem

@ed-holland
Copy link

+1 from my side also. It would become more consistent.

@JonGilmore
Copy link
Author

For the people that are following this issue, I ended up ditching this card and opting for lovelace-template-entity-row instead. This ended up being a better solution for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants