Problem statement
When users target entities through an area, floor, or label, there is no way to refine the resolved set. If a user wants to trigger on all current and future motion sensors in the living room except one, they can't. The same applies to actions: turning on all lights in the kitchen except two is not possible today. Users who need this level of precision must either list every entity individually, losing the dynamic benefits of area or label targeting, or accept a target that is broader than intended.
Community signals
- This Discord conversation on the new triggers and conditions discusses how useful the target picker would be on the entity state trigger, with exclusion as an implied need.
- 9 out of 189 (~5%) users who have provided feedback on purpose-specific triggers and conditions have specifically asked for this feature.
- This feature request specifically asks for the ability to exclude entities from targets. This Discord message does the same.
Scope
In scope
- Allowing users to un-select individual entities from the resolved entity list within a target
Not in scope
- Introducing a rule-based or filter system with arbitrary AND, OR, and NOT conditions
- Rolling out the target picker to triggers and conditions that do not yet support it (see opportunity 2, blocked by this one)
- Wildcard-based targeting
Foreseen solution
Within the tree view of which exact entities are being targeted, the user can choose to exclude some of them by unticking the entity. The exclusion is stored and persists as the resolved target changes over time, for example when entities are added to or removed from an area.
This is what it will look like (full design available here):
When clicking through to the target details, the user will see this:
The excluded entities will be stored in the YAML so that this feature is also available to YAML-only users. This is what the configuration shape will be:
target:
area_id:
- living_room
- bedroom
exclude:
entity_id:
- light.living_room_pendant
- light.bedroom_left_bedside_lamp
The shape of exclusions in the YAML is intentionally similar to targets. This way we can easily expand into target-based exclusion in the future without breaking changes if we want to.
Because users can move entities in and out of areas freely, we may end up with "dangling" exclusions. These will be flagged in the UI:
Risks & open questions
- How do we handle the dynamic nature of exclusions over time? If a user excludes an entity from an area target and that entity is later moved out of the area and then back in, does the exclusion persist or reset? We need a clear and predictable mental model here.
Appetite
2 weeks. This should be a fairly simple change with some dependency between frontend and core.
Execution issues
No response
Decision log
Problem statement
When users target entities through an area, floor, or label, there is no way to refine the resolved set. If a user wants to trigger on all current and future motion sensors in the living room except one, they can't. The same applies to actions: turning on all lights in the kitchen except two is not possible today. Users who need this level of precision must either list every entity individually, losing the dynamic benefits of area or label targeting, or accept a target that is broader than intended.
Community signals
Scope
In scope
Not in scope
Foreseen solution
Within the tree view of which exact entities are being targeted, the user can choose to exclude some of them by unticking the entity. The exclusion is stored and persists as the resolved target changes over time, for example when entities are added to or removed from an area.
This is what it will look like (full design available here):
When clicking through to the target details, the user will see this:
The excluded entities will be stored in the YAML so that this feature is also available to YAML-only users. This is what the configuration shape will be:
The shape of exclusions in the YAML is intentionally similar to targets. This way we can easily expand into target-based exclusion in the future without breaking changes if we want to.
Because users can move entities in and out of areas freely, we may end up with "dangling" exclusions. These will be flagged in the UI:
Risks & open questions
Appetite
2 weeks. This should be a fairly simple change with some dependency between frontend and core.
Execution issues
No response
Decision log