File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -358,9 +358,14 @@ class Viessmannapi extends utils.Adapter {
358358 const featurePath = item . feature || '' ;
359359 return patterns . some ( pattern => {
360360 if ( pattern . endsWith ( '*' ) ) {
361- // Wildcard: heating.* matches heating.boiler, heating.burner, etc.
362- const prefix = pattern . slice ( 0 , - 1 ) ;
363- return featurePath . startsWith ( prefix ) ;
361+ // Wildcard: heating.* matches heating, heating.boiler, heating.burner, etc.
362+ let prefix = pattern . slice ( 0 , - 1 ) ;
363+ // Remove trailing dot to get base path
364+ if ( prefix . endsWith ( '.' ) ) {
365+ prefix = prefix . slice ( 0 , - 1 ) ;
366+ }
367+ // Match base path exactly OR as prefix with dot separator
368+ return featurePath === prefix || featurePath . startsWith ( prefix + '.' ) ;
364369 }
365370 // Exact match
366371 return featurePath === pattern ;
You can’t perform that action at this time.
0 commit comments