@matter/types 0.11.9-alpha.0-20241205-ccf69a00a → 0.11.9-alpha.0-20241207-b604cfa44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/cjs/clusters/bridged-device-basic-information.d.ts +58 -7
  2. package/dist/cjs/clusters/bridged-device-basic-information.d.ts.map +1 -1
  3. package/dist/cjs/clusters/bridged-device-basic-information.js +19 -2
  4. package/dist/cjs/clusters/bridged-device-basic-information.js.map +1 -1
  5. package/dist/cjs/clusters/content-launcher.d.ts +10 -10
  6. package/dist/cjs/clusters/content-launcher.d.ts.map +1 -1
  7. package/dist/cjs/clusters/content-launcher.js +22 -22
  8. package/dist/cjs/clusters/content-launcher.js.map +2 -2
  9. package/dist/cjs/clusters/device-energy-management-mode.d.ts +411 -25
  10. package/dist/cjs/clusters/device-energy-management-mode.d.ts.map +1 -1
  11. package/dist/cjs/clusters/device-energy-management-mode.js +90 -1
  12. package/dist/cjs/clusters/device-energy-management-mode.js.map +1 -1
  13. package/dist/cjs/clusters/dishwasher-alarm.d.ts +1253 -42
  14. package/dist/cjs/clusters/dishwasher-alarm.d.ts.map +1 -1
  15. package/dist/cjs/clusters/dishwasher-alarm.js +72 -9
  16. package/dist/cjs/clusters/dishwasher-alarm.js.map +1 -1
  17. package/dist/cjs/clusters/dishwasher-mode.d.ts +340 -17
  18. package/dist/cjs/clusters/dishwasher-mode.d.ts.map +1 -1
  19. package/dist/cjs/clusters/dishwasher-mode.js +91 -2
  20. package/dist/cjs/clusters/dishwasher-mode.js.map +1 -1
  21. package/dist/cjs/clusters/door-lock.d.ts +1287 -135
  22. package/dist/cjs/clusters/door-lock.d.ts.map +1 -1
  23. package/dist/cjs/clusters/door-lock.js +199 -3
  24. package/dist/cjs/clusters/door-lock.js.map +1 -1
  25. package/dist/cjs/clusters/energy-evse-mode.d.ts +409 -25
  26. package/dist/cjs/clusters/energy-evse-mode.d.ts.map +1 -1
  27. package/dist/cjs/clusters/energy-evse-mode.js +90 -1
  28. package/dist/cjs/clusters/energy-evse-mode.js.map +1 -1
  29. package/dist/cjs/clusters/fan-control.d.ts +5 -0
  30. package/dist/cjs/clusters/fan-control.d.ts.map +1 -1
  31. package/dist/cjs/clusters/fan-control.js.map +1 -1
  32. package/dist/cjs/clusters/groups.d.ts +12 -0
  33. package/dist/cjs/clusters/groups.d.ts.map +1 -1
  34. package/dist/cjs/clusters/groups.js +7 -1
  35. package/dist/cjs/clusters/groups.js.map +1 -1
  36. package/dist/cjs/clusters/laundry-washer-mode.d.ts +340 -17
  37. package/dist/cjs/clusters/laundry-washer-mode.d.ts.map +1 -1
  38. package/dist/cjs/clusters/laundry-washer-mode.js +91 -2
  39. package/dist/cjs/clusters/laundry-washer-mode.js.map +1 -1
  40. package/dist/cjs/clusters/microwave-oven-mode.d.ts +330 -13
  41. package/dist/cjs/clusters/microwave-oven-mode.d.ts.map +1 -1
  42. package/dist/cjs/clusters/microwave-oven-mode.js +90 -2
  43. package/dist/cjs/clusters/microwave-oven-mode.js.map +1 -1
  44. package/dist/cjs/clusters/mode-base.d.ts +68 -68
  45. package/dist/cjs/clusters/mode-base.d.ts.map +1 -1
  46. package/dist/cjs/clusters/mode-base.js +16 -16
  47. package/dist/cjs/clusters/mode-base.js.map +2 -2
  48. package/dist/cjs/clusters/oven-mode.d.ts +409 -25
  49. package/dist/cjs/clusters/oven-mode.d.ts.map +1 -1
  50. package/dist/cjs/clusters/oven-mode.js +90 -1
  51. package/dist/cjs/clusters/oven-mode.js.map +1 -1
  52. package/dist/cjs/clusters/pump-configuration-and-control.d.ts +15 -0
  53. package/dist/cjs/clusters/pump-configuration-and-control.d.ts.map +1 -1
  54. package/dist/cjs/clusters/pump-configuration-and-control.js +6 -1
  55. package/dist/cjs/clusters/pump-configuration-and-control.js.map +1 -1
  56. package/dist/cjs/clusters/refrigerator-alarm.d.ts +364 -36
  57. package/dist/cjs/clusters/refrigerator-alarm.d.ts.map +1 -1
  58. package/dist/cjs/clusters/refrigerator-alarm.js +46 -8
  59. package/dist/cjs/clusters/refrigerator-alarm.js.map +1 -1
  60. package/dist/cjs/clusters/refrigerator-and-temperature-controlled-cabinet-mode.d.ts +340 -17
  61. package/dist/cjs/clusters/refrigerator-and-temperature-controlled-cabinet-mode.d.ts.map +1 -1
  62. package/dist/cjs/clusters/refrigerator-and-temperature-controlled-cabinet-mode.js +91 -2
  63. package/dist/cjs/clusters/refrigerator-and-temperature-controlled-cabinet-mode.js.map +1 -1
  64. package/dist/cjs/clusters/rvc-clean-mode.d.ts +374 -23
  65. package/dist/cjs/clusters/rvc-clean-mode.d.ts.map +1 -1
  66. package/dist/cjs/clusters/rvc-clean-mode.js +99 -6
  67. package/dist/cjs/clusters/rvc-clean-mode.js.map +2 -2
  68. package/dist/cjs/clusters/rvc-operational-state.d.ts +248 -22
  69. package/dist/cjs/clusters/rvc-operational-state.d.ts.map +1 -1
  70. package/dist/cjs/clusters/rvc-operational-state.js +59 -10
  71. package/dist/cjs/clusters/rvc-operational-state.js.map +1 -1
  72. package/dist/cjs/clusters/rvc-run-mode.d.ts +401 -40
  73. package/dist/cjs/clusters/rvc-run-mode.d.ts.map +1 -1
  74. package/dist/cjs/clusters/rvc-run-mode.js +101 -8
  75. package/dist/cjs/clusters/rvc-run-mode.js.map +2 -2
  76. package/dist/cjs/clusters/thermostat.d.ts +262 -61
  77. package/dist/cjs/clusters/thermostat.d.ts.map +1 -1
  78. package/dist/cjs/clusters/thermostat.js +72 -58
  79. package/dist/cjs/clusters/thermostat.js.map +1 -1
  80. package/dist/esm/clusters/bridged-device-basic-information.d.ts +58 -7
  81. package/dist/esm/clusters/bridged-device-basic-information.d.ts.map +1 -1
  82. package/dist/esm/clusters/bridged-device-basic-information.js +19 -2
  83. package/dist/esm/clusters/bridged-device-basic-information.js.map +1 -1
  84. package/dist/esm/clusters/content-launcher.d.ts +10 -10
  85. package/dist/esm/clusters/content-launcher.d.ts.map +1 -1
  86. package/dist/esm/clusters/content-launcher.js +22 -22
  87. package/dist/esm/clusters/content-launcher.js.map +2 -2
  88. package/dist/esm/clusters/device-energy-management-mode.d.ts +411 -25
  89. package/dist/esm/clusters/device-energy-management-mode.d.ts.map +1 -1
  90. package/dist/esm/clusters/device-energy-management-mode.js +91 -2
  91. package/dist/esm/clusters/device-energy-management-mode.js.map +1 -1
  92. package/dist/esm/clusters/dishwasher-alarm.d.ts +1253 -42
  93. package/dist/esm/clusters/dishwasher-alarm.d.ts.map +1 -1
  94. package/dist/esm/clusters/dishwasher-alarm.js +72 -9
  95. package/dist/esm/clusters/dishwasher-alarm.js.map +1 -1
  96. package/dist/esm/clusters/dishwasher-mode.d.ts +340 -17
  97. package/dist/esm/clusters/dishwasher-mode.d.ts.map +1 -1
  98. package/dist/esm/clusters/dishwasher-mode.js +91 -2
  99. package/dist/esm/clusters/dishwasher-mode.js.map +1 -1
  100. package/dist/esm/clusters/door-lock.d.ts +1287 -135
  101. package/dist/esm/clusters/door-lock.d.ts.map +1 -1
  102. package/dist/esm/clusters/door-lock.js +199 -3
  103. package/dist/esm/clusters/door-lock.js.map +1 -1
  104. package/dist/esm/clusters/energy-evse-mode.d.ts +409 -25
  105. package/dist/esm/clusters/energy-evse-mode.d.ts.map +1 -1
  106. package/dist/esm/clusters/energy-evse-mode.js +91 -2
  107. package/dist/esm/clusters/energy-evse-mode.js.map +1 -1
  108. package/dist/esm/clusters/fan-control.d.ts +5 -0
  109. package/dist/esm/clusters/fan-control.d.ts.map +1 -1
  110. package/dist/esm/clusters/fan-control.js.map +1 -1
  111. package/dist/esm/clusters/groups.d.ts +12 -0
  112. package/dist/esm/clusters/groups.d.ts.map +1 -1
  113. package/dist/esm/clusters/groups.js +7 -1
  114. package/dist/esm/clusters/groups.js.map +1 -1
  115. package/dist/esm/clusters/laundry-washer-mode.d.ts +340 -17
  116. package/dist/esm/clusters/laundry-washer-mode.d.ts.map +1 -1
  117. package/dist/esm/clusters/laundry-washer-mode.js +91 -2
  118. package/dist/esm/clusters/laundry-washer-mode.js.map +1 -1
  119. package/dist/esm/clusters/microwave-oven-mode.d.ts +330 -13
  120. package/dist/esm/clusters/microwave-oven-mode.d.ts.map +1 -1
  121. package/dist/esm/clusters/microwave-oven-mode.js +91 -3
  122. package/dist/esm/clusters/microwave-oven-mode.js.map +1 -1
  123. package/dist/esm/clusters/mode-base.d.ts +68 -68
  124. package/dist/esm/clusters/mode-base.d.ts.map +1 -1
  125. package/dist/esm/clusters/mode-base.js +17 -17
  126. package/dist/esm/clusters/mode-base.js.map +2 -2
  127. package/dist/esm/clusters/oven-mode.d.ts +409 -25
  128. package/dist/esm/clusters/oven-mode.d.ts.map +1 -1
  129. package/dist/esm/clusters/oven-mode.js +91 -2
  130. package/dist/esm/clusters/oven-mode.js.map +1 -1
  131. package/dist/esm/clusters/pump-configuration-and-control.d.ts +15 -0
  132. package/dist/esm/clusters/pump-configuration-and-control.d.ts.map +1 -1
  133. package/dist/esm/clusters/pump-configuration-and-control.js +6 -1
  134. package/dist/esm/clusters/pump-configuration-and-control.js.map +1 -1
  135. package/dist/esm/clusters/refrigerator-alarm.d.ts +364 -36
  136. package/dist/esm/clusters/refrigerator-alarm.d.ts.map +1 -1
  137. package/dist/esm/clusters/refrigerator-alarm.js +46 -8
  138. package/dist/esm/clusters/refrigerator-alarm.js.map +1 -1
  139. package/dist/esm/clusters/refrigerator-and-temperature-controlled-cabinet-mode.d.ts +340 -17
  140. package/dist/esm/clusters/refrigerator-and-temperature-controlled-cabinet-mode.d.ts.map +1 -1
  141. package/dist/esm/clusters/refrigerator-and-temperature-controlled-cabinet-mode.js +91 -2
  142. package/dist/esm/clusters/refrigerator-and-temperature-controlled-cabinet-mode.js.map +1 -1
  143. package/dist/esm/clusters/rvc-clean-mode.d.ts +374 -23
  144. package/dist/esm/clusters/rvc-clean-mode.d.ts.map +1 -1
  145. package/dist/esm/clusters/rvc-clean-mode.js +99 -6
  146. package/dist/esm/clusters/rvc-clean-mode.js.map +2 -2
  147. package/dist/esm/clusters/rvc-operational-state.d.ts +248 -22
  148. package/dist/esm/clusters/rvc-operational-state.d.ts.map +1 -1
  149. package/dist/esm/clusters/rvc-operational-state.js +60 -11
  150. package/dist/esm/clusters/rvc-operational-state.js.map +1 -1
  151. package/dist/esm/clusters/rvc-run-mode.d.ts +401 -40
  152. package/dist/esm/clusters/rvc-run-mode.d.ts.map +1 -1
  153. package/dist/esm/clusters/rvc-run-mode.js +101 -8
  154. package/dist/esm/clusters/rvc-run-mode.js.map +2 -2
  155. package/dist/esm/clusters/thermostat.d.ts +262 -61
  156. package/dist/esm/clusters/thermostat.d.ts.map +1 -1
  157. package/dist/esm/clusters/thermostat.js +72 -58
  158. package/dist/esm/clusters/thermostat.js.map +1 -1
  159. package/package.json +5 -5
  160. package/src/clusters/bridged-device-basic-information.ts +46 -2
  161. package/src/clusters/content-launcher.ts +5 -5
  162. package/src/clusters/device-energy-management-mode.ts +184 -3
  163. package/src/clusters/dishwasher-alarm.ts +115 -9
  164. package/src/clusters/dishwasher-mode.ts +188 -3
  165. package/src/clusters/door-lock.ts +247 -3
  166. package/src/clusters/energy-evse-mode.ts +182 -3
  167. package/src/clusters/fan-control.ts +5 -0
  168. package/src/clusters/groups.ts +8 -1
  169. package/src/clusters/laundry-washer-mode.ts +188 -3
  170. package/src/clusters/microwave-oven-mode.ts +182 -4
  171. package/src/clusters/mode-base.ts +77 -77
  172. package/src/clusters/oven-mode.ts +182 -3
  173. package/src/clusters/pump-configuration-and-control.ts +7 -1
  174. package/src/clusters/refrigerator-alarm.ts +76 -8
  175. package/src/clusters/refrigerator-and-temperature-controlled-cabinet-mode.ts +188 -3
  176. package/src/clusters/rvc-clean-mode.ts +227 -10
  177. package/src/clusters/rvc-operational-state.ts +112 -11
  178. package/src/clusters/rvc-run-mode.ts +253 -26
  179. package/src/clusters/thermostat.ts +80 -65
  180. package/src/globals/WildcardPathFlags.ts +1 -1
@@ -10,8 +10,12 @@ import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
10
10
  import { BitFlag } from "../schema/BitmapSchema.js";
11
11
  import { FixedAttribute, Attribute, Command, TlvNoResponse } from "../cluster/Cluster.js";
12
12
  import { TlvArray } from "../tlv/TlvArray.js";
13
+ import { TlvField, TlvOptionalField, TlvObject } from "../tlv/TlvObject.js";
14
+ import { TlvString } from "../tlv/TlvString.js";
15
+ import { TlvUInt8, TlvEnum } from "../tlv/TlvNumber.js";
16
+ import { TlvVendorId } from "../datatype/VendorId.js";
17
+ import { TypeFromSchema } from "../tlv/TlvSchema.js";
13
18
  import { ModeBase } from "./mode-base.js";
14
- import { TlvUInt8 } from "../tlv/TlvNumber.js";
15
19
  import { Identity } from "#general";
16
20
  import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
17
21
 
@@ -33,13 +37,6 @@ export namespace RvcCleanMode {
33
37
  OnOff = "OnOff"
34
38
  }
35
39
 
36
- export enum ModeChangeStatus {
37
- /**
38
- * @see {@link MatterSpecification.v13.Cluster} § 7.3.7.1
39
- */
40
- CleaningInProgress = 64
41
- }
42
-
43
40
  export enum ModeTag {
44
41
  /**
45
42
  * @see {@link MatterSpecification.v13.Cluster} § 7.3.7.2
@@ -58,7 +55,227 @@ export namespace RvcCleanMode {
58
55
  *
59
56
  * @see {@link MatterSpecification.v13.Cluster} § 7.3.7.2.3
60
57
  */
61
- Mop = 16386
58
+ Mop = 16386,
59
+
60
+ /**
61
+ * The device decides which options, features and setting values to use.
62
+ *
63
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
64
+ */
65
+ Auto = 0,
66
+
67
+ /**
68
+ * The mode of the device is optimizing for faster completion.
69
+ *
70
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
71
+ */
72
+ Quick = 1,
73
+
74
+ /**
75
+ * The device is silent or barely audible while in this mode.
76
+ *
77
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
78
+ */
79
+ Quiet = 2,
80
+
81
+ /**
82
+ * Either the mode is inherently low noise or the device optimizes for that.
83
+ *
84
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
85
+ */
86
+ LowNoise = 3,
87
+
88
+ /**
89
+ * The device is optimizing for lower energy usage in this mode. Sometimes called "Eco mode".
90
+ *
91
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
92
+ */
93
+ LowEnergy = 4,
94
+
95
+ /**
96
+ * A mode suitable for use during vacations or other extended absences.
97
+ *
98
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
99
+ */
100
+ Vacation = 5,
101
+
102
+ /**
103
+ * The mode uses the lowest available setting value.
104
+ *
105
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
106
+ */
107
+ Min = 6,
108
+
109
+ /**
110
+ * The mode uses the highest available setting value.
111
+ *
112
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
113
+ */
114
+ Max = 7,
115
+
116
+ /**
117
+ * The mode is recommended or suitable for use during night time.
118
+ *
119
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
120
+ */
121
+ Night = 8,
122
+
123
+ /**
124
+ * The mode is recommended or suitable for use during day time.
125
+ *
126
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
127
+ */
128
+ Day = 9
129
+ }
130
+
131
+ /**
132
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
133
+ *
134
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
135
+ */
136
+ export const TlvModeTagStruct = TlvObject({
137
+ /**
138
+ * If the MfgCode field exists, the Value field shall be in the manufacturer-specific value range (see Section
139
+ * 1.10.8, “Mode Namespace”).
140
+ *
141
+ * This field shall indicate the manufacturer’s VendorID and it shall determine the meaning of the Value field.
142
+ *
143
+ * The same manufacturer code and mode tag value in separate cluster instances are part of the same namespace
144
+ * and have the same meaning. For example: a manufacturer tag meaning "pinch" can be used both in a cluster
145
+ * whose purpose is to choose the amount of sugar, or in a cluster whose purpose is to choose the amount of
146
+ * salt.
147
+ *
148
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.1
149
+ */
150
+ mfgCode: TlvOptionalField(0, TlvVendorId),
151
+
152
+ /**
153
+ * This field shall indicate the mode tag within a mode tag namespace which is either manufacturer specific or
154
+ * standard.
155
+ *
156
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.2
157
+ */
158
+ value: TlvField(1, TlvEnum<ModeTag>())
159
+ });
160
+
161
+ /**
162
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
163
+ *
164
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
165
+ */
166
+ export interface ModeTagStruct extends TypeFromSchema<typeof TlvModeTagStruct> {}
167
+
168
+ /**
169
+ * The table below lists the changes relative to the Mode Base cluster for the fields of the ModeOptionStruct type.
170
+ * A blank field indicates no change.
171
+ *
172
+ * At least one entry in the SupportedModes attribute shall include the Vacuum and/or the Mop mode tag in the
173
+ * ModeTags field list.
174
+ *
175
+ * @see {@link MatterSpecification.v13.Cluster} § 7.3.5.1
176
+ */
177
+ export const TlvModeOption = TlvObject({
178
+ /**
179
+ * This field shall indicate readable text that describes the mode option, so that a client can provide it to
180
+ * the user to indicate what this option means. This field is meant to be readable and understandable by the
181
+ * user.
182
+ *
183
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.1
184
+ */
185
+ label: TlvField(0, TlvString.bound({ maxLength: 64 })),
186
+
187
+ /**
188
+ * This field is used to identify the mode option.
189
+ *
190
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.2
191
+ */
192
+ mode: TlvField(1, TlvUInt8),
193
+
194
+ /**
195
+ * This field shall contain a list of tags that are associated with the mode option. This may be used by
196
+ * clients to determine the full or the partial semantics of a certain mode, depending on which tags they
197
+ * understand, using standard definitions and/or manufacturer specific namespace definitions.
198
+ *
199
+ * The standard mode tags are defined in this cluster specification. For the derived cluster instances, if the
200
+ * specification of the derived cluster defines a namespace, the set of standard mode tags also includes the
201
+ * mode tag values from that namespace.
202
+ *
203
+ * Mode tags can help clients look for options that meet certain criteria, render the user interface, use
204
+ *
205
+ * the mode in an automation, or to craft help text their voice-driven interfaces. A mode tag shall be either a
206
+ * standard tag or a manufacturer specific tag, as defined in each ModeTagStruct list entry.
207
+ *
208
+ * A mode option may have more than one mode tag. A mode option may be associated with a mixture of standard
209
+ * and manufacturer specific mode tags. A mode option shall be associated with at least one standard mode tag.
210
+ *
211
+ * A few examples are provided below.
212
+ *
213
+ * • A mode named "100%" can have both the High (manufacturer specific) and Max (standard) mode tag. Clients
214
+ * seeking the mode for either High or Max will find the same mode in this case.
215
+ *
216
+ * • A mode that includes a LowEnergy tag can be displayed by the client using a widget icon that shows a
217
+ * green leaf.
218
+ *
219
+ * • A mode that includes a LowNoise tag may be used by the client when the user wishes for a lower level of
220
+ * audible sound, less likely to disturb the household’s activities.
221
+ *
222
+ * • A mode that includes a LowEnergy tag (standard, defined in this cluster specification) and also a
223
+ * Delicate tag (standard, defined in the namespace of a Laundry Mode derived cluster).
224
+ *
225
+ * • A mode that includes both a generic Quick tag (defined here), and Vacuum and Mop tags, (defined in the
226
+ * RVC Clean cluster that is a derivation of this cluster).
227
+ *
228
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.3
229
+ */
230
+ modeTags: TlvField(2, TlvArray(TlvModeTagStruct, { maxLength: 8 }))
231
+ });
232
+
233
+ /**
234
+ * The table below lists the changes relative to the Mode Base cluster for the fields of the ModeOptionStruct type.
235
+ * A blank field indicates no change.
236
+ *
237
+ * At least one entry in the SupportedModes attribute shall include the Vacuum and/or the Mop mode tag in the
238
+ * ModeTags field list.
239
+ *
240
+ * @see {@link MatterSpecification.v13.Cluster} § 7.3.5.1
241
+ */
242
+ export interface ModeOption extends TypeFromSchema<typeof TlvModeOption> {}
243
+
244
+ export enum ModeChangeStatus {
245
+ /**
246
+ * @see {@link MatterSpecification.v13.Cluster} § 7.3.7.1
247
+ */
248
+ CleaningInProgress = 64,
249
+
250
+ /**
251
+ * Switching to the mode indicated by the NewMode field is allowed and possible. The CurrentMode attribute is
252
+ * set to the value of the NewMode field.
253
+ *
254
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.7.2.1.2
255
+ */
256
+ Success = 0,
257
+
258
+ /**
259
+ * The value of the NewMode field doesn’t match any entries in the SupportedMode attribute.
260
+ *
261
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.7.2.1.2
262
+ */
263
+ UnsupportedMode = 1,
264
+
265
+ /**
266
+ * Generic failure code, indicating that switching to the mode indicated by the NewMode field is not allowed or
267
+ * not possible.
268
+ *
269
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.7.2.1.2
270
+ */
271
+ GenericFailure = 2,
272
+
273
+ /**
274
+ * The received request cannot be handled due to the current mode of the device
275
+ *
276
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.7.2.1.2
277
+ */
278
+ InvalidInMode = 3
62
279
  }
63
280
 
64
281
  /**
@@ -87,7 +304,7 @@ export namespace RvcCleanMode {
87
304
  */
88
305
  supportedModes: FixedAttribute(
89
306
  0x0,
90
- TlvArray(ModeBase.TlvModeOption, { minLength: 2, maxLength: 255 }),
307
+ TlvArray(TlvModeOption, { minLength: 2, maxLength: 255 }),
91
308
  { default: [] }
92
309
  ),
93
310
 
@@ -18,9 +18,11 @@ import {
18
18
  import { TlvArray } from "../tlv/TlvArray.js";
19
19
  import { TlvString } from "../tlv/TlvString.js";
20
20
  import { TlvNullable } from "../tlv/TlvNullable.js";
21
- import { TlvUInt8, TlvUInt32 } from "../tlv/TlvNumber.js";
22
- import { OperationalState as OperationalStateNamespace } from "./operational-state.js";
21
+ import { TlvUInt8, TlvUInt32, TlvEnum } from "../tlv/TlvNumber.js";
22
+ import { TlvField, TlvOptionalField, TlvObject } from "../tlv/TlvObject.js";
23
+ import { TypeFromSchema } from "../tlv/TlvSchema.js";
23
24
  import { TlvNoArguments } from "../tlv/TlvNoArguments.js";
25
+ import { OperationalState as OperationalStateNamespace } from "./operational-state.js";
24
26
  import { Identity } from "#general";
25
27
  import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
26
28
 
@@ -62,6 +64,36 @@ export namespace RvcOperationalState {
62
64
  Docked = 66
63
65
  }
64
66
 
67
+ /**
68
+ * The OperationalStateStruct is used to indicate a possible state of the device.
69
+ *
70
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.2
71
+ */
72
+ export const TlvOperationalStateStruct = TlvObject({
73
+ /**
74
+ * This shall be populated with a value from the OperationalStateEnum.
75
+ *
76
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.2.1
77
+ */
78
+ operationalStateId: TlvField(0, TlvEnum<OperationalState>()),
79
+
80
+ /**
81
+ * This field shall be present if the OperationalStateID is from the set reserved for Manufacturer Specific
82
+ * States, otherwise it shall NOT be present. If present, this shall contain a human-readable description of
83
+ * the operational state.
84
+ *
85
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.2.2
86
+ */
87
+ operationalStateLabel: TlvOptionalField(1, TlvString.bound({ maxLength: 64 }))
88
+ });
89
+
90
+ /**
91
+ * The OperationalStateStruct is used to indicate a possible state of the device.
92
+ *
93
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.2
94
+ */
95
+ export interface OperationalStateStruct extends TypeFromSchema<typeof TlvOperationalStateStruct> {}
96
+
65
97
  /**
66
98
  * The values defined herein are applicable to this derived cluster of Operational State only and are additional to
67
99
  * the set of values defined in Operational State itself.
@@ -110,6 +142,79 @@ export namespace RvcOperationalState {
110
142
  MopCleaningPadMissing = 71
111
143
  }
112
144
 
145
+ /**
146
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.4
147
+ */
148
+ export const TlvErrorStateStruct = TlvObject({
149
+ /**
150
+ * This shall be populated with a value from the ErrorStateEnum.
151
+ *
152
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.4.1
153
+ */
154
+ errorStateId: TlvField(0, TlvEnum<ErrorState>()),
155
+
156
+ /**
157
+ * This field shall be present if the ErrorStateID is from the set reserved for Manufacturer Specific Errors,
158
+ * otherwise it shall NOT be present. If present, this shall contain a human-readable description of the
159
+ * ErrorStateID; e.g. for a manufacturer specific ErrorStateID of "0x80" the ErrorStateLabel may contain "My
160
+ * special error".
161
+ *
162
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.4.2
163
+ */
164
+ errorStateLabel: TlvOptionalField(1, TlvString.bound({ maxLength: 64 })),
165
+
166
+ /**
167
+ * This shall be a human-readable string that provides details about the error condition. As an example, if the
168
+ * ErrorStateID indicates that the device is a Robotic Vacuum that is stuck, the ErrorStateDetails contains
169
+ * "left wheel blocked".
170
+ *
171
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.4.3
172
+ */
173
+ errorStateDetails: TlvOptionalField(2, TlvString.bound({ maxLength: 64 }))
174
+ });
175
+
176
+ /**
177
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.4.4
178
+ */
179
+ export interface ErrorStateStruct extends TypeFromSchema<typeof TlvErrorStateStruct> {}
180
+
181
+ /**
182
+ * Input to the RvcOperationalState operationalCommandResponse command
183
+ *
184
+ * @see {@link MatterSpecification.v13.Cluster} § 7.4.5
185
+ */
186
+ export const TlvOperationalCommandResponse = TlvObject({
187
+ /**
188
+ * This shall indicate the success or otherwise of the attempted command invocation. On a successful invocation
189
+ * of the attempted command, the ErrorStateID shall be populated with NoError. Please see the individual
190
+ * command sections for additional specific requirements on population.
191
+ *
192
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.6.5.1
193
+ */
194
+ commandResponseState: TlvField(0, TlvErrorStateStruct)
195
+ });
196
+
197
+ /**
198
+ * Input to the RvcOperationalState operationalCommandResponse command
199
+ *
200
+ * @see {@link MatterSpecification.v13.Cluster} § 7.4.5
201
+ */
202
+ export interface OperationalCommandResponse extends TypeFromSchema<typeof TlvOperationalCommandResponse> {}
203
+
204
+ /**
205
+ * Body of the RvcOperationalState operationalError event
206
+ *
207
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.7.1
208
+ */
209
+ export const TlvOperationalErrorEvent = TlvObject({ errorState: TlvField(0, TlvErrorStateStruct) });
210
+
211
+ /**
212
+ * Body of the RvcOperationalState operationalError event
213
+ *
214
+ * @see {@link MatterSpecification.v13.Cluster} § 1.14.7.1
215
+ */
216
+ export interface OperationalErrorEvent extends TypeFromSchema<typeof TlvOperationalErrorEvent> {}
217
+
113
218
  /**
114
219
  * @see {@link Cluster}
115
220
  */
@@ -176,11 +281,7 @@ export namespace RvcOperationalState {
176
281
  *
177
282
  * @see {@link MatterSpecification.v13.Cluster} § 1.14.5.4
178
283
  */
179
- operationalStateList: Attribute(
180
- 0x3,
181
- TlvArray(OperationalStateNamespace.TlvOperationalStateStruct),
182
- { default: [] }
183
- ),
284
+ operationalStateList: Attribute(0x3, TlvArray(TlvOperationalStateStruct), { default: [] }),
184
285
 
185
286
  /**
186
287
  * This attribute specifies the current operational state of a device. This shall be populated with a valid
@@ -188,7 +289,7 @@ export namespace RvcOperationalState {
188
289
  *
189
290
  * @see {@link MatterSpecification.v13.Cluster} § 1.14.5.5
190
291
  */
191
- operationalState: Attribute(0x4, TlvUInt8),
292
+ operationalState: Attribute(0x4, TlvEnum<OperationalState>()),
192
293
 
193
294
  /**
194
295
  * This attribute shall specify the details of any current error condition being experienced on the device
@@ -199,7 +300,7 @@ export namespace RvcOperationalState {
199
300
  *
200
301
  * @see {@link MatterSpecification.v13.Cluster} § 1.14.5.6
201
302
  */
202
- operationalError: Attribute(0x5, OperationalStateNamespace.TlvErrorState)
303
+ operationalError: Attribute(0x5, TlvErrorStateStruct)
203
304
  },
204
305
 
205
306
  commands: {
@@ -223,7 +324,7 @@ export namespace RvcOperationalState {
223
324
  *
224
325
  * @see {@link MatterSpecification.v13.Cluster} § 7.4.5.1
225
326
  */
226
- goHome: OptionalCommand(0x80, TlvNoArguments, 0x4, OperationalStateNamespace.TlvOperationalCommandResponse)
327
+ goHome: OptionalCommand(0x80, TlvNoArguments, 0x4, TlvOperationalCommandResponse)
227
328
  },
228
329
 
229
330
  events: {
@@ -235,7 +336,7 @@ export namespace RvcOperationalState {
235
336
  *
236
337
  * @see {@link MatterSpecification.v13.Cluster} § 1.14.7.1
237
338
  */
238
- operationalError: Event(0x0, EventPriority.Critical, OperationalStateNamespace.TlvOperationalErrorEvent),
339
+ operationalError: Event(0x0, EventPriority.Critical, TlvOperationalErrorEvent),
239
340
 
240
341
  /**
241
342
  * This event is generated when the overall operation ends, successfully or otherwise. For example, the