@@ -80,13 +80,19 @@ Clusters::ValveConfigurationAndControl::ValveControlDelegate sValveDelegate;
80
80
Clusters::TimeSynchronization::ExtendedTimeSyncDelegate sTimeSyncDelegate ;
81
81
82
82
// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces
83
- constexpr const uint8_t kNamespaceCommon = 7 ;
83
+ constexpr const uint8_t kNamespaceCommon = 7 ;
84
+ constexpr const uint8_t kNamespaceSwitches = 0x43 ;
85
+
84
86
// Common Number Namespace: 7, tag 0 (Zero)
85
87
constexpr const uint8_t kTagCommonZero = 0 ;
86
88
// Common Number Namespace: 7, tag 1 (One)
87
89
constexpr const uint8_t kTagCommonOne = 1 ;
88
90
// Common Number Namespace: 7, tag 2 (Two)
89
91
constexpr const uint8_t kTagCommonTwo = 2 ;
92
+ // Switches namespace: 0x43, tag = 0x03 (Up)
93
+ constexpr const uint8_t kTagSwitchesUp = 0x03 ;
94
+ // Switches namespace: 0x43, tag = 0x04 (Down)
95
+ constexpr const uint8_t kTagSwitchesDown = 0x04 ;
90
96
91
97
constexpr const uint8_t kNamespacePosition = 8 ;
92
98
// Common Position Namespace: 8, tag: 0 (Left)
@@ -104,6 +110,11 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp1TagList[] = {
104
110
const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp2TagList [] = {
105
111
{ .namespaceID = kNamespaceCommon , .tag = kTagCommonTwo }, { .namespaceID = kNamespacePosition , .tag = kTagPositionRight }
106
112
};
113
+ // Endpoints 3 and 4 are an action switch and a non-action switch. On the device, they're tagged as up and down because why not.
114
+ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp3TagList [] = { { .namespaceID = kNamespaceSwitches ,
115
+ .tag = kTagSwitchesUp } };
116
+ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp4TagList [] = { { .namespaceID = kNamespaceSwitches ,
117
+ .tag = kTagSwitchesDown } };
107
118
} // namespace
108
119
109
120
#ifdef MATTER_DM_PLUGIN_DISHWASHER_ALARM_SERVER
@@ -238,6 +249,8 @@ void ApplicationInit()
238
249
SetTagList (/* endpoint= */ 0 , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp0TagList ));
239
250
SetTagList (/* endpoint= */ 1 , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp1TagList ));
240
251
SetTagList (/* endpoint= */ 2 , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp2TagList ));
252
+ SetTagList (/* endpoint= */ 3 , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp3TagList ));
253
+ SetTagList (/* endpoint= */ 4 , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp4TagList ));
241
254
}
242
255
243
256
void ApplicationShutdown ()
0 commit comments