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

whitespace indentation for macros solution #21

Open
lmamakos opened this issue Oct 17, 2020 · 0 comments
Open

whitespace indentation for macros solution #21

lmamakos opened this issue Oct 17, 2020 · 0 comments

Comments

@lmamakos
Copy link

Since you can embed JSON with YAML files, one solution is to generate the equivalent JSON representation of the data structure that YAML would produce. Since the JSON structure is insensitive to indentation, this appears to be a solution to using macros in a generalized way.

See my post https://community.home-assistant.io/t/fun-with-lovelace-gen-and-jinja2-macros-to-avoid-whitespace-indentation-problems/236427 for an example.

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

1 participant