But it’s not working, where did I mess up?
Currently {{ (states.switch | rejectattr('attributes.light.lamp_left', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.light.lamp_right', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.light.hall', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.switch.bedroom', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.switch.kitchen', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.switch.lounge', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.switch.bath_left', 'defined') | selectattr('state', 'eq', 'on') | list | count)+(states.switch | rejectattr('attributes.switch.bath_right', 'defined') | selectattr('state', 'eq', 'on') | list | count) }}
lights are on!
Oh man I can’t tell. But, deductive reasoning. Remove half, see if that works. If it does, dive into the other half, otherwise dive into this one. Keep removing half until you found the problem
This man binary searches