Skip to content

Commit

Permalink
Remove unnecessary clusters fro chef colortemperature device
Browse files Browse the repository at this point in the history
The current chef Color Temperature Light device contains several
unnecessary clusters such as Switch, LocalizationConfiguration,
, TimeFormatLocalization.

Putting a Switch cluster in the EP0 (root node) is wrong.
While we don't need to localize text/time for a light.
So we remove them all.
  • Loading branch information
erwinpan1 committed Oct 5, 2022
1 parent 092b8c5 commit 7a13f94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 110 deletions.
102 changes: 0 additions & 102 deletions examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter
Original file line number Diff line number Diff line change
Expand Up @@ -532,41 +532,6 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0;
}

server cluster LocalizationConfiguration = 43 {
attribute char_string<35> activeLocale = 0;
readonly attribute CHAR_STRING supportedLocales[] = 1;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

server cluster TimeFormatLocalization = 44 {
enum CalendarType : ENUM8 {
kBuddhist = 0;
kChinese = 1;
kCoptic = 2;
kEthiopian = 3;
kGregorian = 4;
kHebrew = 5;
kIndian = 6;
kIslamic = 7;
kJapanese = 8;
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
}

enum HourFormat : ENUM8 {
k12hr = 0;
k24hr = 1;
}

attribute HourFormat hourFormat = 0;
attribute CalendarType activeCalendarType = 1;
readonly attribute CalendarType supportedCalendarTypes[] = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

server cluster GeneralCommissioning = 48 {
enum CommissioningError : ENUM8 {
kOk = 0;
Expand Down Expand Up @@ -1171,51 +1136,6 @@ server cluster EthernetNetworkDiagnostics = 55 {
command ResetCounts(): DefaultSuccess = 0;
}

server cluster Switch = 59 {
bitmap SwitchFeature : BITMAP32 {
kLatchingSwitch = 0x1;
kMomentarySwitch = 0x2;
kMomentarySwitchRelease = 0x4;
kMomentarySwitchLongPress = 0x8;
kMomentarySwitchMultiPress = 0x10;
}

info event SwitchLatched = 0 {
INT8U newPosition = 0;
}

info event InitialPress = 1 {
INT8U newPosition = 0;
}

info event LongPress = 2 {
INT8U newPosition = 0;
}

info event ShortRelease = 3 {
INT8U previousPosition = 0;
}

info event LongRelease = 4 {
INT8U previousPosition = 0;
}

info event MultiPressOngoing = 5 {
INT8U newPosition = 0;
INT8U currentNumberOfPressesCounted = 1;
}

info event MultiPressComplete = 6 {
INT8U newPosition = 0;
INT8U totalNumberOfPressesCounted = 1;
}

readonly attribute int8u numberOfPositions = 0;
readonly attribute int8u currentPosition = 1;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

server cluster AdministratorCommissioning = 60 {
enum CommissioningWindowStatus : ENUM8 {
kWindowNotOpen = 0;
Expand Down Expand Up @@ -1776,21 +1696,6 @@ endpoint 0 {
ram attribute clusterRevision default = 1;
}

server cluster LocalizationConfiguration {
ram attribute activeLocale;
callback attribute supportedLocales;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster TimeFormatLocalization {
persist attribute hourFormat;
persist attribute activeCalendarType;
callback attribute supportedCalendarTypes;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster GeneralCommissioning {
ram attribute breadcrumb;
callback attribute basicCommissioningInfo;
Expand Down Expand Up @@ -1942,13 +1847,6 @@ endpoint 0 {
ram attribute clusterRevision default = 0x0001;
}

server cluster Switch {
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster AdministratorCommissioning {
callback attribute windowStatus;
callback attribute adminFabricIndex default = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand All @@ -1057,7 +1057,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand All @@ -1073,7 +1073,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand Down Expand Up @@ -1477,7 +1477,7 @@
"side": "server",
"type": "CapabilityMinimaStruct",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
Expand Down Expand Up @@ -1820,7 +1820,7 @@
"mfgCode": null,
"define": "LOCALIZATION_CONFIGURATION_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"attributes": [
{
"name": "ActiveLocale",
Expand Down Expand Up @@ -1902,7 +1902,7 @@
"mfgCode": null,
"define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"attributes": [
{
"name": "HourFormat",
Expand Down Expand Up @@ -2209,7 +2209,7 @@
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
Expand Down Expand Up @@ -4548,7 +4548,7 @@
"mfgCode": null,
"define": "SWITCH_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"attributes": [
{
"name": "number of positions",
Expand Down

0 comments on commit 7a13f94

Please sign in to comment.