matterbridge 3.1.7-dev-20250723-8e073ce → 3.1.7

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 (248) hide show
  1. package/CHANGELOG.md +8 -17
  2. package/README-SERVICE.md +1 -0
  3. package/dist/cli.d.ts +26 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +91 -2
  6. package/dist/cli.js.map +1 -0
  7. package/dist/cliEmitter.d.ts +34 -0
  8. package/dist/cliEmitter.d.ts.map +1 -0
  9. package/dist/cliEmitter.js +30 -0
  10. package/dist/cliEmitter.js.map +1 -0
  11. package/dist/clusters/export.d.ts +2 -0
  12. package/dist/clusters/export.d.ts.map +1 -0
  13. package/dist/clusters/export.js +2 -0
  14. package/dist/clusters/export.js.map +1 -0
  15. package/dist/defaultConfigSchema.d.ts +28 -0
  16. package/dist/defaultConfigSchema.d.ts.map +1 -0
  17. package/dist/defaultConfigSchema.js +24 -0
  18. package/dist/defaultConfigSchema.js.map +1 -0
  19. package/dist/deviceManager.d.ts +112 -0
  20. package/dist/deviceManager.d.ts.map +1 -0
  21. package/dist/deviceManager.js +94 -1
  22. package/dist/deviceManager.js.map +1 -0
  23. package/dist/devices/batteryStorage.d.ts +48 -0
  24. package/dist/devices/batteryStorage.d.ts.map +1 -0
  25. package/dist/devices/batteryStorage.js +48 -1
  26. package/dist/devices/batteryStorage.js.map +1 -0
  27. package/dist/devices/dishwasher.d.ts +91 -0
  28. package/dist/devices/dishwasher.d.ts.map +1 -0
  29. package/dist/devices/dishwasher.js +78 -3
  30. package/dist/devices/dishwasher.js.map +1 -0
  31. package/dist/devices/evse.d.ts +75 -0
  32. package/dist/devices/evse.d.ts.map +1 -0
  33. package/dist/devices/evse.js +74 -10
  34. package/dist/devices/evse.js.map +1 -0
  35. package/dist/devices/export.d.ts +11 -0
  36. package/dist/devices/export.d.ts.map +1 -0
  37. package/dist/devices/export.js +2 -0
  38. package/dist/devices/export.js.map +1 -0
  39. package/dist/devices/extractorHood.d.ts +46 -0
  40. package/dist/devices/extractorHood.d.ts.map +1 -0
  41. package/dist/devices/extractorHood.js +42 -0
  42. package/dist/devices/extractorHood.js.map +1 -0
  43. package/dist/devices/heatPump.d.ts +47 -0
  44. package/dist/devices/heatPump.d.ts.map +1 -0
  45. package/dist/devices/heatPump.js +50 -2
  46. package/dist/devices/heatPump.js.map +1 -0
  47. package/dist/devices/laundryDryer.d.ts +87 -0
  48. package/dist/devices/laundryDryer.d.ts.map +1 -0
  49. package/dist/devices/laundryDryer.js +83 -6
  50. package/dist/devices/laundryDryer.js.map +1 -0
  51. package/dist/devices/laundryWasher.d.ts +242 -0
  52. package/dist/devices/laundryWasher.d.ts.map +1 -0
  53. package/dist/devices/laundryWasher.js +91 -7
  54. package/dist/devices/laundryWasher.js.map +1 -0
  55. package/dist/devices/roboticVacuumCleaner.d.ts +112 -0
  56. package/dist/devices/roboticVacuumCleaner.d.ts.map +1 -0
  57. package/dist/devices/roboticVacuumCleaner.js +93 -7
  58. package/dist/devices/roboticVacuumCleaner.js.map +1 -0
  59. package/dist/devices/solarPower.d.ts +40 -0
  60. package/dist/devices/solarPower.d.ts.map +1 -0
  61. package/dist/devices/solarPower.js +38 -0
  62. package/dist/devices/solarPower.js.map +1 -0
  63. package/dist/devices/waterHeater.d.ts +111 -0
  64. package/dist/devices/waterHeater.d.ts.map +1 -0
  65. package/dist/devices/waterHeater.js +82 -2
  66. package/dist/devices/waterHeater.js.map +1 -0
  67. package/dist/dgram/coap.d.ts +205 -0
  68. package/dist/dgram/coap.d.ts.map +1 -0
  69. package/dist/dgram/coap.js +126 -13
  70. package/dist/dgram/coap.js.map +1 -0
  71. package/dist/dgram/dgram.d.ts +140 -0
  72. package/dist/dgram/dgram.d.ts.map +1 -0
  73. package/dist/dgram/dgram.js +113 -2
  74. package/dist/dgram/dgram.js.map +1 -0
  75. package/dist/dgram/mb_coap.d.ts +24 -0
  76. package/dist/dgram/mb_coap.d.ts.map +1 -0
  77. package/dist/dgram/mb_coap.js +41 -3
  78. package/dist/dgram/mb_coap.js.map +1 -0
  79. package/dist/dgram/mb_mdns.d.ts +24 -0
  80. package/dist/dgram/mb_mdns.d.ts.map +1 -0
  81. package/dist/dgram/mb_mdns.js +51 -13
  82. package/dist/dgram/mb_mdns.js.map +1 -0
  83. package/dist/dgram/mdns.d.ts +288 -0
  84. package/dist/dgram/mdns.d.ts.map +1 -0
  85. package/dist/dgram/mdns.js +300 -135
  86. package/dist/dgram/mdns.js.map +1 -0
  87. package/dist/dgram/multicast.d.ts +65 -0
  88. package/dist/dgram/multicast.d.ts.map +1 -0
  89. package/dist/dgram/multicast.js +60 -1
  90. package/dist/dgram/multicast.js.map +1 -0
  91. package/dist/dgram/unicast.d.ts +56 -0
  92. package/dist/dgram/unicast.d.ts.map +1 -0
  93. package/dist/dgram/unicast.js +54 -0
  94. package/dist/dgram/unicast.js.map +1 -0
  95. package/dist/frontend.d.ts +304 -0
  96. package/dist/frontend.d.ts.map +1 -0
  97. package/dist/frontend.js +435 -21
  98. package/dist/frontend.js.map +1 -0
  99. package/dist/globalMatterbridge.d.ts +59 -0
  100. package/dist/globalMatterbridge.d.ts.map +1 -0
  101. package/dist/globalMatterbridge.js +47 -0
  102. package/dist/globalMatterbridge.js.map +1 -0
  103. package/dist/helpers.d.ts +48 -0
  104. package/dist/helpers.d.ts.map +1 -0
  105. package/dist/helpers.js +53 -0
  106. package/dist/helpers.js.map +1 -0
  107. package/dist/index.d.ts +33 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +30 -1
  110. package/dist/index.js.map +1 -0
  111. package/dist/logger/export.d.ts +2 -0
  112. package/dist/logger/export.d.ts.map +1 -0
  113. package/dist/logger/export.js +1 -0
  114. package/dist/logger/export.js.map +1 -0
  115. package/dist/matter/behaviors.d.ts +2 -0
  116. package/dist/matter/behaviors.d.ts.map +1 -0
  117. package/dist/matter/behaviors.js +2 -0
  118. package/dist/matter/behaviors.js.map +1 -0
  119. package/dist/matter/clusters.d.ts +2 -0
  120. package/dist/matter/clusters.d.ts.map +1 -0
  121. package/dist/matter/clusters.js +2 -0
  122. package/dist/matter/clusters.js.map +1 -0
  123. package/dist/matter/devices.d.ts +2 -0
  124. package/dist/matter/devices.d.ts.map +1 -0
  125. package/dist/matter/devices.js +2 -0
  126. package/dist/matter/devices.js.map +1 -0
  127. package/dist/matter/endpoints.d.ts +2 -0
  128. package/dist/matter/endpoints.d.ts.map +1 -0
  129. package/dist/matter/endpoints.js +2 -0
  130. package/dist/matter/endpoints.js.map +1 -0
  131. package/dist/matter/export.d.ts +5 -0
  132. package/dist/matter/export.d.ts.map +1 -0
  133. package/dist/matter/export.js +3 -0
  134. package/dist/matter/export.js.map +1 -0
  135. package/dist/matter/types.d.ts +3 -0
  136. package/dist/matter/types.d.ts.map +1 -0
  137. package/dist/matter/types.js +3 -0
  138. package/dist/matter/types.js.map +1 -0
  139. package/dist/matterbridge.d.ts +463 -0
  140. package/dist/matterbridge.d.ts.map +1 -0
  141. package/dist/matterbridge.js +843 -58
  142. package/dist/matterbridge.js.map +1 -0
  143. package/dist/matterbridgeAccessoryPlatform.d.ts +42 -0
  144. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
  145. package/dist/matterbridgeAccessoryPlatform.js +36 -0
  146. package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
  147. package/dist/matterbridgeBehaviors.d.ts +1351 -0
  148. package/dist/matterbridgeBehaviors.d.ts.map +1 -0
  149. package/dist/matterbridgeBehaviors.js +65 -5
  150. package/dist/matterbridgeBehaviors.js.map +1 -0
  151. package/dist/matterbridgeDeviceTypes.d.ts +709 -0
  152. package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
  153. package/dist/matterbridgeDeviceTypes.js +579 -15
  154. package/dist/matterbridgeDeviceTypes.js.map +1 -0
  155. package/dist/matterbridgeDynamicPlatform.d.ts +42 -0
  156. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
  157. package/dist/matterbridgeDynamicPlatform.js +36 -0
  158. package/dist/matterbridgeDynamicPlatform.js.map +1 -0
  159. package/dist/matterbridgeEndpoint.d.ts +1348 -0
  160. package/dist/matterbridgeEndpoint.d.ts.map +1 -0
  161. package/dist/matterbridgeEndpoint.js +1220 -51
  162. package/dist/matterbridgeEndpoint.js.map +1 -0
  163. package/dist/matterbridgeEndpointHelpers.d.ts +406 -0
  164. package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
  165. package/dist/matterbridgeEndpointHelpers.js +353 -18
  166. package/dist/matterbridgeEndpointHelpers.js.map +1 -0
  167. package/dist/matterbridgePlatform.d.ts +310 -0
  168. package/dist/matterbridgePlatform.d.ts.map +1 -0
  169. package/dist/matterbridgePlatform.js +233 -0
  170. package/dist/matterbridgePlatform.js.map +1 -0
  171. package/dist/matterbridgeTypes.d.ts +195 -0
  172. package/dist/matterbridgeTypes.d.ts.map +1 -0
  173. package/dist/matterbridgeTypes.js +25 -0
  174. package/dist/matterbridgeTypes.js.map +1 -0
  175. package/dist/pluginManager.d.ts +270 -0
  176. package/dist/pluginManager.d.ts.map +1 -0
  177. package/dist/pluginManager.js +249 -3
  178. package/dist/pluginManager.js.map +1 -0
  179. package/dist/shelly.d.ts +174 -0
  180. package/dist/shelly.d.ts.map +1 -0
  181. package/dist/shelly.js +168 -7
  182. package/dist/shelly.js.map +1 -0
  183. package/dist/storage/export.d.ts +2 -0
  184. package/dist/storage/export.d.ts.map +1 -0
  185. package/dist/storage/export.js +1 -0
  186. package/dist/storage/export.js.map +1 -0
  187. package/dist/update.d.ts +59 -0
  188. package/dist/update.d.ts.map +1 -0
  189. package/dist/update.js +54 -0
  190. package/dist/update.js.map +1 -0
  191. package/dist/utils/colorUtils.d.ts +117 -0
  192. package/dist/utils/colorUtils.d.ts.map +1 -0
  193. package/dist/utils/colorUtils.js +263 -2
  194. package/dist/utils/colorUtils.js.map +1 -0
  195. package/dist/utils/commandLine.d.ts +59 -0
  196. package/dist/utils/commandLine.d.ts.map +1 -0
  197. package/dist/utils/commandLine.js +54 -0
  198. package/dist/utils/commandLine.js.map +1 -0
  199. package/dist/utils/copyDirectory.d.ts +33 -0
  200. package/dist/utils/copyDirectory.d.ts.map +1 -0
  201. package/dist/utils/copyDirectory.js +38 -1
  202. package/dist/utils/copyDirectory.js.map +1 -0
  203. package/dist/utils/createDirectory.d.ts +34 -0
  204. package/dist/utils/createDirectory.d.ts.map +1 -0
  205. package/dist/utils/createDirectory.js +33 -0
  206. package/dist/utils/createDirectory.js.map +1 -0
  207. package/dist/utils/createZip.d.ts +39 -0
  208. package/dist/utils/createZip.d.ts.map +1 -0
  209. package/dist/utils/createZip.js +47 -2
  210. package/dist/utils/createZip.js.map +1 -0
  211. package/dist/utils/deepCopy.d.ts +32 -0
  212. package/dist/utils/deepCopy.d.ts.map +1 -0
  213. package/dist/utils/deepCopy.js +39 -0
  214. package/dist/utils/deepCopy.js.map +1 -0
  215. package/dist/utils/deepEqual.d.ts +54 -0
  216. package/dist/utils/deepEqual.d.ts.map +1 -0
  217. package/dist/utils/deepEqual.js +72 -1
  218. package/dist/utils/deepEqual.js.map +1 -0
  219. package/dist/utils/error.d.ts +44 -0
  220. package/dist/utils/error.d.ts.map +1 -0
  221. package/dist/utils/error.js +41 -0
  222. package/dist/utils/error.js.map +1 -0
  223. package/dist/utils/export.d.ts +12 -0
  224. package/dist/utils/export.d.ts.map +1 -0
  225. package/dist/utils/export.js +1 -0
  226. package/dist/utils/export.js.map +1 -0
  227. package/dist/utils/hex.d.ts +49 -0
  228. package/dist/utils/hex.d.ts.map +1 -0
  229. package/dist/utils/hex.js +58 -0
  230. package/dist/utils/hex.js.map +1 -0
  231. package/dist/utils/isvalid.d.ts +103 -0
  232. package/dist/utils/isvalid.d.ts.map +1 -0
  233. package/dist/utils/isvalid.js +101 -0
  234. package/dist/utils/isvalid.js.map +1 -0
  235. package/dist/utils/network.d.ts +74 -0
  236. package/dist/utils/network.d.ts.map +1 -0
  237. package/dist/utils/network.js +81 -5
  238. package/dist/utils/network.js.map +1 -0
  239. package/dist/utils/spawn.d.ts +33 -0
  240. package/dist/utils/spawn.d.ts.map +1 -0
  241. package/dist/utils/spawn.js +40 -0
  242. package/dist/utils/spawn.js.map +1 -0
  243. package/dist/utils/wait.d.ts +56 -0
  244. package/dist/utils/wait.d.ts.map +1 -0
  245. package/dist/utils/wait.js +62 -9
  246. package/dist/utils/wait.js.map +1 -0
  247. package/npm-shrinkwrap.json +2 -2
  248. package/package.json +2 -1
@@ -1,11 +1,53 @@
1
+ /**
2
+ * @description This file contains the LaundryDryer class.
3
+ * @file src/devices/laundryDryer.ts
4
+ * @author Luca Liguori
5
+ * @created 2025-06-29
6
+ * @version 1.1.0
7
+ * @license Apache-2.0
8
+ *
9
+ * Copyright 2025, 2026, 2027 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
1
23
  import { LaundryWasherMode } from '@matter/main/clusters/laundry-washer-mode';
2
24
  import { TemperatureControl } from '@matter/main/clusters/temperature-control';
3
25
  import { LaundryDryerControls } from '@matter/main/clusters/laundry-dryer-controls';
4
26
  import { LaundryDryerControlsServer } from '@matter/main/behaviors/laundry-dryer-controls';
27
+ // Matterbridge
5
28
  import { laundryDryer, powerSource } from '../matterbridgeDeviceTypes.js';
6
29
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
7
30
  import { MatterbridgeLaundryWasherModeServer, MatterbridgeLevelTemperatureControlServer, MatterbridgeNumberTemperatureControlServer } from './laundryWasher.js';
8
31
  export class LaundryDryer extends MatterbridgeEndpoint {
32
+ /**
33
+ * Creates an instance of the LaundryDryer class.
34
+ *
35
+ * @param {string} name - The name of the laundry dryer.
36
+ * @param {string} serial - The serial number of the laundry dryer.
37
+ * @param {number} [currentMode] - The current mode of the laundry dryer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
38
+ * @param {LaundryWasherMode.ModeOption[]} [supportedModes] - The supported modes of the laundry dryer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
39
+ * @param {number} [selectedTemperatureLevel] - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
40
+ * @param {string[]} [supportedTemperatureLevels] - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']. Fixed attribute.
41
+ * @param {number} [temperatureSetpoint] - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
42
+ * @param {number} [minTemperature] - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
43
+ * @param {number} [maxTemperature] - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
44
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
45
+ * @param {OperationalState.OperationalStateEnum} [operationalState] - The operational state of the laundry washer. Defaults to OperationalState.OperationalStateEnum.Off.
46
+ *
47
+ * Remarks:
48
+ * - If `temperatureSetpoint` is provided, the `createNumberTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
49
+ * - If `temperatureSetpoint` is not provided, the `createLevelTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with feature TemperatureLevel.
50
+ */
9
51
  constructor(name, serial, currentMode, supportedModes, selectedTemperatureLevel, supportedTemperatureLevels, temperatureSetpoint, minTemperature, maxTemperature, step, operationalState) {
10
52
  super([laundryDryer, powerSource], { uniqueStorageKey: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` }, true);
11
53
  this.createDefaultIdentifyClusterServer();
@@ -20,6 +62,14 @@ export class LaundryDryer extends MatterbridgeEndpoint {
20
62
  this.createLevelTemperatureControlClusterServer(selectedTemperatureLevel, supportedTemperatureLevels);
21
63
  this.createDefaultOperationalStateClusterServer(operationalState);
22
64
  }
65
+ /**
66
+ * Creates a default Laundry Washer Mode Cluster Server.
67
+ *
68
+ * @param {number} currentMode - The current mode of the laundry washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
69
+ * @param {LaundryWasherMode.ModeOption[]} supportedModes - The supported modes of the laundry washer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
70
+ *
71
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
72
+ */
23
73
  createDefaultLaundryWasherModeClusterServer(currentMode = 2, supportedModes = [
24
74
  { label: 'Delicate', mode: 1, modeTags: [{ value: LaundryWasherMode.ModeTag.Delicate }] },
25
75
  { label: 'Normal', mode: 2, modeTags: [{ value: LaundryWasherMode.ModeTag.Normal }] },
@@ -27,18 +77,34 @@ export class LaundryDryer extends MatterbridgeEndpoint {
27
77
  { label: 'Whites', mode: 4, modeTags: [{ value: LaundryWasherMode.ModeTag.Whites }] },
28
78
  ]) {
29
79
  this.behaviors.require(MatterbridgeLaundryWasherModeServer, {
30
- supportedModes,
31
- currentMode,
80
+ supportedModes, // Fixed attribute.
81
+ currentMode, // Persistent attribute.
32
82
  });
33
83
  return this;
34
84
  }
85
+ /**
86
+ * Creates a default Laundry Dryer Controls Cluster Server.
87
+ *
88
+ * @param {LaundryDryerControls.DrynessLevel} selectedDrynessLevel - The selected dryness level. Default is undefined.
89
+ * @param {LaundryDryerControls.DrynessLevel[]} supportedDrynessLevels - The supported dryness levels. Default is [Low, Normal, Extra, Max].
90
+ *
91
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
92
+ */
35
93
  createDefaultLaundryDryerControlsClusterServer(selectedDrynessLevel, supportedDrynessLevels) {
36
94
  this.behaviors.require(LaundryDryerControlsServer, {
37
95
  supportedDrynessLevels: supportedDrynessLevels ?? [LaundryDryerControls.DrynessLevel.Low, LaundryDryerControls.DrynessLevel.Normal, LaundryDryerControls.DrynessLevel.Extra, LaundryDryerControls.DrynessLevel.Max],
38
- selectedDrynessLevel,
96
+ selectedDrynessLevel, // Writable
39
97
  });
40
98
  return this;
41
99
  }
100
+ /**
101
+ * Creates a TemperatureControl Cluster Server with feature TemperatureLevel.
102
+ *
103
+ * @param {number} selectedTemperatureLevel - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
104
+ * @param {string[]} supportedTemperatureLevels - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°'].
105
+ *
106
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
107
+ */
42
108
  createLevelTemperatureControlClusterServer(selectedTemperatureLevel = 1, supportedTemperatureLevels = ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']) {
43
109
  this.behaviors.require(MatterbridgeLevelTemperatureControlServer.with(TemperatureControl.Feature.TemperatureLevel), {
44
110
  selectedTemperatureLevel,
@@ -46,13 +112,24 @@ export class LaundryDryer extends MatterbridgeEndpoint {
46
112
  });
47
113
  return this;
48
114
  }
115
+ /**
116
+ * Creates a TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
117
+ *
118
+ * @param {number} temperatureSetpoint - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
119
+ * @param {number} minTemperature - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
120
+ * @param {number} maxTemperature - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
121
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
122
+ *
123
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
124
+ */
49
125
  createNumberTemperatureControlClusterServer(temperatureSetpoint = 40 * 100, minTemperature = 30 * 100, maxTemperature = 60 * 100, step = 10 * 100) {
50
126
  this.behaviors.require(MatterbridgeNumberTemperatureControlServer.with(TemperatureControl.Feature.TemperatureNumber, TemperatureControl.Feature.TemperatureStep), {
51
127
  temperatureSetpoint,
52
- minTemperature,
53
- maxTemperature,
54
- step,
128
+ minTemperature, // Fixed attribute
129
+ maxTemperature, // Fixed attribute
130
+ step, // Fixed attribute
55
131
  });
56
132
  return this;
57
133
  }
58
134
  }
135
+ //# sourceMappingURL=laundryDryer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"laundryDryer.js","sourceRoot":"","sources":["../../src/devices/laundryDryer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAE3F,eAAe;AACf,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,mCAAmC,EAAE,yCAAyC,EAAE,0CAA0C,EAAE,MAAM,oBAAoB,CAAC;AAEhK,MAAM,OAAO,YAAa,SAAQ,oBAAoB;IACpD;;;;;;;;;;;;;;;;;;OAkBG;IACH,YACE,IAAY,EACZ,MAAc,EACd,WAAoB,EACpB,cAA+C,EAC/C,wBAAiC,EACjC,0BAAqC,EACrC,mBAA4B,EAC5B,cAAuB,EACvB,cAAuB,EACvB,IAAa,EACb,gBAAwD;QAExD,KAAK,CAAC,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,gBAAgB,EAAE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EAAE,GAAG,GAAG;QAC/K,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,0CAA0C,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;YAChK,mBAAmB;YACnB,cAAc,EAAE,kBAAkB;YAClC,cAAc,EAAE,kBAAkB;YAClC,IAAI,EAAE,kBAAkB;SACzB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @description This file contains the LaundryWasher class.
3
+ * @file src/devices/laundryWasher.ts
4
+ * @author Luca Liguori
5
+ * @created 2025-05-25
6
+ * @version 1.1.0
7
+ * @license Apache-2.0
8
+ *
9
+ * Copyright 2025, 2026, 2027 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
23
+ import { MaybePromise } from '@matter/main';
24
+ import { OperationalState } from '@matter/main/clusters/operational-state';
25
+ import { LaundryWasherControls } from '@matter/main/clusters/laundry-washer-controls';
26
+ import { LaundryWasherMode } from '@matter/main/clusters/laundry-washer-mode';
27
+ import { TemperatureControl } from '@matter/main/clusters/temperature-control';
28
+ import { ModeBase } from '@matter/main/clusters/mode-base';
29
+ import { TemperatureControlServer } from '@matter/main/behaviors/temperature-control';
30
+ import { LaundryWasherModeServer } from '@matter/main/behaviors/laundry-washer-mode';
31
+ import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
32
+ export declare class LaundryWasher extends MatterbridgeEndpoint {
33
+ /**
34
+ * Creates an instance of the LaundryWasher class.
35
+ *
36
+ * @param {string} name - The name of the laundry washer.
37
+ * @param {string} serial - The serial number of the laundry washer.
38
+ * @param {number} [currentMode] - The current mode of the laundry washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
39
+ * @param {LaundryWasherMode.ModeOption[]} [supportedModes] - The supported modes of the laundry washer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
40
+ * @param {number} [spinSpeedCurrent] - The current spin speed as index of the spinSpeeds array. Defaults to 2 (which corresponds to '1200').
41
+ * @param {string[]} [spinSpeeds] - The supported spin speeds. Defaults to ['400', '800', '1200', '1600'].
42
+ * @param {LaundryWasherControls.NumberOfRinses} [numberOfRinses] - The number of rinses. Defaults to LaundryWasherControls.NumberOfRinses.Normal (which corresponds to 1 rinse).
43
+ * @param {LaundryWasherControls.NumberOfRinses[]} [supportedRinses] - The supported rinses. Defaults to [NumberOfRinses.None, NumberOfRinses.Normal, NumberOfRinses.Max, NumberOfRinses.Extra].
44
+ * @param {number} [selectedTemperatureLevel] - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
45
+ * @param {string[]} [supportedTemperatureLevels] - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']. Fixed attribute.
46
+ * @param {number} [temperatureSetpoint] - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
47
+ * @param {number} [minTemperature] - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
48
+ * @param {number} [maxTemperature] - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
49
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
50
+ * @param {OperationalState.OperationalStateEnum} [operationalState] - The operational state of the laundry washer. Defaults to OperationalState.OperationalStateEnum.Off.
51
+ *
52
+ * Remarks:
53
+ * - If `temperatureSetpoint` is provided, the `createNumberTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
54
+ * - If `temperatureSetpoint` is not provided, the `createLevelTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with feature TemperatureLevel.
55
+ */
56
+ constructor(name: string, serial: string, currentMode?: number, supportedModes?: LaundryWasherMode.ModeOption[], spinSpeedCurrent?: number, spinSpeeds?: string[], numberOfRinses?: LaundryWasherControls.NumberOfRinses, supportedRinses?: LaundryWasherControls.NumberOfRinses[], selectedTemperatureLevel?: number, supportedTemperatureLevels?: string[], temperatureSetpoint?: number, minTemperature?: number, maxTemperature?: number, step?: number, operationalState?: OperationalState.OperationalStateEnum);
57
+ /**
58
+ * Creates a default Laundry Washer Mode Cluster Server.
59
+ *
60
+ * @param {number} currentMode - The current mode of the laundry washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
61
+ * @param {LaundryWasherMode.ModeOption[]} supportedModes - The supported modes of the laundry washer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
62
+ *
63
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
64
+ */
65
+ createDefaultLaundryWasherModeClusterServer(currentMode?: number, supportedModes?: LaundryWasherMode.ModeOption[]): this;
66
+ /**
67
+ * Creates a Laundry Washer Controls Cluster Server with feature Spin for selecting the spin speed and feature Rinse for selecting the number of rinses.
68
+ *
69
+ * @param {number} spinSpeedCurrent - The current spin speed as index of the spinSpeeds array. Default to 2 (which corresponds to '1200').
70
+ * @param {string[]} spinSpeeds - The supported spin speeds. Default to ['400', '800', '1200', '1600'].
71
+ * @param {LaundryWasherControls.NumberOfRinses} numberOfRinses - The number of rinses. Default to LaundryWasherControls.NumberOfRinses.Normal (which corresponds to 1 rinse).
72
+ * @param {LaundryWasherControls.NumberOfRinses[]} supportedRinses - The supported rinses. Default to [NumberOfRinses.None, NumberOfRinses.Normal, NumberOfRinses.Max, NumberOfRinses.Extra].
73
+ *
74
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
75
+ */
76
+ createDefaultLaundryWasherControlsClusterServer(spinSpeedCurrent?: number, spinSpeeds?: string[], numberOfRinses?: LaundryWasherControls.NumberOfRinses, supportedRinses?: LaundryWasherControls.NumberOfRinses[]): this;
77
+ /**
78
+ * Creates a TemperatureControl Cluster Server with feature TemperatureLevel.
79
+ *
80
+ * @param {number} selectedTemperatureLevel - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
81
+ * @param {string[]} supportedTemperatureLevels - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°'].
82
+ *
83
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
84
+ */
85
+ createLevelTemperatureControlClusterServer(selectedTemperatureLevel?: number, supportedTemperatureLevels?: string[]): this;
86
+ /**
87
+ * Creates a TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
88
+ *
89
+ * @param {number} temperatureSetpoint - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
90
+ * @param {number} minTemperature - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
91
+ * @param {number} maxTemperature - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
92
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
93
+ *
94
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
95
+ */
96
+ createNumberTemperatureControlClusterServer(temperatureSetpoint?: number, minTemperature?: number, maxTemperature?: number, step?: number): this;
97
+ }
98
+ declare const MatterbridgeLevelTemperatureControlServer_base: import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
99
+ readonly id: 86;
100
+ readonly name: "TemperatureControl";
101
+ readonly revision: 1;
102
+ readonly features: {
103
+ readonly temperatureNumber: import("@matter/types").BitFlag;
104
+ readonly temperatureLevel: import("@matter/types").BitFlag;
105
+ readonly temperatureStep: import("@matter/types").BitFlag;
106
+ };
107
+ readonly commands: {
108
+ readonly setTemperature: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
109
+ targetTemperature: import("@matter/types").OptionalFieldType<number>;
110
+ targetTemperatureLevel: import("@matter/types").OptionalFieldType<number>;
111
+ }>, void, any>;
112
+ };
113
+ readonly extensions: readonly [{
114
+ readonly flags: {
115
+ readonly temperatureNumber: true;
116
+ };
117
+ readonly component: {
118
+ readonly attributes: {
119
+ readonly temperatureSetpoint: import("@matter/types").Attribute<number, any>;
120
+ readonly minTemperature: import("@matter/types").FixedAttribute<number, any>;
121
+ readonly maxTemperature: import("@matter/types").FixedAttribute<number, any>;
122
+ };
123
+ };
124
+ }, {
125
+ readonly flags: {
126
+ readonly temperatureStep: true;
127
+ };
128
+ readonly component: {
129
+ readonly attributes: {
130
+ readonly step: import("@matter/types").FixedAttribute<number, any>;
131
+ };
132
+ };
133
+ }, {
134
+ readonly flags: {
135
+ readonly temperatureLevel: true;
136
+ };
137
+ readonly component: {
138
+ readonly attributes: {
139
+ readonly selectedTemperatureLevel: import("@matter/types").Attribute<number, any>;
140
+ readonly supportedTemperatureLevels: import("@matter/types").Attribute<string[], any>;
141
+ };
142
+ };
143
+ }, {
144
+ readonly flags: {
145
+ readonly temperatureStep: true;
146
+ readonly temperatureNumber: false;
147
+ };
148
+ readonly component: false;
149
+ }, {
150
+ readonly flags: {
151
+ readonly temperatureNumber: true;
152
+ readonly temperatureLevel: true;
153
+ };
154
+ readonly component: false;
155
+ }, {
156
+ readonly flags: {
157
+ readonly temperatureNumber: false;
158
+ readonly temperatureLevel: false;
159
+ };
160
+ readonly component: false;
161
+ }];
162
+ }>, readonly [TemperatureControl.Feature.TemperatureLevel]>, typeof TemperatureControlServer, import("@matter/main/behaviors/temperature-control").TemperatureControlInterface>;
163
+ export declare class MatterbridgeLevelTemperatureControlServer extends MatterbridgeLevelTemperatureControlServer_base {
164
+ initialize(): void;
165
+ setTemperature(request: TemperatureControl.SetTemperatureRequest): MaybePromise;
166
+ }
167
+ declare const MatterbridgeNumberTemperatureControlServer_base: import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
168
+ readonly id: 86;
169
+ readonly name: "TemperatureControl";
170
+ readonly revision: 1;
171
+ readonly features: {
172
+ readonly temperatureNumber: import("@matter/types").BitFlag;
173
+ readonly temperatureLevel: import("@matter/types").BitFlag;
174
+ readonly temperatureStep: import("@matter/types").BitFlag;
175
+ };
176
+ readonly commands: {
177
+ readonly setTemperature: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
178
+ targetTemperature: import("@matter/types").OptionalFieldType<number>;
179
+ targetTemperatureLevel: import("@matter/types").OptionalFieldType<number>;
180
+ }>, void, any>;
181
+ };
182
+ readonly extensions: readonly [{
183
+ readonly flags: {
184
+ readonly temperatureNumber: true;
185
+ };
186
+ readonly component: {
187
+ readonly attributes: {
188
+ readonly temperatureSetpoint: import("@matter/types").Attribute<number, any>;
189
+ readonly minTemperature: import("@matter/types").FixedAttribute<number, any>;
190
+ readonly maxTemperature: import("@matter/types").FixedAttribute<number, any>;
191
+ };
192
+ };
193
+ }, {
194
+ readonly flags: {
195
+ readonly temperatureStep: true;
196
+ };
197
+ readonly component: {
198
+ readonly attributes: {
199
+ readonly step: import("@matter/types").FixedAttribute<number, any>;
200
+ };
201
+ };
202
+ }, {
203
+ readonly flags: {
204
+ readonly temperatureLevel: true;
205
+ };
206
+ readonly component: {
207
+ readonly attributes: {
208
+ readonly selectedTemperatureLevel: import("@matter/types").Attribute<number, any>;
209
+ readonly supportedTemperatureLevels: import("@matter/types").Attribute<string[], any>;
210
+ };
211
+ };
212
+ }, {
213
+ readonly flags: {
214
+ readonly temperatureStep: true;
215
+ readonly temperatureNumber: false;
216
+ };
217
+ readonly component: false;
218
+ }, {
219
+ readonly flags: {
220
+ readonly temperatureNumber: true;
221
+ readonly temperatureLevel: true;
222
+ };
223
+ readonly component: false;
224
+ }, {
225
+ readonly flags: {
226
+ readonly temperatureNumber: false;
227
+ readonly temperatureLevel: false;
228
+ };
229
+ readonly component: false;
230
+ }];
231
+ }>, readonly [TemperatureControl.Feature.TemperatureNumber, TemperatureControl.Feature.TemperatureStep]>, typeof TemperatureControlServer, import("@matter/main/behaviors/temperature-control").TemperatureControlInterface>;
232
+ export declare class MatterbridgeNumberTemperatureControlServer extends MatterbridgeNumberTemperatureControlServer_base {
233
+ initialize(): void;
234
+ setTemperature(request: TemperatureControl.SetTemperatureRequest): MaybePromise;
235
+ }
236
+ export declare class MatterbridgeLaundryWasherModeServer extends LaundryWasherModeServer {
237
+ initialize(): void;
238
+ protected handleOnOffChange(onOff: boolean): void;
239
+ changeToMode(request: ModeBase.ChangeToModeRequest): MaybePromise<ModeBase.ChangeToModeResponse>;
240
+ }
241
+ export {};
242
+ //# sourceMappingURL=laundryWasher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"laundryWasher.d.ts","sourceRoot":"","sources":["../../src/devices/laundryWasher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAKrF,OAAO,EAAE,oBAAoB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,yCAA0C,SAAQ,8CAA0E;IAC9H,UAAU;IAOV,cAAc,CAAC,OAAO,EAAE,kBAAkB,CAAC,qBAAqB,GAAG,YAAY;CAWzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,0CAA2C,SAAQ,+CAAuH;IAC5K,UAAU;IAKV,cAAc,CAAC,OAAO,EAAE,kBAAkB,CAAC,qBAAqB,GAAG,YAAY;CAWzF;AAED,qBAAa,mCAAoC,SAAQ,uBAAuB;IACrE,UAAU;IAOnB,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO;IASjC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,GAAG,YAAY,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CAc1G"}
@@ -1,3 +1,25 @@
1
+ /**
2
+ * @description This file contains the LaundryWasher class.
3
+ * @file src/devices/laundryWasher.ts
4
+ * @author Luca Liguori
5
+ * @created 2025-05-25
6
+ * @version 1.1.0
7
+ * @license Apache-2.0
8
+ *
9
+ * Copyright 2025, 2026, 2027 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
1
23
  import { LaundryWasherControls } from '@matter/main/clusters/laundry-washer-controls';
2
24
  import { LaundryWasherMode } from '@matter/main/clusters/laundry-washer-mode';
3
25
  import { TemperatureControl } from '@matter/main/clusters/temperature-control';
@@ -5,10 +27,34 @@ import { ModeBase } from '@matter/main/clusters/mode-base';
5
27
  import { TemperatureControlServer } from '@matter/main/behaviors/temperature-control';
6
28
  import { LaundryWasherModeServer } from '@matter/main/behaviors/laundry-washer-mode';
7
29
  import { LaundryWasherControlsServer } from '@matter/main/behaviors/laundry-washer-controls';
30
+ // Matterbridge
8
31
  import { laundryWasher, powerSource } from '../matterbridgeDeviceTypes.js';
9
32
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
10
33
  import { MatterbridgeOnOffServer, MatterbridgeServer } from '../matterbridgeBehaviors.js';
11
34
  export class LaundryWasher extends MatterbridgeEndpoint {
35
+ /**
36
+ * Creates an instance of the LaundryWasher class.
37
+ *
38
+ * @param {string} name - The name of the laundry washer.
39
+ * @param {string} serial - The serial number of the laundry washer.
40
+ * @param {number} [currentMode] - The current mode of the laundry washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
41
+ * @param {LaundryWasherMode.ModeOption[]} [supportedModes] - The supported modes of the laundry washer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
42
+ * @param {number} [spinSpeedCurrent] - The current spin speed as index of the spinSpeeds array. Defaults to 2 (which corresponds to '1200').
43
+ * @param {string[]} [spinSpeeds] - The supported spin speeds. Defaults to ['400', '800', '1200', '1600'].
44
+ * @param {LaundryWasherControls.NumberOfRinses} [numberOfRinses] - The number of rinses. Defaults to LaundryWasherControls.NumberOfRinses.Normal (which corresponds to 1 rinse).
45
+ * @param {LaundryWasherControls.NumberOfRinses[]} [supportedRinses] - The supported rinses. Defaults to [NumberOfRinses.None, NumberOfRinses.Normal, NumberOfRinses.Max, NumberOfRinses.Extra].
46
+ * @param {number} [selectedTemperatureLevel] - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
47
+ * @param {string[]} [supportedTemperatureLevels] - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']. Fixed attribute.
48
+ * @param {number} [temperatureSetpoint] - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
49
+ * @param {number} [minTemperature] - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
50
+ * @param {number} [maxTemperature] - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
51
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
52
+ * @param {OperationalState.OperationalStateEnum} [operationalState] - The operational state of the laundry washer. Defaults to OperationalState.OperationalStateEnum.Off.
53
+ *
54
+ * Remarks:
55
+ * - If `temperatureSetpoint` is provided, the `createNumberTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
56
+ * - If `temperatureSetpoint` is not provided, the `createLevelTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with feature TemperatureLevel.
57
+ */
12
58
  constructor(name, serial, currentMode, supportedModes, spinSpeedCurrent, spinSpeeds, numberOfRinses, supportedRinses, selectedTemperatureLevel, supportedTemperatureLevels, temperatureSetpoint, minTemperature, maxTemperature, step, operationalState) {
13
59
  super([laundryWasher, powerSource], { uniqueStorageKey: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` }, true);
14
60
  this.createDefaultIdentifyClusterServer();
@@ -23,6 +69,14 @@ export class LaundryWasher extends MatterbridgeEndpoint {
23
69
  this.createLevelTemperatureControlClusterServer(selectedTemperatureLevel, supportedTemperatureLevels);
24
70
  this.createDefaultOperationalStateClusterServer(operationalState);
25
71
  }
72
+ /**
73
+ * Creates a default Laundry Washer Mode Cluster Server.
74
+ *
75
+ * @param {number} currentMode - The current mode of the laundry washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
76
+ * @param {LaundryWasherMode.ModeOption[]} supportedModes - The supported modes of the laundry washer. Defaults to a set of common modes (which include Delicate, Normal, Heavy, and Whites). Fixed attribute.
77
+ *
78
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
79
+ */
26
80
  createDefaultLaundryWasherModeClusterServer(currentMode = 2, supportedModes = [
27
81
  { label: 'Delicate', mode: 1, modeTags: [{ value: LaundryWasherMode.ModeTag.Delicate }] },
28
82
  { label: 'Normal', mode: 2, modeTags: [{ value: LaundryWasherMode.ModeTag.Normal }] },
@@ -30,20 +84,38 @@ export class LaundryWasher extends MatterbridgeEndpoint {
30
84
  { label: 'Whites', mode: 4, modeTags: [{ value: LaundryWasherMode.ModeTag.Whites }] },
31
85
  ]) {
32
86
  this.behaviors.require(MatterbridgeLaundryWasherModeServer, {
33
- supportedModes,
34
- currentMode,
87
+ supportedModes, // Fixed attribute.
88
+ currentMode, // Persistent attribute.
35
89
  });
36
90
  return this;
37
91
  }
92
+ /**
93
+ * Creates a Laundry Washer Controls Cluster Server with feature Spin for selecting the spin speed and feature Rinse for selecting the number of rinses.
94
+ *
95
+ * @param {number} spinSpeedCurrent - The current spin speed as index of the spinSpeeds array. Default to 2 (which corresponds to '1200').
96
+ * @param {string[]} spinSpeeds - The supported spin speeds. Default to ['400', '800', '1200', '1600'].
97
+ * @param {LaundryWasherControls.NumberOfRinses} numberOfRinses - The number of rinses. Default to LaundryWasherControls.NumberOfRinses.Normal (which corresponds to 1 rinse).
98
+ * @param {LaundryWasherControls.NumberOfRinses[]} supportedRinses - The supported rinses. Default to [NumberOfRinses.None, NumberOfRinses.Normal, NumberOfRinses.Max, NumberOfRinses.Extra].
99
+ *
100
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
101
+ */
38
102
  createDefaultLaundryWasherControlsClusterServer(spinSpeedCurrent = 2, spinSpeeds = ['400', '800', '1200', '1600'], numberOfRinses = LaundryWasherControls.NumberOfRinses.Normal, supportedRinses = [LaundryWasherControls.NumberOfRinses.None, LaundryWasherControls.NumberOfRinses.Normal, LaundryWasherControls.NumberOfRinses.Max, LaundryWasherControls.NumberOfRinses.Extra]) {
39
103
  this.behaviors.require(LaundryWasherControlsServer.with(LaundryWasherControls.Feature.Spin, LaundryWasherControls.Feature.Rinse), {
40
104
  spinSpeeds,
41
- spinSpeedCurrent,
105
+ spinSpeedCurrent, // Writable and nullable
42
106
  supportedRinses,
43
- numberOfRinses,
107
+ numberOfRinses, // Writable
44
108
  });
45
109
  return this;
46
110
  }
111
+ /**
112
+ * Creates a TemperatureControl Cluster Server with feature TemperatureLevel.
113
+ *
114
+ * @param {number} selectedTemperatureLevel - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
115
+ * @param {string[]} supportedTemperatureLevels - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°'].
116
+ *
117
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
118
+ */
47
119
  createLevelTemperatureControlClusterServer(selectedTemperatureLevel = 1, supportedTemperatureLevels = ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']) {
48
120
  this.behaviors.require(MatterbridgeLevelTemperatureControlServer.with(TemperatureControl.Feature.TemperatureLevel), {
49
121
  selectedTemperatureLevel,
@@ -51,12 +123,22 @@ export class LaundryWasher extends MatterbridgeEndpoint {
51
123
  });
52
124
  return this;
53
125
  }
126
+ /**
127
+ * Creates a TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
128
+ *
129
+ * @param {number} temperatureSetpoint - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
130
+ * @param {number} minTemperature - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
131
+ * @param {number} maxTemperature - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
132
+ * @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
133
+ *
134
+ * @returns {this} The current MatterbridgeEndpoint instance for chaining.
135
+ */
54
136
  createNumberTemperatureControlClusterServer(temperatureSetpoint = 40 * 100, minTemperature = 30 * 100, maxTemperature = 60 * 100, step = 10 * 100) {
55
137
  this.behaviors.require(MatterbridgeNumberTemperatureControlServer.with(TemperatureControl.Feature.TemperatureNumber, TemperatureControl.Feature.TemperatureStep), {
56
138
  temperatureSetpoint,
57
- minTemperature,
58
- maxTemperature,
59
- step,
139
+ minTemperature, // Fixed attribute
140
+ maxTemperature, // Fixed attribute
141
+ step, // Fixed attribute
60
142
  });
61
143
  return this;
62
144
  }
@@ -105,6 +187,7 @@ export class MatterbridgeLaundryWasherModeServer extends LaundryWasherModeServer
105
187
  device.log.info(`MatterbridgeLaundryWasherModeServer initialized: currentMode is ${this.state.currentMode}`);
106
188
  this.reactTo(this.agent.get(MatterbridgeOnOffServer).events.onOff$Changed, this.handleOnOffChange);
107
189
  }
190
+ // Dead Front OnOff Cluster
108
191
  handleOnOffChange(onOff) {
109
192
  const device = this.endpoint.stateOf(MatterbridgeServer);
110
193
  device.log.info(`HandleOnOffChange (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
@@ -129,3 +212,4 @@ export class MatterbridgeLaundryWasherModeServer extends LaundryWasherModeServer
129
212
  }
130
213
  }
131
214
  }
215
+ //# sourceMappingURL=laundryWasher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"laundryWasher.js","sourceRoot":"","sources":["../../src/devices/laundryWasher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,M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