I am rather new to Home Assistant and try to create a wake-up light. In a 5 minute span, I want to increase the light to 100%. I thought of doing it this way:
Your automation uses a Device Action which doesn’t support templates.
Change it to a light.turn_on service call which supports templates.
Regarding the template, isn’t the referenced variable’s name lichtInterval as opposed to lightInterval?
In addition, as pointed out by koying, the template is using the wrong index variable. repeat.index is for a script’s repeat whereas loop.index0 is for a Jinja template’s for-loop.
A Device Action tends to represent an entity_id using a long alphanumeric string (1d4cf07b1d9df5946d5f68020b51b7ff). I used the same string in the example above but, for improved legibility, you may wish to change the long string to the human-readable version of your light’s entity_id. My guess it may look something like light.opstaan
In addition, repeat.index starts counting from 1 whereas the list in lichtInterval starts with 0. Therefore you should subtract 1 from repeat.index.
Thank you for getting me on the right path. It is still a big change for me from Domoticz to HA. What I learned today will help me to make more complicated scripts. So again, thanks, also to all others that helped me
P.s. it is the UI that names the entities by ID nowadays. But yes, I will rename it in the script. Thats a good idea.