feat(filter): integrate exclude filter into parseStates and state_changed

Adapter now consults the exclude-pattern list (new `native.excludePatterns`
config option, multi-line string) at two points:

- `parseStates()` skips matching entities entirely. They are not registered
  as ioBroker objects and no state is written. A summary INFO line reports
  the count when the filter dropped anything from a sync.
- The `state_changed` event handler short-circuits matching live updates
  with a DEBUG line, so a filtered entity that still emits state changes
  in HA does not cause any churn in ioBroker.

Patterns are parsed once at adapter start: trimmed, empty lines and lines
starting with `#` are dropped. An empty resulting list means the filter is
inactive — adapter behaviour is then identical to the previous version.

Default config ships with example comments only, so existing installations
see no functional change after the update.
This commit is contained in:
mokusone
2026-05-14 11:40:28 +02:00
parent 9b95ece284
commit 6889664c28
2 changed files with 36 additions and 1 deletions
+2 -1
View File
@@ -252,7 +252,8 @@
"host": "127.0.0.1",
"port": 8123,
"password": "",
"secure": false
"secure": false,
"excludePatterns": "# Glob patterns, one per line. Lines starting with # are comments.\n# Example: filter out all entities prefixed with `iob_` regardless of domain:\n# *.iob_*"
},
"protectedNative": [
"password"