From 15945567e999f0f1f8002e8b852c7c0611f8cb44 Mon Sep 17 00:00:00 2001 From: Alex Pygin Date: Fri, 10 Feb 2023 20:42:48 -0600 Subject: [PATCH] Adding required fields for Light App (#24977) * Adding required fields for Switch * Adding changes to .zap file * Removing lint ignore for failure fixed in this PR * Regenerated lighting-app.matter --- .github/workflows/lint.yml | 2 - .../lighting-common/lighting-app.matter | 4 ++ .../lighting-common/lighting-app.zap | 69 ++++++++++++++++++- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1e0ae2f0e508c3..2acff6d98983ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -64,7 +64,6 @@ jobs: for idl_file in $(find . -name '*.matter'); do # TODO: all these conformance failures should be fixed # Issues exist for most of them: - # https://github.com/project-chip/connectedhomeip/issues/19180 # https://github.com/project-chip/connectedhomeip/issues/19176 # https://github.com/project-chip/connectedhomeip/issues/19175 # https://github.com/project-chip/connectedhomeip/issues/19173 @@ -90,7 +89,6 @@ jobs: if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi - if [ "$idl_file" = './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index e56d950c8c8f19..fdb7fc4944321c 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1291,6 +1291,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2055,6 +2057,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 98ff42499eac14..ee5cac22fdac78 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4540,7 +4540,42 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 0 + "enabled": 0, + "attributes": [ + + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { "name": "Switch", @@ -4550,6 +4585,38 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532,