feat(filter): add cleanupExcludedOnStart option to delete stale objects
When enabled, on each adapter start the adapter scans all existing hass.0.entities.* channels and deletes those whose entity_id matches any of the configured excludePatterns. This complements the existing filter (which only prevents new objects from being created) by also cleaning up objects that were synced before the filter was activated or before the patterns were extended. Safety: - Channels (and any of their sub-states) holding common.custom config (history/influxdb/sql) are kept and a warning is logged so the user can decide manually. - Existing deleteStaleObjects() 50% sanity-guard is intentionally NOT applied here — the user explicitly opted in to the cleanup. - Per-id deletion only logs when verboseFilterLog is also active. Default is false (opt-in). Adds new admin checkbox + i18n keys for all 11 languages (machine translations for non-en/de still pending).
This commit is contained in:
+2
-1
@@ -254,7 +254,8 @@
|
||||
"password": "",
|
||||
"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_*",
|
||||
"verboseFilterLog": false
|
||||
"verboseFilterLog": false,
|
||||
"cleanupExcludedOnStart": false
|
||||
},
|
||||
"protectedNative": [
|
||||
"password"
|
||||
|
||||
Reference in New Issue
Block a user