mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-23 06:12:23 +00:00
Allow regexes for filtered_attributes, filtered_cache and filtered_optimistic options (#13047)
* Ensure filtered_attributes and filtered_optimistic are also regex Bring filtered_attributes and filtered_optimistic in line with the newer filtered_cache. All three of them are now regex matches instead of absolute matches. * update tests to use regex ^$ anchors * utils: add filterProperties
This commit is contained in:
1 parent
4a58dbf84c
commit
db021e6711
6 files changed
+25
-20
No files matched your search
+1
-3
@@ -266,9 +266,7 @@ class Controller {
|
||||
}
|
||||
|
||||
// Filter mqtt message attributes
|
||||
if (entity.options.filtered_attributes) {
|
||||
entity.options.filtered_attributes.forEach((a) => delete message[a]);
|
||||
}
|
||||
utils.filterProperties(entity.options.filtered_attributes, message);
|
||||
|
||||
if (Object.entries(message).length) {
|
||||
const output = settings.get().advanced.output;
|
||||
|
||||
Reference in new issue
Block a user