@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
@@ -44,7 +44,14 @@ export namespace Groups {
44
44
  *
45
45
  * @see {@link MatterSpecification.v13.Cluster} § 1.3.6.1
46
46
  */
47
- export const NameSupportAttribute = { nameSupport: BitFlag(7) };
47
+ export const NameSupportAttribute = {
48
+ nameSupport: BitFlag(7),
49
+
50
+ /**
51
+ * The ability to store a name for a group.
52
+ */
53
+ groupNames: BitFlag(7)
54
+ };
48
55
 
49
56
  /**
50
57
  * Input to the Groups addGroup command
@@ -10,8 +10,12 @@ import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
10
10
  import { BitFlag } from "../schema/BitmapSchema.js";
11
11
  import { FixedAttribute, Attribute, WritableAttribute, 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
 
@@ -60,9 +64,190 @@ export namespace LaundryWasherMode {
60
64
  *
61
65
  * @see {@link MatterSpecification.v13.Cluster} § 8.5.6.1.4
62
66
  */
63
- Whites = 16387
67
+ Whites = 16387,
68
+
69
+ /**
70
+ * The device decides which options, features and setting values to use.
71
+ *
72
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
73
+ */
74
+ Auto = 0,
75
+
76
+ /**
77
+ * The mode of the device is optimizing for faster completion.
78
+ *
79
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
80
+ */
81
+ Quick = 1,
82
+
83
+ /**
84
+ * The device is silent or barely audible while in this mode.
85
+ *
86
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
87
+ */
88
+ Quiet = 2,
89
+
90
+ /**
91
+ * Either the mode is inherently low noise or the device optimizes for that.
92
+ *
93
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
94
+ */
95
+ LowNoise = 3,
96
+
97
+ /**
98
+ * The device is optimizing for lower energy usage in this mode. Sometimes called "Eco mode".
99
+ *
100
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
101
+ */
102
+ LowEnergy = 4,
103
+
104
+ /**
105
+ * A mode suitable for use during vacations or other extended absences.
106
+ *
107
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
108
+ */
109
+ Vacation = 5,
110
+
111
+ /**
112
+ * The mode uses the lowest available setting value.
113
+ *
114
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
115
+ */
116
+ Min = 6,
117
+
118
+ /**
119
+ * The mode uses the highest available setting value.
120
+ *
121
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
122
+ */
123
+ Max = 7,
124
+
125
+ /**
126
+ * The mode is recommended or suitable for use during night time.
127
+ *
128
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
129
+ */
130
+ Night = 8,
131
+
132
+ /**
133
+ * The mode is recommended or suitable for use during day time.
134
+ *
135
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
136
+ */
137
+ Day = 9
64
138
  }
65
139
 
140
+ /**
141
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
142
+ *
143
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
144
+ */
145
+ export const TlvModeTagStruct = TlvObject({
146
+ /**
147
+ * If the MfgCode field exists, the Value field shall be in the manufacturer-specific value range (see Section
148
+ * 1.10.8, “Mode Namespace”).
149
+ *
150
+ * This field shall indicate the manufacturer’s VendorID and it shall determine the meaning of the Value field.
151
+ *
152
+ * The same manufacturer code and mode tag value in separate cluster instances are part of the same namespace
153
+ * and have the same meaning. For example: a manufacturer tag meaning "pinch" can be used both in a cluster
154
+ * whose purpose is to choose the amount of sugar, or in a cluster whose purpose is to choose the amount of
155
+ * salt.
156
+ *
157
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.1
158
+ */
159
+ mfgCode: TlvOptionalField(0, TlvVendorId),
160
+
161
+ /**
162
+ * This field shall indicate the mode tag within a mode tag namespace which is either manufacturer specific or
163
+ * standard.
164
+ *
165
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.2
166
+ */
167
+ value: TlvField(1, TlvEnum<ModeTag>())
168
+ });
169
+
170
+ /**
171
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
172
+ *
173
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
174
+ */
175
+ export interface ModeTagStruct extends TypeFromSchema<typeof TlvModeTagStruct> {}
176
+
177
+ /**
178
+ * The table below lists the changes relative to the Mode Base cluster for the fields of the ModeOptionStruct type.
179
+ * A blank field indicates no change.
180
+ *
181
+ * At least one entry in the SupportedModes attribute shall include the Normal mode tag in the ModeTags field list.
182
+ *
183
+ * @see {@link MatterSpecification.v13.Cluster} § 8.5.4.1
184
+ */
185
+ export const TlvModeOption = TlvObject({
186
+ /**
187
+ * This field shall indicate readable text that describes the mode option, so that a client can provide it to
188
+ * the user to indicate what this option means. This field is meant to be readable and understandable by the
189
+ * user.
190
+ *
191
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.1
192
+ */
193
+ label: TlvField(0, TlvString.bound({ maxLength: 64 })),
194
+
195
+ /**
196
+ * This field is used to identify the mode option.
197
+ *
198
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.2
199
+ */
200
+ mode: TlvField(1, TlvUInt8),
201
+
202
+ /**
203
+ * This field shall contain a list of tags that are associated with the mode option. This may be used by
204
+ * clients to determine the full or the partial semantics of a certain mode, depending on which tags they
205
+ * understand, using standard definitions and/or manufacturer specific namespace definitions.
206
+ *
207
+ * The standard mode tags are defined in this cluster specification. For the derived cluster instances, if the
208
+ * specification of the derived cluster defines a namespace, the set of standard mode tags also includes the
209
+ * mode tag values from that namespace.
210
+ *
211
+ * Mode tags can help clients look for options that meet certain criteria, render the user interface, use
212
+ *
213
+ * the mode in an automation, or to craft help text their voice-driven interfaces. A mode tag shall be either a
214
+ * standard tag or a manufacturer specific tag, as defined in each ModeTagStruct list entry.
215
+ *
216
+ * A mode option may have more than one mode tag. A mode option may be associated with a mixture of standard
217
+ * and manufacturer specific mode tags. A mode option shall be associated with at least one standard mode tag.
218
+ *
219
+ * A few examples are provided below.
220
+ *
221
+ * • A mode named "100%" can have both the High (manufacturer specific) and Max (standard) mode tag. Clients
222
+ * seeking the mode for either High or Max will find the same mode in this case.
223
+ *
224
+ * • A mode that includes a LowEnergy tag can be displayed by the client using a widget icon that shows a
225
+ * green leaf.
226
+ *
227
+ * • A mode that includes a LowNoise tag may be used by the client when the user wishes for a lower level of
228
+ * audible sound, less likely to disturb the household’s activities.
229
+ *
230
+ * • A mode that includes a LowEnergy tag (standard, defined in this cluster specification) and also a
231
+ * Delicate tag (standard, defined in the namespace of a Laundry Mode derived cluster).
232
+ *
233
+ * • A mode that includes both a generic Quick tag (defined here), and Vacuum and Mop tags, (defined in the
234
+ * RVC Clean cluster that is a derivation of this cluster).
235
+ *
236
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.3
237
+ */
238
+ modeTags: TlvField(2, TlvArray(TlvModeTagStruct, { maxLength: 8 }))
239
+ });
240
+
241
+ /**
242
+ * The table below lists the changes relative to the Mode Base cluster for the fields of the ModeOptionStruct type.
243
+ * A blank field indicates no change.
244
+ *
245
+ * At least one entry in the SupportedModes attribute shall include the Normal mode tag in the ModeTags field list.
246
+ *
247
+ * @see {@link MatterSpecification.v13.Cluster} § 8.5.4.1
248
+ */
249
+ export interface ModeOption extends TypeFromSchema<typeof TlvModeOption> {}
250
+
66
251
  /**
67
252
  * These elements and properties are present in all LaundryWasherMode clusters.
68
253
  */
@@ -89,7 +274,7 @@ export namespace LaundryWasherMode {
89
274
  */
90
275
  supportedModes: FixedAttribute(
91
276
  0x0,
92
- TlvArray(ModeBase.TlvModeOption, { minLength: 2, maxLength: 255 }),
277
+ TlvArray(TlvModeOption, { minLength: 2, maxLength: 255 }),
93
278
  { default: [] }
94
279
  ),
95
280
 
@@ -10,8 +10,11 @@ import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
10
10
  import { BitFlag } from "../schema/BitmapSchema.js";
11
11
  import { FixedAttribute, Attribute } from "../cluster/Cluster.js";
12
12
  import { TlvArray } from "../tlv/TlvArray.js";
13
- import { ModeBase } from "./mode-base.js";
14
- import { TlvUInt8 } from "../tlv/TlvNumber.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";
15
18
  import { Identity } from "#general";
16
19
  import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
17
20
 
@@ -46,9 +49,184 @@ export namespace MicrowaveOvenMode {
46
49
  *
47
50
  * @see {@link MatterSpecification.v13.Cluster} § 8.12.6.1
48
51
  */
49
- Defrost = 16385
52
+ Defrost = 16385,
53
+
54
+ /**
55
+ * The device decides which options, features and setting values to use.
56
+ *
57
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
58
+ */
59
+ Auto = 0,
60
+
61
+ /**
62
+ * The mode of the device is optimizing for faster completion.
63
+ *
64
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
65
+ */
66
+ Quick = 1,
67
+
68
+ /**
69
+ * The device is silent or barely audible while in this mode.
70
+ *
71
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
72
+ */
73
+ Quiet = 2,
74
+
75
+ /**
76
+ * Either the mode is inherently low noise or the device optimizes for that.
77
+ *
78
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
79
+ */
80
+ LowNoise = 3,
81
+
82
+ /**
83
+ * The device is optimizing for lower energy usage in this mode. Sometimes called "Eco mode".
84
+ *
85
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
86
+ */
87
+ LowEnergy = 4,
88
+
89
+ /**
90
+ * A mode suitable for use during vacations or other extended absences.
91
+ *
92
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
93
+ */
94
+ Vacation = 5,
95
+
96
+ /**
97
+ * The mode uses the lowest available setting value.
98
+ *
99
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
100
+ */
101
+ Min = 6,
102
+
103
+ /**
104
+ * The mode uses the highest available setting value.
105
+ *
106
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
107
+ */
108
+ Max = 7,
109
+
110
+ /**
111
+ * The mode is recommended or suitable for use during night time.
112
+ *
113
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
114
+ */
115
+ Night = 8,
116
+
117
+ /**
118
+ * The mode is recommended or suitable for use during day time.
119
+ *
120
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
121
+ */
122
+ Day = 9
50
123
  }
51
124
 
125
+ /**
126
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
127
+ *
128
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
129
+ */
130
+ export const TlvModeTagStruct = TlvObject({
131
+ /**
132
+ * If the MfgCode field exists, the Value field shall be in the manufacturer-specific value range (see Section
133
+ * 1.10.8, “Mode Namespace”).
134
+ *
135
+ * This field shall indicate the manufacturer’s VendorID and it shall determine the meaning of the Value field.
136
+ *
137
+ * The same manufacturer code and mode tag value in separate cluster instances are part of the same namespace
138
+ * and have the same meaning. For example: a manufacturer tag meaning "pinch" can be used both in a cluster
139
+ * whose purpose is to choose the amount of sugar, or in a cluster whose purpose is to choose the amount of
140
+ * salt.
141
+ *
142
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.1
143
+ */
144
+ mfgCode: TlvOptionalField(0, TlvVendorId),
145
+
146
+ /**
147
+ * This field shall indicate the mode tag within a mode tag namespace which is either manufacturer specific or
148
+ * standard.
149
+ *
150
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.2
151
+ */
152
+ value: TlvField(1, TlvEnum<ModeTag>())
153
+ });
154
+
155
+ /**
156
+ * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
157
+ *
158
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
159
+ */
160
+ export interface ModeTagStruct extends TypeFromSchema<typeof TlvModeTagStruct> {}
161
+
162
+ /**
163
+ * This is a struct representing a possible mode of the server.
164
+ *
165
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2
166
+ */
167
+ export const TlvModeOption = TlvObject({
168
+ /**
169
+ * This field shall indicate readable text that describes the mode option, so that a client can provide it to
170
+ * the user to indicate what this option means. This field is meant to be readable and understandable by the
171
+ * user.
172
+ *
173
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.1
174
+ */
175
+ label: TlvField(0, TlvString.bound({ maxLength: 64 })),
176
+
177
+ /**
178
+ * This field is used to identify the mode option.
179
+ *
180
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.2
181
+ */
182
+ mode: TlvField(1, TlvUInt8),
183
+
184
+ /**
185
+ * This field shall contain a list of tags that are associated with the mode option. This may be used by
186
+ * clients to determine the full or the partial semantics of a certain mode, depending on which tags they
187
+ * understand, using standard definitions and/or manufacturer specific namespace definitions.
188
+ *
189
+ * The standard mode tags are defined in this cluster specification. For the derived cluster instances, if the
190
+ * specification of the derived cluster defines a namespace, the set of standard mode tags also includes the
191
+ * mode tag values from that namespace.
192
+ *
193
+ * Mode tags can help clients look for options that meet certain criteria, render the user interface, use
194
+ *
195
+ * the mode in an automation, or to craft help text their voice-driven interfaces. A mode tag shall be either a
196
+ * standard tag or a manufacturer specific tag, as defined in each ModeTagStruct list entry.
197
+ *
198
+ * A mode option may have more than one mode tag. A mode option may be associated with a mixture of standard
199
+ * and manufacturer specific mode tags. A mode option shall be associated with at least one standard mode tag.
200
+ *
201
+ * A few examples are provided below.
202
+ *
203
+ * • A mode named "100%" can have both the High (manufacturer specific) and Max (standard) mode tag. Clients
204
+ * seeking the mode for either High or Max will find the same mode in this case.
205
+ *
206
+ * • A mode that includes a LowEnergy tag can be displayed by the client using a widget icon that shows a
207
+ * green leaf.
208
+ *
209
+ * • A mode that includes a LowNoise tag may be used by the client when the user wishes for a lower level of
210
+ * audible sound, less likely to disturb the household’s activities.
211
+ *
212
+ * • A mode that includes a LowEnergy tag (standard, defined in this cluster specification) and also a
213
+ * Delicate tag (standard, defined in the namespace of a Laundry Mode derived cluster).
214
+ *
215
+ * • A mode that includes both a generic Quick tag (defined here), and Vacuum and Mop tags, (defined in the
216
+ * RVC Clean cluster that is a derivation of this cluster).
217
+ *
218
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.3
219
+ */
220
+ modeTags: TlvField(2, TlvArray(TlvModeTagStruct, { maxLength: 8 }))
221
+ });
222
+
223
+ /**
224
+ * This is a struct representing a possible mode of the server.
225
+ *
226
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2
227
+ */
228
+ export interface ModeOption extends TypeFromSchema<typeof TlvModeOption> {}
229
+
52
230
  /**
53
231
  * These elements and properties are present in all MicrowaveOvenMode clusters.
54
232
  */
@@ -75,7 +253,7 @@ export namespace MicrowaveOvenMode {
75
253
  */
76
254
  supportedModes: FixedAttribute(
77
255
  0x0,
78
- TlvArray(ModeBase.TlvModeOption, { minLength: 2, maxLength: 255 }),
256
+ TlvArray(TlvModeOption, { minLength: 2, maxLength: 255 }),
79
257
  { default: [] }
80
258
  ),
81
259
 
@@ -14,7 +14,7 @@ import {
14
14
  OptionalWritableAttribute,
15
15
  Command
16
16
  } from "../cluster/Cluster.js";
17
- import { TlvUInt8, TlvUInt16, TlvEnum } from "../tlv/TlvNumber.js";
17
+ import { TlvUInt8, TlvEnum } from "../tlv/TlvNumber.js";
18
18
  import { TlvNullable } from "../tlv/TlvNullable.js";
19
19
  import { BitFlag } from "../schema/BitmapSchema.js";
20
20
  import { TlvArray } from "../tlv/TlvArray.js";
@@ -43,12 +43,84 @@ export namespace ModeBase {
43
43
  OnOff = "OnOff"
44
44
  }
45
45
 
46
+ export enum ModeTag {
47
+ /**
48
+ * The device decides which options, features and setting values to use.
49
+ *
50
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
51
+ */
52
+ Auto = 0,
53
+
54
+ /**
55
+ * The mode of the device is optimizing for faster completion.
56
+ *
57
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
58
+ */
59
+ Quick = 1,
60
+
61
+ /**
62
+ * The device is silent or barely audible while in this mode.
63
+ *
64
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
65
+ */
66
+ Quiet = 2,
67
+
68
+ /**
69
+ * Either the mode is inherently low noise or the device optimizes for that.
70
+ *
71
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
72
+ */
73
+ LowNoise = 3,
74
+
75
+ /**
76
+ * The device is optimizing for lower energy usage in this mode. Sometimes called "Eco mode".
77
+ *
78
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
79
+ */
80
+ LowEnergy = 4,
81
+
82
+ /**
83
+ * A mode suitable for use during vacations or other extended absences.
84
+ *
85
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
86
+ */
87
+ Vacation = 5,
88
+
89
+ /**
90
+ * The mode uses the lowest available setting value.
91
+ *
92
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
93
+ */
94
+ Min = 6,
95
+
96
+ /**
97
+ * The mode uses the highest available setting value.
98
+ *
99
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
100
+ */
101
+ Max = 7,
102
+
103
+ /**
104
+ * The mode is recommended or suitable for use during night time.
105
+ *
106
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
107
+ */
108
+ Night = 8,
109
+
110
+ /**
111
+ * The mode is recommended or suitable for use during day time.
112
+ *
113
+ * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
114
+ */
115
+ Day = 9
116
+ }
117
+
46
118
  /**
47
119
  * A Mode Tag is meant to be interpreted by the client for the purpose the cluster serves.
48
120
  *
49
121
  * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
50
122
  */
51
- export const TlvModeTag = TlvObject({
123
+ export const TlvModeTagStruct = TlvObject({
52
124
  /**
53
125
  * If the MfgCode field exists, the Value field shall be in the manufacturer-specific value range (see Section
54
126
  * 1.10.8, “Mode Namespace”).
@@ -70,7 +142,7 @@ export namespace ModeBase {
70
142
  *
71
143
  * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1.2
72
144
  */
73
- value: TlvField(1, TlvUInt16)
145
+ value: TlvField(1, TlvEnum<ModeTag>())
74
146
  });
75
147
 
76
148
  /**
@@ -78,7 +150,7 @@ export namespace ModeBase {
78
150
  *
79
151
  * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.1
80
152
  */
81
- export interface ModeTag extends TypeFromSchema<typeof TlvModeTag> {}
153
+ export interface ModeTagStruct extends TypeFromSchema<typeof TlvModeTagStruct> {}
82
154
 
83
155
  /**
84
156
  * This is a struct representing a possible mode of the server.
@@ -138,7 +210,7 @@ export namespace ModeBase {
138
210
  *
139
211
  * @see {@link MatterSpecification.v13.Cluster} § 1.10.5.2.3
140
212
  */
141
- modeTags: TlvField(2, TlvArray(TlvModeTag, { maxLength: 8 }))
213
+ modeTags: TlvField(2, TlvArray(TlvModeTagStruct, { maxLength: 8 }))
142
214
  });
143
215
 
144
216
  /**
@@ -243,78 +315,6 @@ export namespace ModeBase {
243
315
  InvalidInMode = 3
244
316
  }
245
317
 
246
- export enum ModeTagEnum {
247
- /**
248
- * The device decides which options, features and setting values to use.
249
- *
250
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
251
- */
252
- Auto = 0,
253
-
254
- /**
255
- * The mode of the device is optimizing for faster completion.
256
- *
257
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
258
- */
259
- Quick = 1,
260
-
261
- /**
262
- * The device is silent or barely audible while in this mode.
263
- *
264
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
265
- */
266
- Quiet = 2,
267
-
268
- /**
269
- * Either the mode is inherently low noise or the device optimizes for that.
270
- *
271
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
272
- */
273
- LowNoise = 3,
274
-
275
- /**
276
- * The device is optimizing for lower energy usage in this mode. Sometimes called "Eco mode".
277
- *
278
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
279
- */
280
- LowEnergy = 4,
281
-
282
- /**
283
- * A mode suitable for use during vacations or other extended absences.
284
- *
285
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
286
- */
287
- Vacation = 5,
288
-
289
- /**
290
- * The mode uses the lowest available setting value.
291
- *
292
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
293
- */
294
- Min = 6,
295
-
296
- /**
297
- * The mode uses the highest available setting value.
298
- *
299
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
300
- */
301
- Max = 7,
302
-
303
- /**
304
- * The mode is recommended or suitable for use during night time.
305
- *
306
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
307
- */
308
- Night = 8,
309
-
310
- /**
311
- * The mode is recommended or suitable for use during day time.
312
- *
313
- * @see {@link MatterSpecification.v13.Cluster} § 1.10.8
314
- */
315
- Day = 9
316
- }
317
-
318
318
  /**
319
319
  * A ModeBaseCluster supports these elements if it supports feature OnOff.
320
320
  */