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:
+4
-2
@@ -8,5 +8,7 @@
|
||||
"Exclude patterns (one per line)": "Шаблоны исключения (по одному на строку)",
|
||||
"Glob patterns, * wildcard. Lines starting with # are comments. Empty = filter off.": "Glob-шаблоны, * — подстановочный знак. Строки, начинающиеся с #, являются комментариями. Пусто = фильтр выключен.",
|
||||
"Verbose filter logging": "Подробное логирование фильтра",
|
||||
"When enabled, log each excluded entity_id individually during the initial adapter sync (requires loglevel info or debug).": "Когда включено, каждый исключённый entity_id логируется отдельно во время начальной синхронизации адаптера (требуется loglevel info или debug)."
|
||||
}
|
||||
"When enabled, log each excluded entity_id individually during the initial adapter sync (requires loglevel info or debug).": "Когда включено, каждый исключённый entity_id логируется отдельно во время начальной синхронизации адаптера (требуется loglevel info или debug).",
|
||||
"Cleanup excluded entities on adapter start": "Cleanup excluded entities on adapter start",
|
||||
"When enabled, on each adapter start delete existing objects under entities.* whose entity_id matches the exclude patterns. Objects with custom adapter config (history/influxdb/sql) are kept and logged.": "When enabled, on each adapter start delete existing objects under entities.* whose entity_id matches the exclude patterns. Objects with custom adapter config (history/influxdb/sql) are kept and logged."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user