@Vlavonvidden wrote:
Hi all,
I’m currently looking for a way to clean some of my config files which are pretty cluttered.
I thought of using jinja to create multiple elements at once, using a syntax like this :{% set containers = [0, 1, 2, 3, 4] %} shell_command: {% for container in containers %} - restart_{{container}}: 'curl http://127.0.0.1:8126/container/home-assistant/restart' {% endfor %}
Obviously, since I’m writing this, it’s not working and I haven’t found a solution for now.
Would you know if what I’m trying to achieve is possible, or is it some alternative that could help me achieve something similar ?
Cheers !
Posts: 4
Participants: 3