@@ -594,6 +594,10 @@ function makeAvailabilityPath(clusterName, options) {
594594 return [ 'global attributes' , options . hash . globalAttribute ] ;
595595 }
596596
597+ if ( options . hash . deviceType ) {
598+ return [ 'device types' , options . hash . deviceType ] ;
599+ }
600+
597601 return [ 'clusters' , clusterName ] ;
598602}
599603
@@ -626,6 +630,7 @@ function findPathToContainer(availabilityPath) {
626630 case 'apis' :
627631 case 'global attributes' :
628632 case 'clusters' :
633+ case 'device types' :
629634 return undefined ;
630635
631636 default :
@@ -1254,6 +1259,25 @@ async function async_not(value) {
12541259 return ! toBeNegated ;
12551260}
12561261
1262+ function isLessThan ( value1 , value2 ) {
1263+ return value1 < value2 ;
1264+ }
1265+
1266+ function stripPrefix ( value , prefix ) {
1267+ if ( value . startsWith ( prefix ) ) {
1268+ return value . substring ( prefix . length ) ;
1269+ }
1270+
1271+ return value ;
1272+ }
1273+
1274+ function cleanDeviceName ( deviceName ) {
1275+ deviceName = stripPrefix . call ( this , deviceName , 'Matter ' ) ;
1276+ return appHelper . asUpperCamelCase . call ( this , deviceName , {
1277+ hash : { preserveAcronyms : true }
1278+ } ) ;
1279+ }
1280+
12571281//
12581282// Module exports
12591283//
@@ -1288,6 +1312,9 @@ exports.async_not = async_not;
12881312exports . oldName = oldName ;
12891313exports . hasOldName = hasOldName ;
12901314exports . hasRenamedFields = hasRenamedFields ;
1315+ exports . isLessThan = isLessThan ;
1316+ exports . stripPrefix = stripPrefix ;
1317+ exports . cleanDeviceName = cleanDeviceName ;
12911318
12921319exports . meta = {
12931320 category : dbEnum . helperCategory . matter ,
0 commit comments