I try to create a template light:
light:
- platform: template
lights:
lichterkette_10er:
friendly_name: "Annas Lichterkette"
level_template: "{{ states('input_number.spinne_globalbrightness_helper') | int }}"
value_template: "{{ states('input_number.spinne_globalbrightness_helper') | int > 0 }}"
effect_list_template: "{{ state_attr('input_select.spinne_effekt', 'options') }}"
turn_on:
service: input_number.set_value
target:
entity_id: input_number.spinne_globalbrightness_helper
data:
value: "{{ 20 | int }}"
turn_off:
service: input_number.set_value
target:
entity_id: input_number.spinne_globalbrightness_helper
data:
value: "{{ 0 | int }}"
set_level:
service: input_number.set_value
target:
entity_id: input_number.spinne_globalbrightness_helper
data:
value: "{{ brightness }}"
set_effect:
- service: input_select.select_option
target:
entity_id: input_select.spinne_effekt
data:
option: "{{ effect }}"
The template in the beginning renders like this in developer tools:
level_template: "0"
value_template: "False"
effect_list_template: "['steady', 'wave', 'cycle', 'pump', 'string', 'dingdong', 'cascade', 'blink']"
When I validate the configuration, I get this error message in developer tools, that I just do not understand
Configuration warnings
Invalid config for 'template' from integration 'light' at configuration.yaml, line 440: some but not all values in the same group of inclusion 'effect' 'lights->lichterkette_10er-><effect>', got None
What is None? Cant it retrieve the list? As far as I understoot, commas are rendered as list here? Or is the problem with the service call?
The entity is not created/present at the moment…