Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102856

Variables, loops in configuration.yaml

$
0
0

Hello,

is there anyway to have this in configuration.yaml? if yes, how do I call jinja?

I can run the below code in developer-Template tool but I don’t know how to fit this in yaml

thanks

{%
set suffix = "_sub_doods_latest"
%}
{% 
set cameras = (
  "1_front_door",
  "2_living_room",
  "3_guest",
  "4_utility",
  "5_hallway",
  "6_driveway"
)
%}

{% for camera in cameras %}
  - platform: generic
    name: {{ camera }}
    still_image_url: http://127.0.0.1:8123/local/cctv/{{ camera }}{{suffix}}.jpg
    verify_ssl: false
{% endfor %}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 102856

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>