I’m making a sensor to detect/inform me how many lights are on in a given light group. I’ve developed the following template sensor that works in the developer tools template engine, however when I go to add it to my config file using the following yaml it returns the error ‘missed comma between flow collection entries’
Is anyone able to help me out? I’m entering the following as the template in my config:
template:
- sensor:
- name: Downstairs_Lights_On
state: {{ expand('light.downstairs_lights') | selectattr('state', 'eq', 'on') | list | count }}
As I said it works fine in the template engine in dev tools but won’t play ball in the config folder!