To turn off all lights in Home Assistant, create a light group containing every bulb in your home and use the light.turn_off service on that group. For example, a group named "All Lights" allows you to send one command to shut down every connected light simultaneously.

How do I create a group for all lights?

Grouping your lights simplifies your dashboard and makes automation easier. Instead of listing ten different bulbs in a script, you manage one entity. Labels may differ slightly by version, but the general path remains consistent.

  1. Navigate to Settings > Devices & Services.
  2. Select the Helpers tab at the top of the page.
  3. Click Create Helper and choose Group.
  4. Select Light Group from the list of options.
  5. Give the group a name, such as "All House Lights," and select every light entity you want to include.
  6. Save the group to create a new entity, typically named light.all_house_lights.

Once this group is active, you can add a single toggle switch to your dashboard. Toggling this switch to "off" sends the command to every member of the group. This method ensures that you do not have to remember every single lamp or overhead fixture when you leave a room or prepare for sleep.

What is the difference between a group and a scene?

A light group is a collection of devices that act as one. When you turn a group off, every light in that group turns off regardless of its previous state. It is a functional tool for bulk control.

A scene is a snapshot of a specific state. A "Goodnight" scene might turn off the kitchen lights, dim the hallway light to 10%, and lock the front door. While a group only handles the on/off or brightness of similar devices, a scene can coordinate different types of devices across the whole house.

Use a group when you want a simple master switch for all lights. Use a scene when you want to create a specific mood or a complex transition for your evening routine. Scenes are better for creating a calm environment because they can handle gradual dimming rather than an abrupt shut-off.

How do I make a one-click "All Off" button?

A dashboard button provides a physical or digital point of interaction to clear the house of light. This is often more convenient than navigating through several room pages.

  1. Go to your Dashboard and click Edit Dashboard in the top right corner.
  2. Click Add Card and select the Button card.
  3. In the Entity field, search for the light group you created, such as light.all_house_lights.
  4. Set the Action to Toggle or specifically Call Service.
  5. If using Call Service, select light.turn_off and target your light group.
  6. Save the card and place it in a prominent position on your main screen.

Adding this button to a tablet or phone allows you to wind down the home quickly. It removes the mental load of checking every room, helping you transition into a state of rest. You can also assign this button to a physical smart switch or button pressed by hand near the exit of your home.

Can I automate lights to turn off at a certain time?

Automations remove the need for manual intervention. Setting your lights to turn off at a specific hour helps maintain a consistent sleep schedule and ensures energy is not wasted.

  1. Navigate to Settings > Automations & Scenes.
  2. Click Create Automation and select Create New Automation.
  3. For the Trigger, select Time and enter the specific time you wish the lights to go out, such as 23:00.
  4. For the Action, select Call Service and choose light.turn_off.
  5. Select your "All Lights" group as the target.
  6. Save the automation with a clear name like "Nightly Lights Off."

To make this transition gentler, you can add a delay or use a script that dims the lights over 5 minutes before turning them off completely. This gradual change mimics the natural setting of the sun, which may help you feel calmer as you prepare for bed. If you find that the lights turn off while you are still awake, simply adjust the trigger time by 15 or 30 minutes until it fits your natural rhythm.

How do I handle lights that are not in the group?

Sometimes a new bulb is added to the home and is forgotten in the master group. This leads to the frustration of finding one light still on after you have triggered the "All Off" command.

To prevent this, you can use a label or an area-based target instead of a fixed group. In the light.turn_off service call, instead of selecting a specific entity, you can select "All Entities" or target the entire "Home" area. This tells Home Assistant to send the off command to every device categorized as a light, regardless of whether it was manually added to a helper group.

A common misconception is that turning off a group will turn off the physical wall switch. Home Assistant can only control smart bulbs or smart switches. If a light is controlled by a traditional manual switch that has been flipped off, the smart bulb loses power and cannot be turned "on" via software. Ensure your physical switches remain in the on position to allow your digital groups to function.

If you have lights in different zones, such as outdoor and indoor, you may prefer two separate groups. An "Indoor All" group and an "Outdoor All" group allow you to keep security lighting active while you sleep. You can then create a master script that calls both groups if you truly need everything dark.