I am new to HA and a question about the light entity.
On several websites i see HA tutorials using the light entity for testing automation.
This light entity is missing on default installation.
So i copied the Light-template
into my configuration.yaml file
After restarting i get an error, and i have no clue what is wrong.
The system cannot restart because the configuration is not valid: Invalid config for [light.template]: some but not all values in the same group of inclusion ‘effect’ @ data[‘lights’][‘theater_lights’][]. Got None. (See ?, line ?).
It’s a simple copy paste action, and The yaml ident looks allright to me
My configuration is 2021-7.3 on VirtualBox
Does anyone also had these issues?
What do i wrong?
When i remove line
effect_list_template: “{{ state_attr(‘light.led_strip’, ‘effect_list’) }}”
and the last 7 lines of that file, i have no errors anymore
And i see a entity called “Theater Lights” in the ui.
And the restart is succesfull.
Also other template like “lock” and “fan” can be copied pasted, from here
That field still needs a list to work from and if you don’t have light.led_strip it’s not going to work. Let alone the rest will not work if you don’t have the other entities. It just so happens that this template field requires a list and you’re returning nothing.
If you want it to work, you have to have the entities.
Also, the way you’re going about this is flawed. You’ll never learn the system if you just copy/paste things without adjusting it to your features.
I suggest you explain what you want to do, and then we can help you get there.
@petro, I have the same issue as @jdvries20 - the example Template Light - Home Assistant (home-assistant.io) seems to have a flaw - it only has effect_list_template, but both effect_list and effect_list_template are required to make it working. So how to fix the documentation and example?
Invalid config for [light.template]: [effect_list_template] is an invalid option for [light.template]. Check: light.template->lights->ambivision->effect_list_template. (See ?, line ?).
Invalid config for [light.template]: [effect_list_template] is an invalid option for [light.template]. Check: light.template->lights->ambivision->effect_list_template. (See ?, line ?).
You don’t have a value_template for the on/off state. This is not needed, however it could cause problems if you’re expecting other aspects of the light to work.
option is not a valid variable in set_effect, use effect.
Other than that, it should be working. That error should not appear. My only guess is that it’s an old error based on something you did wrong previously. Check your config after making change #2 (that’s the only required change to make it work). Then check the timestamp on the error and verify that it’s appearing when you do your check config.
Thanks a lot Petro. It still is yielding the same error. I hope I made the right changes. And yep, it yields the error at the very monent I try to restart HA.
Invalid config for [light.template]: [effect_list_template] is an invalid option for [light.template]. Check: light.template->lights->ambivision->effect_list_template. (See ?, line ?).
yes, I did. I created an inpute_select input_select.dining_area_ceiling_light_effects with 4 values - Neutral, Cold, Warm, Night and defined the light template group:
light:
Thanks, I used {{ state_attr('input_select.dining_area_ceiling_light_effects', 'options') }} instead of constant "{{['Neutral','Cold','Warm','Night']}}". Everything works.
I tried removing the |list filter, same result. I also tried copying, pasting and modifying @new-kirte 's example and still yields the same error. It doesn’t even allow me to restart.
I’m on 2021.5.0. When was this effect list template implemented?
By using new-kirte’s example I also get a bad indentation error in the second line.