Skip to content

Apply exclusions config to entity inventory#1

Open
ctbjdm wants to merge 1 commit into
klmarlowe:mainfrom
ctbjdm:fix-exclusions-not-applied
Open

Apply exclusions config to entity inventory#1
ctbjdm wants to merge 1 commit into
klmarlowe:mainfrom
ctbjdm:fix-exclusions-not-applied

Conversation

@ctbjdm
Copy link
Copy Markdown

@ctbjdm ctbjdm commented May 3, 2026

The script reads the exclusions config but never applies it. Domain, pattern, area, and entity exclusions are silently ignored, so the entity inventory always lists every entity regardless of config.

Fix: filter self.states once after fetch, using the existing _should_exclude_entity() method. All downstream functions (_count_entities_by_domain, generate_entity_inventory, etc.) work on the filtered list automatically with no further changes.

Adds an "Excluded N entities (X -> Y)" log line so you can see at runtime how many entities your config filtered out.

The script reads the `exclusions` config but never applies it. Domain,
pattern, area, and entity exclusions are silently ignored, so the entity
inventory always lists every entity regardless of config.

Fix: filter `self.states` once after fetch, using the existing
`_should_exclude_entity()` method. All downstream functions
(`_count_entities_by_domain`, `generate_entity_inventory`, etc.) work
on the filtered list automatically with no further changes.

Adds an "Excluded N entities (X -> Y)" log line so you can see at runtime
how many entities your config filtered out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant