Skip to content

Commit 1090188

Browse files
andy31415andreilitvin
authored andcommitted
Fix linter errors for mandatory attributes in chef zap files (#26396)
* Fix contactsensor * Fix onoffplug * Automated fix for all the other zap files + manual fix for heatingcooling and extendedcolorlight --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com>
1 parent 0060047 commit 1090188

33 files changed

+2321
-26
lines changed

.github/workflows/lint.yml

-16
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,6 @@ jobs:
7979
# https://github.com/project-chip/connectedhomeip/issues/19169
8080
# https://github.com/project-chip/connectedhomeip/issues/22640
8181
if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi
82-
if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter' ]; then continue; fi
83-
if [ "$idl_file" = './examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter' ]; then continue; fi
84-
if [ "$idl_file" = './examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter' ]; then continue; fi
85-
if [ "$idl_file" = './examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter' ]; then continue; fi
86-
if [ "$idl_file" = './examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter' ]; then continue; fi
87-
if [ "$idl_file" = './examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter' ]; then continue; fi
88-
if [ "$idl_file" = './examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter' ]; then continue; fi
89-
if [ "$idl_file" = './examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter' ]; then continue; fi
90-
if [ "$idl_file" = './examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter' ]; then continue; fi
91-
if [ "$idl_file" = './examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter' ]; then continue; fi
92-
if [ "$idl_file" = './examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter' ]; then continue; fi
93-
if [ "$idl_file" = './examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter' ]; then continue; fi
94-
if [ "$idl_file" = './examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter' ]; then continue; fi
95-
if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi
96-
if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi
97-
if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi
9882
if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi
9983
if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi
10084
if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi

examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter

+16
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ server cluster AccessControl = 31 {
216216

217217
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
218218
attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
219+
readonly attribute int16u subjectsPerAccessControlEntry = 2;
220+
readonly attribute int16u targetsPerAccessControlEntry = 3;
221+
readonly attribute int16u accessControlEntriesPerFabric = 4;
219222
readonly attribute command_id generatedCommandList[] = 65528;
220223
readonly attribute command_id acceptedCommandList[] = 65529;
221224
readonly attribute event_id eventList[] = 65530;
@@ -305,6 +308,7 @@ server cluster BasicInformation = 40 {
305308
attribute access(write: manage) boolean localConfigDisabled = 16;
306309
readonly attribute boolean reachable = 17;
307310
readonly attribute char_string<32> uniqueID = 18;
311+
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
308312
readonly attribute command_id generatedCommandList[] = 65528;
309313
readonly attribute command_id acceptedCommandList[] = 65529;
310314
readonly attribute event_id eventList[] = 65530;
@@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
467471
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
468472
they can be configured to use a user’s preferred language, units, etc */
469473
server cluster LocalizationConfiguration = 43 {
474+
attribute char_string<35> activeLocale = 0;
470475
readonly attribute CHAR_STRING supportedLocales[] = 1;
471476
readonly attribute command_id generatedCommandList[] = 65528;
472477
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 {
537542
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
538543
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
539544
readonly attribute RegulatoryLocationType locationCapability = 3;
545+
readonly attribute boolean supportsConcurrentConnection = 4;
540546
readonly attribute command_id generatedCommandList[] = 65528;
541547
readonly attribute command_id acceptedCommandList[] = 65529;
542548
readonly attribute event_id eventList[] = 65530;
@@ -932,6 +938,8 @@ server cluster Switch = 59 {
932938
INT8U totalNumberOfPressesCounted = 1;
933939
}
934940

941+
readonly attribute int8u numberOfPositions = 0;
942+
readonly attribute int8u currentPosition = 1;
935943
readonly attribute command_id generatedCommandList[] = 65528;
936944
readonly attribute command_id acceptedCommandList[] = 65529;
937945
readonly attribute event_id eventList[] = 65530;
@@ -1225,6 +1233,9 @@ endpoint 0 {
12251233
emits event AccessControlExtensionChanged;
12261234
callback attribute acl;
12271235
callback attribute extension;
1236+
callback attribute subjectsPerAccessControlEntry;
1237+
callback attribute targetsPerAccessControlEntry;
1238+
callback attribute accessControlEntriesPerFabric;
12281239
callback attribute attributeList;
12291240
ram attribute featureMap default = 0;
12301241
ram attribute clusterRevision default = 1;
@@ -1253,6 +1264,7 @@ endpoint 0 {
12531264
persist attribute localConfigDisabled default = 0;
12541265
ram attribute reachable default = 1;
12551266
callback attribute uniqueID;
1267+
callback attribute capabilityMinima;
12561268
ram attribute featureMap default = 0;
12571269
ram attribute clusterRevision default = 1;
12581270
}
@@ -1270,6 +1282,7 @@ endpoint 0 {
12701282
}
12711283

12721284
server cluster LocalizationConfiguration {
1285+
ram attribute activeLocale;
12731286
callback attribute supportedLocales;
12741287
ram attribute featureMap default = 0;
12751288
ram attribute clusterRevision default = 1;
@@ -1288,6 +1301,7 @@ endpoint 0 {
12881301
callback attribute basicCommissioningInfo;
12891302
callback attribute regulatoryConfig default = 0;
12901303
callback attribute locationCapability default = 0;
1304+
callback attribute supportsConcurrentConnection default = 1;
12911305
ram attribute featureMap default = 0;
12921306
ram attribute clusterRevision default = 0x0001;
12931307
}
@@ -1335,6 +1349,8 @@ endpoint 0 {
13351349
}
13361350

13371351
server cluster Switch {
1352+
ram attribute numberOfPositions default = 2;
1353+
ram attribute currentPosition;
13381354
ram attribute featureMap default = 0;
13391355
ram attribute clusterRevision default = 1;
13401356
}

examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap

+131-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"featureLevel": 92,
2+
"featureLevel": 96,
33
"creator": "zap",
44
"keyValuePairs": [
55
{
@@ -1034,6 +1034,54 @@
10341034
"maxInterval": 65534,
10351035
"reportableChange": 0
10361036
},
1037+
{
1038+
"name": "SubjectsPerAccessControlEntry",
1039+
"code": 2,
1040+
"mfgCode": null,
1041+
"side": "server",
1042+
"type": "int16u",
1043+
"included": 1,
1044+
"storageOption": "RAM",
1045+
"singleton": 0,
1046+
"bounded": 0,
1047+
"defaultValue": "",
1048+
"reportable": 1,
1049+
"minInterval": 1,
1050+
"maxInterval": 65534,
1051+
"reportableChange": 0
1052+
},
1053+
{
1054+
"name": "TargetsPerAccessControlEntry",
1055+
"code": 3,
1056+
"mfgCode": null,
1057+
"side": "server",
1058+
"type": "int16u",
1059+
"included": 1,
1060+
"storageOption": "RAM",
1061+
"singleton": 0,
1062+
"bounded": 0,
1063+
"defaultValue": "",
1064+
"reportable": 1,
1065+
"minInterval": 1,
1066+
"maxInterval": 65534,
1067+
"reportableChange": 0
1068+
},
1069+
{
1070+
"name": "AccessControlEntriesPerFabric",
1071+
"code": 4,
1072+
"mfgCode": null,
1073+
"side": "server",
1074+
"type": "int16u",
1075+
"included": 1,
1076+
"storageOption": "RAM",
1077+
"singleton": 0,
1078+
"bounded": 0,
1079+
"defaultValue": "",
1080+
"reportable": 1,
1081+
"minInterval": 1,
1082+
"maxInterval": 65534,
1083+
"reportableChange": 0
1084+
},
10371085
{
10381086
"name": "AttributeList",
10391087
"code": 65531,
@@ -1438,6 +1486,22 @@
14381486
"maxInterval": 65344,
14391487
"reportableChange": 0
14401488
},
1489+
{
1490+
"name": "CapabilityMinima",
1491+
"code": 19,
1492+
"mfgCode": null,
1493+
"side": "server",
1494+
"type": "CapabilityMinimaStruct",
1495+
"included": 1,
1496+
"storageOption": "RAM",
1497+
"singleton": 1,
1498+
"bounded": 0,
1499+
"defaultValue": "",
1500+
"reportable": 1,
1501+
"minInterval": 1,
1502+
"maxInterval": 65534,
1503+
"reportableChange": 0
1504+
},
14411505
{
14421506
"name": "FeatureMap",
14431507
"code": 65532,
@@ -1820,6 +1884,22 @@
18201884
"side": "server",
18211885
"enabled": 1,
18221886
"attributes": [
1887+
{
1888+
"name": "ActiveLocale",
1889+
"code": 0,
1890+
"mfgCode": null,
1891+
"side": "server",
1892+
"type": "char_string",
1893+
"included": 1,
1894+
"storageOption": "RAM",
1895+
"singleton": 0,
1896+
"bounded": 0,
1897+
"defaultValue": "",
1898+
"reportable": 1,
1899+
"minInterval": 1,
1900+
"maxInterval": 65534,
1901+
"reportableChange": 0
1902+
},
18231903
{
18241904
"name": "SupportedLocales",
18251905
"code": 1,
@@ -2184,6 +2264,22 @@
21842264
"maxInterval": 65534,
21852265
"reportableChange": 0
21862266
},
2267+
{
2268+
"name": "SupportsConcurrentConnection",
2269+
"code": 4,
2270+
"mfgCode": null,
2271+
"side": "server",
2272+
"type": "boolean",
2273+
"included": 1,
2274+
"storageOption": "RAM",
2275+
"singleton": 0,
2276+
"bounded": 0,
2277+
"defaultValue": "1",
2278+
"reportable": 1,
2279+
"minInterval": 1,
2280+
"maxInterval": 65534,
2281+
"reportableChange": 0
2282+
},
21872283
{
21882284
"name": "FeatureMap",
21892285
"code": 65532,
@@ -4525,6 +4621,38 @@
45254621
"side": "server",
45264622
"enabled": 1,
45274623
"attributes": [
4624+
{
4625+
"name": "NumberOfPositions",
4626+
"code": 0,
4627+
"mfgCode": null,
4628+
"side": "server",
4629+
"type": "int8u",
4630+
"included": 1,
4631+
"storageOption": "RAM",
4632+
"singleton": 0,
4633+
"bounded": 0,
4634+
"defaultValue": "2",
4635+
"reportable": 1,
4636+
"minInterval": 1,
4637+
"maxInterval": 65534,
4638+
"reportableChange": 0
4639+
},
4640+
{
4641+
"name": "CurrentPosition",
4642+
"code": 1,
4643+
"mfgCode": null,
4644+
"side": "server",
4645+
"type": "int8u",
4646+
"included": 1,
4647+
"storageOption": "RAM",
4648+
"singleton": 0,
4649+
"bounded": 0,
4650+
"defaultValue": "",
4651+
"reportable": 1,
4652+
"minInterval": 1,
4653+
"maxInterval": 65534,
4654+
"reportableChange": 0
4655+
},
45284656
{
45294657
"name": "FeatureMap",
45304658
"code": 65532,
@@ -6191,5 +6319,6 @@
61916319
"endpointVersion": 1,
61926320
"deviceIdentifier": 21
61936321
}
6194-
]
6322+
],
6323+
"log": []
61956324
}

examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter

+16
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ server cluster AccessControl = 31 {
216216

217217
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
218218
attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
219+
readonly attribute int16u subjectsPerAccessControlEntry = 2;
220+
readonly attribute int16u targetsPerAccessControlEntry = 3;
221+
readonly attribute int16u accessControlEntriesPerFabric = 4;
219222
readonly attribute command_id generatedCommandList[] = 65528;
220223
readonly attribute command_id acceptedCommandList[] = 65529;
221224
readonly attribute event_id eventList[] = 65530;
@@ -305,6 +308,7 @@ server cluster BasicInformation = 40 {
305308
attribute access(write: manage) boolean localConfigDisabled = 16;
306309
readonly attribute boolean reachable = 17;
307310
readonly attribute char_string<32> uniqueID = 18;
311+
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
308312
readonly attribute command_id generatedCommandList[] = 65528;
309313
readonly attribute command_id acceptedCommandList[] = 65529;
310314
readonly attribute event_id eventList[] = 65530;
@@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
467471
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
468472
they can be configured to use a user’s preferred language, units, etc */
469473
server cluster LocalizationConfiguration = 43 {
474+
attribute char_string<35> activeLocale = 0;
470475
readonly attribute CHAR_STRING supportedLocales[] = 1;
471476
readonly attribute command_id generatedCommandList[] = 65528;
472477
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 {
537542
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
538543
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
539544
readonly attribute RegulatoryLocationType locationCapability = 3;
545+
readonly attribute boolean supportsConcurrentConnection = 4;
540546
readonly attribute command_id generatedCommandList[] = 65528;
541547
readonly attribute command_id acceptedCommandList[] = 65529;
542548
readonly attribute event_id eventList[] = 65530;
@@ -932,6 +938,8 @@ server cluster Switch = 59 {
932938
INT8U totalNumberOfPressesCounted = 1;
933939
}
934940

941+
readonly attribute int8u numberOfPositions = 0;
942+
readonly attribute int8u currentPosition = 1;
935943
readonly attribute command_id generatedCommandList[] = 65528;
936944
readonly attribute command_id acceptedCommandList[] = 65529;
937945
readonly attribute event_id eventList[] = 65530;
@@ -1693,6 +1701,9 @@ endpoint 0 {
16931701
emits event AccessControlExtensionChanged;
16941702
callback attribute acl;
16951703
callback attribute extension;
1704+
callback attribute subjectsPerAccessControlEntry;
1705+
callback attribute targetsPerAccessControlEntry;
1706+
callback attribute accessControlEntriesPerFabric;
16961707
callback attribute attributeList;
16971708
ram attribute featureMap default = 0;
16981709
ram attribute clusterRevision default = 1;
@@ -1721,6 +1732,7 @@ endpoint 0 {
17211732
persist attribute localConfigDisabled default = 0;
17221733
ram attribute reachable default = 1;
17231734
callback attribute uniqueID;
1735+
callback attribute capabilityMinima;
17241736
ram attribute featureMap default = 0;
17251737
ram attribute clusterRevision default = 1;
17261738
}
@@ -1738,6 +1750,7 @@ endpoint 0 {
17381750
}
17391751

17401752
server cluster LocalizationConfiguration {
1753+
ram attribute activeLocale;
17411754
callback attribute supportedLocales;
17421755
ram attribute featureMap default = 0;
17431756
ram attribute clusterRevision default = 1;
@@ -1756,6 +1769,7 @@ endpoint 0 {
17561769
callback attribute basicCommissioningInfo;
17571770
callback attribute regulatoryConfig default = 0;
17581771
callback attribute locationCapability default = 0;
1772+
callback attribute supportsConcurrentConnection default = 1;
17591773
ram attribute featureMap default = 6;
17601774
ram attribute clusterRevision default = 0x0001;
17611775
}
@@ -1803,6 +1817,8 @@ endpoint 0 {
18031817
}
18041818

18051819
server cluster Switch {
1820+
ram attribute numberOfPositions default = 2;
1821+
ram attribute currentPosition;
18061822
ram attribute featureMap default = 0;
18071823
ram attribute clusterRevision default = 1;
18081824
}

0 commit comments

Comments
 (0)