File tree Expand file tree Collapse file tree 4 files changed +33
-4
lines changed
Expand file tree Collapse file tree 4 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 117117 </ label >
118118 </ div >
119119 </ div >
120+ < div class ="row ">
121+ < div class ="col s6 input-field ">
122+ < input type ="text " class ="value " id ="featureFilter " />
123+ < label for ="featureFilter " class ="translate "
124+ > Feature filter (comma-separated). Use * as wildcard. Example: heating.boiler.*,heating.burner.*
125+ </ label >
126+ </ div >
127+ </ div >
120128 < div class ="row ">
121129 < div class ="col s6 input-field ">
122130 < input type ="checkbox " class ="value " id ="allowVirtual " />
Original file line number Diff line number Diff line change 144144 "eventInterval" : 300 ,
145145 "gatewayIndex" : 1 ,
146146 "devicelist" : " " ,
147+ "featureFilter" : " " ,
147148 "allowVirtual" : false
148149 },
149150 "objects" : [],
Original file line number Diff line number Diff line change @@ -349,6 +349,26 @@ class Viessmannapi extends utils.Adapter {
349349 if ( data . length === 1 ) {
350350 data = data [ 0 ] ;
351351 }
352+ // Filter features by path pattern if featureFilter is configured
353+ if ( this . config . featureFilter && Array . isArray ( data ) ) {
354+ const patterns = this . config . featureFilter . replace ( / \s / g, '' ) . split ( ',' ) . filter ( p => p ) ;
355+ if ( patterns . length > 0 ) {
356+ const originalCount = data . length ;
357+ data = data . filter ( item => {
358+ const featurePath = item . feature || '' ;
359+ return patterns . some ( pattern => {
360+ if ( pattern . endsWith ( '*' ) ) {
361+ // Wildcard: heating.* matches heating.boiler, heating.burner, etc.
362+ const prefix = pattern . slice ( 0 , - 1 ) ;
363+ return featurePath . startsWith ( prefix ) ;
364+ }
365+ // Exact match
366+ return featurePath === pattern ;
367+ } ) ;
368+ } ) ;
369+ this . log . debug ( `Feature filter: ${ originalCount } -> ${ data . length } features` ) ;
370+ }
371+ }
352372 const extractPath = installation . id + '.' + device . id + '.' + element . path ;
353373 const forceIndex = null ;
354374
Original file line number Diff line number Diff line change 1717 },
1818 "dependencies" : {
1919 "@iobroker/adapter-core" : " ^3.3.2" ,
20- "axios" : " ^1.13.2 " ,
20+ "axios" : " ^1.13.5 " ,
2121 "json-bigint" : " ^1.0.0" ,
22- "qs" : " ^6.14.0 " ,
22+ "qs" : " ^6.14.1 " ,
2323 "retry-axios" : " ^2.6.0"
2424 },
2525 "devDependencies" : {
3030 "@eslint/eslintrc" : " ^3.3.3" ,
3131 "@eslint/js" : " ^9.39.2" ,
3232 "@iobroker/testing" : " ^5.2.2" ,
33- "@types/node" : " ^22.19.3 " ,
34- "axios" : " ^1.13.2 " ,
33+ "@types/node" : " ^22.19.10 " ,
34+ "axios" : " ^1.13.5 " ,
3535 "eslint" : " ^9.39.2" ,
3636 "globals" : " ^16.5.0" ,
3737 "typescript" : " ^5.9.3"
You can’t perform that action at this time.
0 commit comments