Keeping Home Assistant Lights in Sync: A Better Toggle Solution

Posted on Oct 31, 2025

If you’ve ever tried to toggle multiple lights in Home Assistant with a single button, you’ve probably run into the annoying “out of sync” problem. You press the button, expecting all lights to turn on together, but instead one turns off whilst another turns on because they were already in different states. Frustrating, right?

The Problem with Toggle

The issue is simple: the toggle command just flips each light’s current state. If Light A is on and Light B is off, toggling both will leave Light A off and Light B on. They’re still out of sync!

The Solution: Master and Follower

Instead of blindly toggling, we need to check the state of one “master” light first, then explicitly turn all lights ON or OFF together based on that master’s state. This keeps everything perfectly synchronised.

Get the Blueprint

Open your Home Assistant instance and show the blueprint import dialogue with a specific blueprint pre-filled.

Or view the blueprint directly on GitHub.

The Blueprint

Here’s a Home Assistant blueprint that solves this elegantly:

blueprint:
  name: Synchronized Light Toggle
  description: Toggle multiple lights in sync using a master light to determine the target state
  domain: automation
  input:
    master_light:
      name: Master Light
      description: The light that determines the state for all lights
      selector:
        entity:
          domain: light
    follower_lights:
      name: Follower Lights (Optional)
      description: Additional lights that will follow the master light's state
      default: []
      selector:
        entity:
          domain: light
          multiple: true
    trigger_entity:
      name: Trigger
      description: What triggers this automation (button, switch, etc.)
      selector:
        entity: {}

trigger:
  - platform: state
    entity_id: !input trigger_entity

action:
  - choose:
      # If master light is ON, turn everything OFF
      - conditions:
          - condition: state
            entity_id: !input master_light
            state: "on"
        sequence:
          - service: light.turn_off
            target:
              entity_id: !input master_light
          - service: light.turn_off
            target:
              entity_id: !input follower_lights
      # If master light is OFF, turn everything ON
      - conditions:
          - condition: state
            entity_id: !input master_light
            state: "off"
        sequence:
          - service: light.turn_on
            target:
              entity_id: !input master_light
          - service: light.turn_on
            target:
              entity_id: !input follower_lights

How It Works

  1. Check the master light’s state - Is it currently on or off?
  2. If master is ON → Turn all lights (master + followers) OFF
  3. If master is OFF → Turn all lights (master + followers) ON

Simple! No more guessing, no more lights getting out of sync.

How to Use

  1. Click the import button above to add the blueprint directly to your Home Assistant
  2. Create a new automation from the blueprint
  3. Select your master light (usually the main light in the room)
  4. Add any follower lights (as many as you need)
  5. Choose your trigger (a button, switch, or any entity state change)

Now when you trigger the automation, all lights will always stay in sync!

Why This Works Better

Unlike toggle, this approach is deterministic. The master light always tells the followers what to do. Even if someone manually turned one light off, the next trigger will sync everything back up based on the master’s state.

Perfect for:

  • Room scenes with multiple lights
  • Button/switch controls
  • Voice command integrations
  • Wall switch replacements

No more light chaos!