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

Nested Variables #36

Open
WillowMist opened this issue Mar 17, 2021 · 4 comments
Open

Nested Variables #36

WillowMist opened this issue Mar 17, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@WillowMist
Copy link

This isn't a bug report, but a question.

Is it possible to nest variables, both in the caller and the default? I'm guessing it isn't, but I wanted to be sure before I try to find a workaround.

Example:

default:
row1:
- name
- image

With the idea being to call them with [[ row1.name ]]

I'm not expecting it to work, but I wanted to know if I was wrong before I try to figure out how to make it work :)

@WillowMist WillowMist added the bug Something isn't working label Mar 17, 2021
@RomRider
Copy link
Collaborator

That doesn't work unfortunately. Maybe you're better off using lovelace_gen with that kind of use case 😊

@WillowMist
Copy link
Author

Hmm, that has potential. If I'm reading right, I could use lovelace_gen to iterate through sets of variables, and use them to generate decluttering-cards, or am I completely off my rocker?

@RomRider
Copy link
Collaborator

Something like that, or even replace decluttering-card altogether with lovelace_gen for that use case

@WillowMist
Copy link
Author

I can try :) I know nothing about Jinja2, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants