@matterbridge/core 3.7.10 → 3.8.0-dev-20260524-92c5fdd

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 (50) hide show
  1. package/dist/behaviors/activatedCarbonFilterMonitoringServer.d.ts +5 -2
  2. package/dist/behaviors/bindingServer.js +0 -2
  3. package/dist/behaviors/booleanStateConfigurationServer.d.ts +6 -1
  4. package/dist/behaviors/colorControlServer.d.ts +20 -774
  5. package/dist/behaviors/deviceEnergyManagementServer.d.ts +9 -299
  6. package/dist/behaviors/doorLockServer.d.ts +29 -47
  7. package/dist/behaviors/doorLockServer.js +11 -299
  8. package/dist/behaviors/fanControlServer.d.ts +8 -1
  9. package/dist/behaviors/hepaFilterMonitoringServer.d.ts +5 -2
  10. package/dist/behaviors/smokeCoAlarmServer.d.ts +4 -77
  11. package/dist/behaviors/thermostatServer.d.ts +20 -722
  12. package/dist/behaviors/valveConfigurationAndControlServer.d.ts +4 -1
  13. package/dist/behaviors/windowCoveringServer.d.ts +28 -564
  14. package/dist/clusters/closure-control.d.ts +130 -620
  15. package/dist/clusters/closure-control.js +15 -170
  16. package/dist/clusters/closure-dimension.d.ts +148 -814
  17. package/dist/clusters/closure-dimension.js +15 -202
  18. package/dist/clusters/export.d.ts +1 -3
  19. package/dist/clusters/export.js +1 -3
  20. package/dist/clusters/soil-measurement.d.ts +31 -31
  21. package/dist/clusters/soil-measurement.js +29 -19
  22. package/dist/devices/closure.d.ts +14 -291
  23. package/dist/devices/closure.js +6 -13
  24. package/dist/devices/closurePanel.d.ts +13 -370
  25. package/dist/devices/closurePanel.js +9 -15
  26. package/dist/devices/evse.d.ts +7 -1
  27. package/dist/devices/heatPump.js +5 -5
  28. package/dist/devices/irrigationSystem.js +2 -2
  29. package/dist/devices/microwaveOven.d.ts +5 -76
  30. package/dist/devices/roboticVacuumCleaner.js +5 -5
  31. package/dist/devices/soilSensor.d.ts +0 -15
  32. package/dist/devices/soilSensor.js +4 -20
  33. package/dist/devices/temperatureControl.d.ts +10 -130
  34. package/dist/helpers.js +0 -8
  35. package/dist/jestutils/jestBroadcastServerSpy.d.ts +2 -2
  36. package/dist/jestutils/jestMatterTest.js +4 -4
  37. package/dist/jestutils/jestMatterbridgeEndpointSpy.d.ts +34 -37
  38. package/dist/jestutils/jestMatterbridgePlatformSpy.d.ts +4 -4
  39. package/dist/jestutils/jestMatterbridgeTest.js +1 -1
  40. package/dist/matter/export.d.ts +11 -0
  41. package/dist/matter/export.js +11 -0
  42. package/dist/matterbridge.js +3 -1
  43. package/dist/matterbridgeDeviceTypes.d.ts +15 -0
  44. package/dist/matterbridgeDeviceTypes.js +305 -162
  45. package/dist/matterbridgeEndpoint.d.ts +35 -25
  46. package/dist/matterbridgeEndpoint.js +6 -7
  47. package/dist/matterbridgeEndpointCommandHandler.d.ts +3 -59
  48. package/dist/matterbridgeEndpointHelpers.d.ts +83 -1382
  49. package/dist/matterbridgeEndpointHelpers.js +20 -5
  50. package/package.json +6 -6
@@ -1,295 +1,18 @@
1
- import { ClusterBehavior } from '@matter/node';
2
- import { ClusterType } from '@matter/types';
3
- import { ClosureControl } from '../clusters/closure-control.js';
1
+ import { ClosureControlServer } from '@matter/node/behaviors/closure-control';
2
+ import { ClosureControl } from '@matter/types/clusters/closure-control';
4
3
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
5
- export declare namespace ClosureControlServer {
6
- interface State {
7
- mainState: ClosureControl.MainState;
8
- currentErrorList: ClosureControl.ClosureError[];
9
- overallCurrentState: ClosureControl.OverallCurrentState | null;
10
- overallTargetState: ClosureControl.OverallTargetState | null;
11
- countdownTime: number | null;
12
- }
13
- }
14
- declare const ClosureControlServer_base: ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<ClusterType.Of<{
15
- readonly id: 260;
16
- readonly name: "ClosureControl";
17
- readonly revision: 1;
18
- readonly features: {
19
- readonly positioning: import("@matter/types").BitFlag;
20
- readonly motionLatching: import("@matter/types").BitFlag;
21
- readonly instantaneous: import("@matter/types").BitFlag;
22
- readonly speed: import("@matter/types").BitFlag;
23
- readonly ventilation: import("@matter/types").BitFlag;
24
- readonly pedestrian: import("@matter/types").BitFlag;
25
- readonly calibration: import("@matter/types").BitFlag;
26
- readonly protection: import("@matter/types").BitFlag;
27
- readonly manuallyOperable: import("@matter/types").BitFlag;
28
- };
29
- readonly attributes: {
30
- readonly mainState: import("@matter/types").Attribute<ClosureControl.MainState, any>;
31
- readonly currentErrorList: import("@matter/types").Attribute<ClosureControl.ClosureError[], any>;
32
- readonly overallCurrentState: import("@matter/types").Attribute<import("@matter/types").TypeFromFields<{
33
- position: import("@matter/types").OptionalFieldType<ClosureControl.CurrentPosition | null>;
34
- latch: import("@matter/types").OptionalFieldType<boolean | null>;
35
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
36
- secureState: import("@matter/types").OptionalFieldType<boolean | null>;
37
- }> | null, any>;
38
- readonly overallTargetState: import("@matter/types").Attribute<import("@matter/types").TypeFromFields<{
39
- position: import("@matter/types").OptionalFieldType<ClosureControl.TargetPosition | null>;
40
- latch: import("@matter/types").OptionalFieldType<boolean | null>;
41
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
42
- }> | null, any>;
43
- };
44
- readonly commands: {
45
- readonly moveTo: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
46
- position: import("@matter/types").OptionalFieldType<ClosureControl.TargetPosition>;
47
- latch: import("@matter/types").OptionalFieldType<boolean>;
48
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
49
- }>, void, any>;
50
- };
51
- readonly events: {
52
- readonly operationalError: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
53
- errorState: import("@matter/types").FieldType<ClosureControl.ClosureError[]>;
54
- }>, any>;
55
- readonly secureStateChanged: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
56
- secureValue: import("@matter/types").FieldType<boolean>;
57
- }>, any>;
58
- };
59
- readonly extensions: readonly [{
60
- readonly flags: {
61
- readonly instantaneous: false;
62
- };
63
- readonly component: {
64
- readonly commands: {
65
- readonly stop: import("@matter/types").Command<void, void, any>;
66
- };
67
- readonly events: {
68
- readonly movementCompleted: import("@matter/types").Event<void, any>;
69
- };
70
- };
71
- }, {
72
- readonly flags: {
73
- readonly motionLatching: true;
74
- };
75
- readonly component: {
76
- readonly attributes: {
77
- readonly latchControlModes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromPartialBitSchema<{
78
- remoteLatching: import("@matter/types").BitFlag;
79
- remoteUnlatching: import("@matter/types").BitFlag;
80
- }>, any>;
81
- };
82
- };
83
- }, {
84
- readonly flags: {
85
- readonly calibration: true;
86
- };
87
- readonly component: {
88
- readonly commands: {
89
- readonly calibrate: import("@matter/types").Command<void, void, any>;
90
- };
91
- };
92
- }, {
93
- readonly flags: {
94
- readonly manuallyOperable: true;
95
- };
96
- readonly component: {
97
- readonly events: {
98
- readonly engageStateChanged: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
99
- engageValue: import("@matter/types").FieldType<boolean>;
100
- }>, any>;
101
- };
102
- };
103
- }, {
104
- readonly flags: {
105
- readonly positioning: true;
106
- readonly instantaneous: false;
107
- };
108
- readonly component: {
109
- readonly attributes: {
110
- readonly countdownTime: import("@matter/types").Attribute<number | null, any>;
111
- };
112
- };
113
- }, {
114
- readonly flags: {
115
- readonly positioning: false;
116
- readonly motionLatching: false;
117
- };
118
- readonly component: false;
119
- }, {
120
- readonly flags: {
121
- readonly speed: true;
122
- readonly positioning: false;
123
- };
124
- readonly component: false;
125
- }, {
126
- readonly flags: {
127
- readonly speed: true;
128
- readonly instantaneous: true;
129
- };
130
- readonly component: false;
131
- }, {
132
- readonly flags: {
133
- readonly ventilation: true;
134
- readonly positioning: false;
135
- };
136
- readonly component: false;
137
- }, {
138
- readonly flags: {
139
- readonly pedestrian: true;
140
- readonly positioning: false;
141
- };
142
- readonly component: false;
143
- }, {
144
- readonly flags: {
145
- readonly calibration: true;
146
- readonly positioning: false;
147
- };
148
- readonly component: false;
149
- }];
150
- }>, readonly [ClosureControl.Feature.Positioning]>, ClusterBehavior.Type<ClusterType.Of<{
151
- readonly id: 260;
152
- readonly name: "ClosureControl";
153
- readonly revision: 1;
154
- readonly features: {
155
- readonly positioning: import("@matter/types").BitFlag;
156
- readonly motionLatching: import("@matter/types").BitFlag;
157
- readonly instantaneous: import("@matter/types").BitFlag;
158
- readonly speed: import("@matter/types").BitFlag;
159
- readonly ventilation: import("@matter/types").BitFlag;
160
- readonly pedestrian: import("@matter/types").BitFlag;
161
- readonly calibration: import("@matter/types").BitFlag;
162
- readonly protection: import("@matter/types").BitFlag;
163
- readonly manuallyOperable: import("@matter/types").BitFlag;
164
- };
165
- readonly attributes: {
166
- readonly mainState: import("@matter/types").Attribute<ClosureControl.MainState, any>;
167
- readonly currentErrorList: import("@matter/types").Attribute<ClosureControl.ClosureError[], any>;
168
- readonly overallCurrentState: import("@matter/types").Attribute<import("@matter/types").TypeFromFields<{
169
- position: import("@matter/types").OptionalFieldType<ClosureControl.CurrentPosition | null>;
170
- latch: import("@matter/types").OptionalFieldType<boolean | null>;
171
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
172
- secureState: import("@matter/types").OptionalFieldType<boolean | null>;
173
- }> | null, any>;
174
- readonly overallTargetState: import("@matter/types").Attribute<import("@matter/types").TypeFromFields<{
175
- position: import("@matter/types").OptionalFieldType<ClosureControl.TargetPosition | null>;
176
- latch: import("@matter/types").OptionalFieldType<boolean | null>;
177
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
178
- }> | null, any>;
179
- };
180
- readonly commands: {
181
- readonly moveTo: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
182
- position: import("@matter/types").OptionalFieldType<ClosureControl.TargetPosition>;
183
- latch: import("@matter/types").OptionalFieldType<boolean>;
184
- speed: import("@matter/types").OptionalFieldType<import("@matter/types").ThreeLevelAuto>;
185
- }>, void, any>;
186
- };
187
- readonly events: {
188
- readonly operationalError: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
189
- errorState: import("@matter/types").FieldType<ClosureControl.ClosureError[]>;
190
- }>, any>;
191
- readonly secureStateChanged: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
192
- secureValue: import("@matter/types").FieldType<boolean>;
193
- }>, any>;
194
- };
195
- readonly extensions: readonly [{
196
- readonly flags: {
197
- readonly instantaneous: false;
198
- };
199
- readonly component: {
200
- readonly commands: {
201
- readonly stop: import("@matter/types").Command<void, void, any>;
202
- };
203
- readonly events: {
204
- readonly movementCompleted: import("@matter/types").Event<void, any>;
205
- };
206
- };
207
- }, {
208
- readonly flags: {
209
- readonly motionLatching: true;
210
- };
211
- readonly component: {
212
- readonly attributes: {
213
- readonly latchControlModes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromPartialBitSchema<{
214
- remoteLatching: import("@matter/types").BitFlag;
215
- remoteUnlatching: import("@matter/types").BitFlag;
216
- }>, any>;
217
- };
218
- };
219
- }, {
220
- readonly flags: {
221
- readonly calibration: true;
222
- };
223
- readonly component: {
224
- readonly commands: {
225
- readonly calibrate: import("@matter/types").Command<void, void, any>;
226
- };
227
- };
228
- }, {
229
- readonly flags: {
230
- readonly manuallyOperable: true;
231
- };
232
- readonly component: {
233
- readonly events: {
234
- readonly engageStateChanged: import("@matter/types").Event<import("@matter/types").TypeFromFields<{
235
- engageValue: import("@matter/types").FieldType<boolean>;
236
- }>, any>;
237
- };
238
- };
239
- }, {
240
- readonly flags: {
241
- readonly positioning: true;
242
- readonly instantaneous: false;
243
- };
244
- readonly component: {
245
- readonly attributes: {
246
- readonly countdownTime: import("@matter/types").Attribute<number | null, any>;
247
- };
248
- };
249
- }, {
250
- readonly flags: {
251
- readonly positioning: false;
252
- readonly motionLatching: false;
253
- };
254
- readonly component: false;
255
- }, {
256
- readonly flags: {
257
- readonly speed: true;
258
- readonly positioning: false;
259
- };
260
- readonly component: false;
261
- }, {
262
- readonly flags: {
263
- readonly speed: true;
264
- readonly instantaneous: true;
265
- };
266
- readonly component: false;
267
- }, {
268
- readonly flags: {
269
- readonly ventilation: true;
270
- readonly positioning: false;
271
- };
272
- readonly component: false;
273
- }, {
274
- readonly flags: {
275
- readonly pedestrian: true;
276
- readonly positioning: false;
277
- };
278
- readonly component: false;
279
- }, {
280
- readonly flags: {
281
- readonly calibration: true;
282
- readonly positioning: false;
283
- };
284
- readonly component: false;
285
- }];
286
- }>, typeof ClusterBehavior, {
287
- components: never[];
288
- }>, {
289
- components: never[];
290
- }>;
291
- export declare class ClosureControlServer extends ClosureControlServer_base {
292
- state: ClosureControlServer.State;
4
+ declare const MatterbridgeClosureControlServer_base: import("@matter/node").ClusterBehavior.Type<typeof ClosureControlServer, import("@matter/types").ClusterType.WithSupportedFeatures<ClosureControl, {
5
+ speed: true;
6
+ positioning: true;
7
+ motionLatching: true;
8
+ instantaneous: false;
9
+ ventilation: false;
10
+ pedestrian: false;
11
+ calibration: false;
12
+ protection: false;
13
+ manuallyOperable: false;
14
+ }>, import("@matter/types").ClusterType.Concrete, new () => {}, "closureControl">;
15
+ export declare class MatterbridgeClosureControlServer extends MatterbridgeClosureControlServer_base {
293
16
  moveTo: (request: ClosureControl.MoveToRequest) => Promise<void>;
294
17
  stop: () => Promise<void>;
295
18
  }
@@ -1,17 +1,10 @@
1
- import { AttributeElement, ClusterElement, ClusterModel, CommandElement, DatatypeElement, EventElement, FieldElement } from '@matter/main/model';
2
- import { ClusterBehavior } from '@matter/node';
3
- import { ClusterType } from '@matter/types';
1
+ import { ClosureControlServer } from '@matter/node/behaviors/closure-control';
2
+ import { ClosureControl } from '@matter/types/clusters/closure-control';
3
+ import { ThreeLevelAuto } from '@matter/types/globals';
4
4
  import { MatterbridgeServer } from '../behaviors/matterbridgeServer.js';
5
- import { ClosureControl } from '../clusters/closure-control.js';
6
5
  import { closure } from '../matterbridgeDeviceTypes.js';
7
6
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
8
- const ClosureControlSchema = ClusterElement({
9
- id: ClosureControl.Cluster.id,
10
- name: ClosureControl.Cluster.name,
11
- classification: 'application',
12
- }, AttributeElement({ id: 0xfffd, name: 'ClusterRevision', type: 'ClusterRevision', conformance: 'M', default: ClosureControl.Base.revision }), AttributeElement({ id: 0xfffc, name: 'FeatureMap', type: 'FeatureMap', conformance: 'M' }, FieldElement({ name: 'POS', constraint: '0', title: 'Positioning' }), FieldElement({ name: 'ML', constraint: '1', title: 'MotionLatching' }), FieldElement({ name: 'INS', constraint: '2', title: 'Instantaneous' }), FieldElement({ name: 'SPD', constraint: '3', title: 'Speed' }), FieldElement({ name: 'VNT', constraint: '4', title: 'Ventilation' }), FieldElement({ name: 'PED', constraint: '5', title: 'Pedestrian' }), FieldElement({ name: 'CAL', constraint: '6', title: 'Calibration' }), FieldElement({ name: 'PRT', constraint: '7', title: 'Protection' }), FieldElement({ name: 'MAN', constraint: '8', title: 'ManuallyOperable' })), AttributeElement({ name: 'CountdownTime', id: 0x0000, type: 'uint32', conformance: 'POS', default: null, quality: 'X' }), AttributeElement({ name: 'MainState', id: 0x0001, type: 'MainStateEnum', conformance: 'M', constraint: 'desc' }), AttributeElement({ name: 'CurrentErrorList', id: 0x0002, type: 'list', conformance: 'M', default: [] }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' })), AttributeElement({ name: 'OverallCurrentState', id: 0x0003, type: 'OverallCurrentStateStruct', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'OverallTargetState', id: 0x0004, type: 'OverallTargetStateStruct', conformance: 'M', default: null, quality: 'X' }), CommandElement({ name: 'Stop', id: 0x0000, conformance: 'M', direction: 'request', response: 'status' }), CommandElement({ name: 'MoveTo', id: 0x0001, conformance: 'M', direction: 'request', response: 'status' }, FieldElement({ name: 'Position', id: 0, type: 'TargetPositionEnum', conformance: 'O' }), FieldElement({ name: 'Latch', id: 1, type: 'bool', conformance: 'O' }), FieldElement({ name: 'Speed', id: 2, type: 'ThreeLevelAutoEnum', conformance: 'O' })), EventElement({ name: 'OperationalError', id: 0x0000, conformance: 'M', priority: 'critical' }, FieldElement({ name: 'ErrorState', id: 0, type: 'list', conformance: 'M', constraint: 'max 10' }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' }))), EventElement({ name: 'MovementCompleted', id: 0x0001, conformance: 'M', priority: 'info' }), EventElement({ name: 'SecureStateChanged', id: 0x0003, conformance: 'M', priority: 'info' }, FieldElement({ name: 'SecureValue', id: 0, type: 'bool', conformance: 'M' })), DatatypeElement({ name: 'ClosureErrorEnum', type: 'enum8' }, FieldElement({ name: 'PhysicallyBlocked', id: 0, conformance: 'M' }), FieldElement({ name: 'BlockedBySensor', id: 1, conformance: 'M' }), FieldElement({ name: 'TemperatureLimited', id: 2, conformance: 'M' }), FieldElement({ name: 'MaintenanceRequired', id: 3, conformance: 'M' }), FieldElement({ name: 'InternalInterference', id: 4, conformance: 'M' })), DatatypeElement({ name: 'CurrentPositionEnum', type: 'enum8' }, FieldElement({ name: 'FullyClosed', id: 0, conformance: 'M' }), FieldElement({ name: 'FullyOpened', id: 1, conformance: 'M' }), FieldElement({ name: 'PartiallyOpened', id: 2, conformance: 'M' }), FieldElement({ name: 'OpenedForPedestrian', id: 3, conformance: 'M' }), FieldElement({ name: 'OpenedForVentilation', id: 4, conformance: 'M' }), FieldElement({ name: 'OpenedAtSignature', id: 5, conformance: 'M' })), DatatypeElement({ name: 'MainStateEnum', type: 'enum8' }, FieldElement({ name: 'Stopped', id: 0, conformance: 'M' }), FieldElement({ name: 'Moving', id: 1, conformance: 'M' }), FieldElement({ name: 'WaitingForMotion', id: 2, conformance: 'M' }), FieldElement({ name: 'Error', id: 3, conformance: 'M' }), FieldElement({ name: 'Calibrating', id: 4, conformance: 'M' }), FieldElement({ name: 'Protected', id: 5, conformance: 'M' }), FieldElement({ name: 'Disengaged', id: 6, conformance: 'M' }), FieldElement({ name: 'SetupRequired', id: 7, conformance: 'M' })), DatatypeElement({ name: 'TargetPositionEnum', type: 'enum8' }, FieldElement({ name: 'MoveToFullyClosed', id: 0, conformance: 'M' }), FieldElement({ name: 'MoveToFullyOpen', id: 1, conformance: 'M' }), FieldElement({ name: 'MoveToPedestrianPosition', id: 2, conformance: 'M' }), FieldElement({ name: 'MoveToVentilationPosition', id: 3, conformance: 'M' }), FieldElement({ name: 'MoveToSignaturePosition', id: 4, conformance: 'M' })), DatatypeElement({ name: 'OverallCurrentStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0, type: 'CurrentPositionEnum', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 1, type: 'bool', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 2, type: 'ThreeLevelAutoEnum', conformance: 'O' }), FieldElement({ name: 'SecureState', id: 3, type: 'bool', conformance: 'O', default: null, quality: 'X' })), DatatypeElement({ name: 'OverallTargetStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0, type: 'TargetPositionEnum', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 1, type: 'bool', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 2, type: 'ThreeLevelAutoEnum', conformance: 'O' })));
13
- const ClosureControlBehavior = ClusterBehavior.for(ClusterType(ClosureControl.Base), new ClusterModel(ClosureControlSchema));
14
- export class ClosureControlServer extends ClosureControlBehavior.with(ClosureControl.Feature.Positioning) {
7
+ export class MatterbridgeClosureControlServer extends ClosureControlServer.with(ClosureControl.Feature.Positioning, ClosureControl.Feature.MotionLatching, ClosureControl.Feature.Speed) {
15
8
  moveTo = async (request) => {
16
9
  const device = this.endpoint.stateOf(MatterbridgeServer);
17
10
  device.log.info(`MoveTo (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
@@ -27,7 +20,7 @@ export class ClosureControlServer extends ClosureControlBehavior.with(ClosureCon
27
20
  ...previousTarget,
28
21
  ...(request?.position !== undefined ? { position: request.position } : null),
29
22
  ...(request?.latch !== undefined ? { latch: request.latch } : null),
30
- ...(request?.speed !== undefined ? { speed: request.speed } : null),
23
+ speed: request?.speed ?? previousTarget.speed ?? ThreeLevelAuto.Auto,
31
24
  };
32
25
  this.state.overallTargetState = nextTarget;
33
26
  this.state.mainState = ClosureControl.MainState.Moving;
@@ -50,7 +43,7 @@ export class Closure extends MatterbridgeEndpoint {
50
43
  super([closure], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` });
51
44
  this.createDefaultIdentifyClusterServer();
52
45
  this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Matterbridge Closure');
53
- this.behaviors.require(ClosureControlServer, {
46
+ this.behaviors.require(MatterbridgeClosureControlServer, {
54
47
  mainState: options.mainState ?? ClosureControl.MainState.Stopped,
55
48
  currentErrorList: [],
56
49
  overallCurrentState: null,