Skip to content

Commit

Permalink
[ColorControl]Add checks for rate and step size parameters in command…
Browse files Browse the repository at this point in the history
…s handling (#33251)

* Return invalid comamnd on MoveColor command with RateX and RateY both at 0. Add a test step to TC_CC_5.2 to validate the expected failure

* Add checks for stepSize and bump Color control cluster revision in its xml

* Update CC cluster revision from 6 to 7 in relevant zap files (with update_cluster_revisions.py) and regen

* Restyled by prettier-yaml

* update changes based on latest spec pr changes

* Revert added test in TC_CC_5_2. spec pr change MoveColor with RateX and Y = 0 is valid

* Add yaml certification test step for the added CC check

* Restyled by whitespace

* Restyled by prettier-yaml

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Dec 18, 2024
1 parent d4c85ce commit 69346ef
Show file tree
Hide file tree
Showing 50 changed files with 510 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5441,7 +5441,7 @@ cluster ThermostatUserInterfaceConfiguration = 516 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -8702,7 +8702,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17871,7 +17871,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3986,7 +3986,7 @@ cluster ThermostatUserInterfaceConfiguration = 516 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -6550,7 +6550,7 @@ endpoint 1 {
ram attribute enhancedColorMode default = 0x01;
ram attribute colorCapabilities default = 0x1F;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;
}

server cluster BallastConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7303,7 +7303,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ cluster GroupKeyManagement = 63 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2047,7 +2047,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x0010;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3925,7 +3925,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ cluster FixedLabel = 64 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2159,7 +2159,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x1f;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4029,7 +4029,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,7 @@ provisional cluster ScenesManagement = 98 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5412,7 +5412,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/qpg/zap/switch.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ provisional cluster ScenesManagement = 98 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/qpg/zap/switch.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5617,7 +5617,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ cluster UserLabel = 65 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2223,7 +2223,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4300,7 +4300,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ cluster UserLabel = 65 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2409,7 +2409,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5276,7 +5276,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ cluster UserLabel = 65 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2272,7 +2272,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4483,7 +4483,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ provisional cluster ScenesManagement = 98 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2857,7 +2857,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5813,7 +5813,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ cluster UserLabel = 65 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2389,7 +2389,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/qpg/zap/light.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6002,7 +6002,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ provisional cluster ScenesManagement = 98 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2440,7 +2440,7 @@ endpoint 1 {
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5316,7 +5316,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ provisional cluster ScenesManagement = 98 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -2729,7 +2729,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5027,7 +5027,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
6 changes: 3 additions & 3 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5555,7 +5555,7 @@ cluster ThermostatUserInterfaceConfiguration = 516 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -5875,7 +5875,7 @@ cluster ColorControl = 768 {

/** Attributes and commands for controlling the color properties of a color-capable light. */
cluster ColorControl = 768 {
revision 6;
revision 7;

enum ColorLoopAction : enum8 {
kDeactivate = 0;
Expand Down Expand Up @@ -9238,7 +9238,7 @@ endpoint 1 {
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 6;
ram attribute clusterRevision default = 7;

handle command MoveToHue;
handle command MoveHue;
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app1/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -13838,7 +13838,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -14866,7 +14866,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "6",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Loading

0 comments on commit 69346ef

Please sign in to comment.