Sorry for the title; I couldn’t think of a better one.
Can anyone explain to me why this:
repeat:
sequence:
- if:
- condition: template
value_template: "{{ is_state( repeat.item.light , 'on') }}"
then:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: "{{repeat.item.light}}"
for_each: "{{ label_entities('Kitchen Lights') | select('is_state', 'on') | list }}"
results in:
if/condition/0
Iteration 1
[If template renders a value equal to true]
Executed: January 14, 2025 at 3:57:09 PM
Error: In ‘template’ condition: UndefinedError: ‘str object’ has no attribute ‘light’ ??
I have a feeling it has to do with the fact that the error says ‘str object’.
thanks in advanced