Smart Home Assistant

Home Assistant Exclude Target: Skip Lights and Areas in Automations

SepehrBy Sepehr· 25 November 2026· Updated 25 November 2026· 4 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Warm living room with a lit table lamp and pendant light glowing in the adjoining dining area beyond the doorway

Key takeaways

  • Home Assistant 2026.11 adds an Exclude target option, so one floor or area target can skip chosen entities, devices, areas or labels.
  • In YAML, put an exclude block inside target using the same keys: entity_id, device_id, area_id, floor_id and label_id.
  • An entity removed by an area, device, floor or label exclusion cannot be re-included on its own; remove the exclusion instead.
  • Exclusions are re-evaluated each run, so a light added later to an excluded area is skipped without editing the automation.
  • Use a label such as keep_on for exceptions that change often, then exclude that label once.
On this page[tap to expand]

A Home Assistant exclude target lets an automation or script act on a whole floor, area or label while skipping chosen entities, devices or areas. Added in 2026.11, it replaces long entity lists and "choose" workarounds. You can set it in the editor or with an exclude block in YAML.

The classic example is "turn off everything downstairs except the kitchen". Before 2026.11 you either listed every light by hand or built conditions around the gaps. Now the exclusion is part of the target itself. For the wider release, see our Home Assistant 2026.11 overview.

What do you need before you start?

  • Home Assistant 2026.11 or later. The exclude option does not exist in earlier versions, so update first and check Settings, About.
  • Areas, floors or labels set up. Exclusions work best when the thing you target is a group such as a floor. If your devices are not yet assigned to areas, do that first; our entity naming guide for 2026.11 covers how names and areas now fit together.
  • A light, switch or other entity that supports the action. The examples use light.turn_off, but the same target block works with other actions.

Step 1: Create the automation and add a broad target

Go to Settings, Automations & scenes, create a new automation and add an action such as Light: Turn off. Under Targets, choose the broad group you want, for example the floor called Ground floor.

Home Assistant documents that targets accept entities, devices, areas, floors and labels. Starting broad is the point: you describe the rule once and let exclusions carve out the exceptions.

Step 2: Select Exclude target and pick what to leave out

Next to Add target, select Exclude target, then choose the kitchen area, a single device, or a label. The exclusion appears below the targets it affects, with a count of how many entities it removes, so you can see at once whether it did what you expected.

An exclusion applies to all targets in that trigger, condition or action, not just one of them. If you want different exceptions for different targets, split them into separate actions.

Step 3: Exclude individual entities from a target's details

If you only want to drop one or two entities that a target covers, open the target's details, clear the checkbox next to each item to leave out, and select Apply. Tick the box again and apply to bring it back.

One limit catches people out. An entity removed by an area, device, floor or label exclusion cannot be re-included on its own. Remove that exclusion instead, then re-add the entity.

Step 4: Write the same thing in YAML

Open the automation in YAML mode and you will see the exclusion as an exclude block inside target. It uses the same keys as target: entity_id, device_id, area_id, floor_id and label_id, each taking one ID or a list. Use IDs, not names.

alias: "Downstairs lights off at bedtime"
triggers:
  - trigger: time
    at: "23:00:00"
actions:
  - action: light.turn_off
    target:
      floor_id: ground_floor
      exclude:
        area_id: kitchen
        label_id: night_light

This switches off every light on the ground floor except those in the kitchen and anything labelled night_light. The exclude block cannot use all or none, cannot contain another exclude, and is not a valid target on its own, so it must sit alongside at least one real target.

Step 5: Use a label for exceptions you will change often

Hard-coding the kitchen into the automation is fine until the exceptions move. A label is easier to maintain: create one called, say, keep_on under Settings, Areas, labels & zones, then exclude that label.

From then on, keeping a lamp out of the routine means applying the label to it. You never touch the automation. It pairs well with the goodnight script for the whole house, where a hallway or landing light often needs to survive the shutdown.

Step 6: Check for exclusions that do nothing

Exclusions are re-evaluated every time the trigger, condition or action runs. If you exclude an area and later add a light to it, that light is left out automatically.

If an exclusion matches nothing in your targets, Home Assistant lists it under Exclusions with no effect, where you can remove it. Check that section after renaming areas or moving devices, because a stale exclusion is the usual sign something has changed.

Do groups work with exclude in Home Assistant?

It depends on the group type. Excluding a regular group excludes only the group entity, not its members, so exclude the members, their area or their label if you want them left alone.

Old-style groups, with entity IDs starting group., behave differently by context. In actions, the group, its members and any nested groups are all excluded. In triggers and conditions, only the group entity is excluded, so exclude the members separately.

Why is my excluded light still turning on or off?

The most common cause is that the light is reaching the automation through a second route. Another action or a different target in the same automation may name it directly, and an exclusion only applies to the targets in the trigger, condition or action where it is set.

Other causes: the exclusion uses a name where YAML needs an ID; the light belongs to a group excluded by the wrong group type (see above); or a different automation, scene or script is controlling it. Open the light's logbook entry to see which automation acted.

What to do next

Try replacing one existing long entity list with a floor target plus an exclusion, and compare the YAML. Shorter is the benefit; keep the automation readable. For blinds, the same pattern works with covers: see our blinds automation guide and exclude the bedroom from the morning open.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

What does exclude target do in Home Assistant?
Exclude target in Home Assistant lets a trigger, condition or action cover a broad target, such as a floor, area or label, while leaving out specific entities, devices, areas, floors or labels. It arrived in 2026.11 and works in both automations and scripts. In the editor you select Exclude target next to Add target; in YAML you add an exclude block inside target using the same keys. The big benefit is maintenance: an exclusion is re-evaluated each time the automation runs, so a light added later to an excluded area is skipped without any edit. The caveat is that an exclusion applies to every target in that trigger, condition or action, so if you need different exceptions for different targets, split them into separate actions rather than expecting per-target control.
Do I need Home Assistant 2026.11 to use exclude targets?
Yes. The exclude option for targets was introduced in Home Assistant 2026.11, so earlier versions do not have the Exclude target button in the editor and will not understand an exclude block in YAML. Check your version under Settings, About, and update through the usual process before editing automations. If you write YAML on a newer install and later restore an older backup, an automation using exclude may stop working as written, so keep that in mind if you roll back. After updating, nothing changes in existing automations; exclusions only appear where you add them. Take a backup before editing important automations so you can compare the old and new versions if something behaves unexpectedly.
Can I exclude a single light from an area target?
Yes, and there are two ways. In the editor, open the area target's details, clear the checkbox next to the light, and select Apply; tick it again to include it later. Alternatively, add the light as an Exclude target, or put it in the exclude block with entity_id in YAML. One rule to remember: if an entity is removed by an area, device, floor or label exclusion, you cannot re-include it on its own, so remove that wider exclusion first. For lights you move in and out of routines often, a label such as keep_on is easier, because you apply the label to the light instead of editing the automation each time.

Sources

Sources verified 2026-11-25

  1. Home Assistant — Automation targets: Excluding targets and Targets in YAML
  2. Home Assistant — 2026.11 release notes
  3. Home Assistant — Script syntax: targets in service calls
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading