Disclaimer - I’m new to HA and have been following Youtube videos for my various configs.
I created a lights counter which basically tells me how many lights are on in my house. all my lights are hue lights and below is the YAML code that I used.
{{ states.light
| rejectattr('attributes.is_hue_group', 'true')
| selectattr('state', 'eq', 'on')
| list | count }}
So far everything was working fine until I bought and Installed a Reolink PoE Doorbell camera. and now even though all my hue lights are turned off, the counter shows 1 light turned on. below is the entity of the light which is on.
I’ve been trying to exclude this from the YAML code so it does not pick up this specific entity when checking if my lights are turned on or off. But after multiple trials, I cannot figure out the line of YAML code that I need to include so make this happen. hence, came here asking for help.
thanks in advance.