Global indicator switch for lights in Lovelace

Hi,

is there a possibility in Homeassistent to create a switch or another indicator in Lovelace, which indicates if at least one of my lights are on, or everything is off?

Thx,
Danyo

1 Like

Thx, that’s easy :slight_smile:

Even better: you should use a light group, as it allows more control.

https://www.home-assistant.io/integrations/light.group/

binary_sensor:
  - platform: template
    sensors:
      lights_on:
        value_template: "{{ states.light|selectattr('state','eq','on')|list|count > 0 }}"

Thanks for your answers. Will check them all…