zigbee-herdsman-converters 21.11.0 → 21.13.0

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 (45) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/converters/fromZigbee.js +5 -5
  3. package/converters/fromZigbee.js.map +1 -1
  4. package/converters/toZigbee.d.ts.map +1 -1
  5. package/converters/toZigbee.js +14 -2
  6. package/converters/toZigbee.js.map +1 -1
  7. package/devices/datek.d.ts.map +1 -1
  8. package/devices/datek.js +13 -1
  9. package/devices/datek.js.map +1 -1
  10. package/devices/dresden_elektronik.js +1 -1
  11. package/devices/dresden_elektronik.js.map +1 -1
  12. package/devices/hzc_electric.d.ts.map +1 -1
  13. package/devices/hzc_electric.js +11 -0
  14. package/devices/hzc_electric.js.map +1 -1
  15. package/devices/index.d.ts.map +1 -1
  16. package/devices/index.js +2 -0
  17. package/devices/index.js.map +1 -1
  18. package/devices/lumi.d.ts.map +1 -1
  19. package/devices/lumi.js +8 -0
  20. package/devices/lumi.js.map +1 -1
  21. package/devices/lutron.d.ts.map +1 -1
  22. package/devices/lutron.js +2 -1
  23. package/devices/lutron.js.map +1 -1
  24. package/devices/moes.js +2 -2
  25. package/devices/moes.js.map +1 -1
  26. package/devices/salus_controls.d.ts.map +1 -1
  27. package/devices/salus_controls.js +41 -2
  28. package/devices/salus_controls.js.map +1 -1
  29. package/devices/sonoff.d.ts.map +1 -1
  30. package/devices/sonoff.js +5 -0
  31. package/devices/sonoff.js.map +1 -1
  32. package/devices/tuya.d.ts.map +1 -1
  33. package/devices/tuya.js +174 -7
  34. package/devices/tuya.js.map +1 -1
  35. package/devices/xal.d.ts.map +1 -1
  36. package/devices/xal.js +9 -2
  37. package/devices/xal.js.map +1 -1
  38. package/devices/yokis.d.ts +4 -0
  39. package/devices/yokis.d.ts.map +1 -0
  40. package/devices/yokis.js +2454 -0
  41. package/devices/yokis.js.map +1 -0
  42. package/lib/modernExtend.d.ts.map +1 -1
  43. package/lib/modernExtend.js +5 -1
  44. package/lib/modernExtend.js.map +1 -1
  45. package/package.json +5 -5
@@ -0,0 +1,2454 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const zigbee_herdsman_1 = require("zigbee-herdsman");
37
+ const exposes = __importStar(require("../lib/exposes"));
38
+ const logger_1 = require("../lib/logger");
39
+ const modernExtend_1 = require("../lib/modernExtend");
40
+ const utils = __importStar(require("../lib/utils"));
41
+ // #region Constants
42
+ const e = exposes.presets;
43
+ const ea = exposes.access;
44
+ // const manufacturerOptions = {manufacturerCode: Zcl.ManufacturerCode.YOKIS};
45
+ const NS = 'zhc:yokis';
46
+ // stateAfterBlinkEnum (manuSpecificYokisLightControl)
47
+ const stateAfterBlinkEnum = {
48
+ previous: 0x00,
49
+ off: 0x01,
50
+ on: 0x02,
51
+ infinite: 0x03,
52
+ };
53
+ // resetActionEnum (manuSpecificYokisDevice)
54
+ const resetActionEnum = {
55
+ factory_reset: 0x00,
56
+ configuration_reset: 0x01,
57
+ network_reset: 0x02,
58
+ };
59
+ // inputModeEnum (manuSpecificYokisInput)
60
+ const inputModeEnum = {
61
+ unknown: 0x00,
62
+ push_button: 0x01, // default
63
+ switch: 0x02,
64
+ relay: 0x03,
65
+ fp_in: 0x04, // Fil pilote
66
+ };
67
+ // #endregion
68
+ // #region Custom cluster definition
69
+ const YokisClustersDefinition = {
70
+ manuSpecificYokisDevice: {
71
+ ID: 0xfc01,
72
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
73
+ attributes: {
74
+ // Indicate if the device configuration has changed. 0 to 0xFFFE -> No Change, 0xFFFF -> Change have been detected
75
+ configurationChanged: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
76
+ },
77
+ commands: {
78
+ // Reset setting depending on RESET ACTION value
79
+ resetToFactorySettings: {
80
+ ID: 0x00,
81
+ response: 0,
82
+ parameters: [
83
+ // 0x00 -> Factory reset, 0x01 -> Configuration Reset, 0x02 -> Network Reset
84
+ { name: 'uc_ResetAction', type: zigbee_herdsman_1.Zcl.DataType.INT8 },
85
+ ],
86
+ },
87
+ // Relaunch BLE advertising for 15 minutes
88
+ relaunchBleAdvert: {
89
+ ID: 0x11,
90
+ response: 0,
91
+ parameters: [],
92
+ },
93
+ // Open ZigBee network
94
+ openNetwork: {
95
+ ID: 0x12,
96
+ response: 0,
97
+ parameters: [
98
+ // Opening time wanted from 1 to 255 seconds,0 means closing the network.
99
+ { name: 'uc_OpeningTime', type: zigbee_herdsman_1.Zcl.DataType.INT8 },
100
+ ],
101
+ },
102
+ },
103
+ commandsResponse: {},
104
+ },
105
+ manuSpecificYokisInput: {
106
+ ID: 0xfc02,
107
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
108
+ attributes: {
109
+ // Indicate how the input should be handle: 0 -> Unknow, 1 -> Push button, 2 -> Switch, 3 -> Relay, 4 -> FP_IN
110
+ inputMode: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
111
+ // Indicate the contact nature of the entry: 0 -> NC, 1 -> NO
112
+ contactMode: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
113
+ // Indicate the last known state of the local BP (Bouton Poussoir, or Push Button)
114
+ lastLocalCommandState: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
115
+ // Indicate the last known state of the Bp connect
116
+ lastBPConnectState: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
117
+ // Indicate the backlight intensity applied on the keys. Only use for “Simon” product. Default: 0x0A, Min-Max: 0x00 - 0x64
118
+ backlightIntensity: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
119
+ },
120
+ commands: {
121
+ // Send to the server cluster a button press
122
+ sendPress: {
123
+ ID: 0x00,
124
+ parameters: [],
125
+ },
126
+ // Send to the server cluster a button release
127
+ sendRelease: {
128
+ ID: 0x01,
129
+ parameters: [],
130
+ },
131
+ // Change the Input mode to use switch input, wired relay or simple push button
132
+ selectInputMode: {
133
+ ID: 0x02,
134
+ parameters: [
135
+ // Input mode to be set. See @inputMode
136
+ { name: 'uc_InputMode', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
137
+ ],
138
+ },
139
+ },
140
+ commandsResponse: {},
141
+ },
142
+ manuSpecificYokisEntryConfigurator: {
143
+ ID: 0xfc03,
144
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
145
+ attributes: {
146
+ // Use to enable short press action
147
+ eShortPress: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
148
+ // Use to enable long press action
149
+ eLongPress: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
150
+ // Define long Press duration in milliseconds. Default: 0x0BB8, Min-Max: 0x00 - 0x1388
151
+ longPressDuration: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
152
+ // Define the maximum time between 2 press to keep in a sequence (In milliseconds). Default: 0x01F4, Min-Max: 0x0064 - 0x0258
153
+ timeBetweenPress: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
154
+ // Enable R12M Long Press action
155
+ eR12MLongPress: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
156
+ // Disable local configuration
157
+ eLocalConfigLock: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
158
+ },
159
+ commands: {},
160
+ commandsResponse: {},
161
+ },
162
+ manuSpecificYokisSubSystem: {
163
+ ID: 0xfc04,
164
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
165
+ attributes: {
166
+ // Define the device behavior after power failure : 0 -> LAST STATE, 1 -> OFF, 2 -> ON, 3-> BLINK
167
+ powerFailureMode: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
168
+ },
169
+ commands: {},
170
+ commandsResponse: {},
171
+ },
172
+ manuSpecificYokisLoadManager: {
173
+ ID: 0xfc05, // Details coming soon
174
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
175
+ attributes: {},
176
+ commands: {},
177
+ commandsResponse: {},
178
+ },
179
+ manuSpecificYokisLightControl: {
180
+ ID: 0xfc06,
181
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
182
+ attributes: {
183
+ // Use to know which state is the relay
184
+ onOff: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
185
+ // Indicate the previous state before action
186
+ prevState: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
187
+ // Define the ON embedded timer duration in seconds. Default: 0x00, Min-Max: 0x00 – 0x00409980
188
+ onTimer: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
189
+ // Enable (0x01) / Disable (0x00) use of onTimer.
190
+ eOnTimer: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
191
+ // Define the PRE-ON embedded delay in seconds. Default: 0x00, Min-Max: 0x00 – 0x00409980
192
+ preOnDelay: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
193
+ // Enable (0x01) / Disable (0x00) use of PreOnTimer.
194
+ ePreOnDelay: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
195
+ // Define the PRE-OFF embedded delay in seconds. Default: 0x00, Min-Max: 0x00 – 0x00409980
196
+ preOffDelay: { ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
197
+ // Enable (0x01) / Disable (0x00) PreOff delay.
198
+ ePreOffDelay: { ID: 0x0009, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
199
+ // Set the value of ON pulse length. Default: 0x01F4, Min-Max: 0x0014 – 0xFFFE
200
+ pulseDuration: { ID: 0x000a, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
201
+ // Indicates the current Type of time selected that will be used during push button configuration: 0x00 -> Seconds, 0x01 -> Minutes
202
+ timeType: { ID: 0x000b, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
203
+ // Set the value of the LONG ON embedded timer in seconds. Default: 0x5460 (1h), Min-Max: 0x00 – 0x00409980
204
+ longOnDuration: { ID: 0x000c, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
205
+ // Indicates the operating mode: 0x00 -> Timer, 0x01 -> Staircase, 0x02 -> Pulse
206
+ operatingMode: { ID: 0x000d, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
207
+ // Time before goes off after the stop announce blinking. (In seconds). Default: 0x0000, Min-Max: 0x00 – 0x00409980
208
+ stopAnnounceTime: { ID: 0x0013, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
209
+ // Enable (0x01) / Disable (0x00) the announcement before turning OFF.
210
+ eStopAnnounce: { ID: 0x0014, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
211
+ // Enable (0x01) / Disable (0x00) Deaf Actions.
212
+ eDeaf: { ID: 0x0015, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
213
+ // Enable (0x01) / Disable (0x00) Blink Actions.
214
+ eBlink: { ID: 0x0016, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
215
+ // Number of blinks done when receiving the corresponding order. One blink is considered as one ON step followed by one OFF step.
216
+ // Default: 0x03, Min-Max: 0x00 – 0x14
217
+ blinkAmount: { ID: 0x0017, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
218
+ // Duration for the ON time on a blink period (In millisecond). Default: 0x000001F4, Min-Max: 0x00 – 0x00409980
219
+ blinkOnTime: { ID: 0x0018, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
220
+ // Duration for the OFF time on a blink period (In millisecond). Default: 0x000001F4, Min-Max: 0x00 – 0x00409980
221
+ blinkOffTime: { ID: 0x0019, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
222
+ // Define number of blink to do when receiving the DEAF action. One blink is considered as one ON step followed by one OFF step.
223
+ // Default: 0x03, Min-Max: 0x00 – 0x14
224
+ deafBlinkAmount: { ID: 0x001a, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
225
+ // Define duration of a blink ON (In millisecond). Default: 0x0320, Min-Max: 0x0064– 0x4E20
226
+ deafBlinkTime: { ID: 0x001b, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
227
+ // Indicate which state must be apply after a blink sequence: 0x00 -> State before blinking, 0x01 -> OFF, 0x02 -> ON
228
+ stateAfterBlink: { ID: 0x001c, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
229
+ // Define the output relay as Normaly close.
230
+ eNcCommand: { ID: 0x001d, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
231
+ },
232
+ commands: {
233
+ // Move to position specified in uc_BrightnessEnd parameter.
234
+ // If TOR mode or MTR is set (no dimming) : if uc_BrightnessEnd under 50% will set to OFF else will be set to ON
235
+ moveToPosition: {
236
+ ID: 0x02,
237
+ parameters: [
238
+ { name: 'uc_BrightnessStart', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
239
+ { name: 'uc_BrightnessEnd', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
240
+ { name: 'ul_PreTimerValue', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
241
+ { name: 'b_PreTimerEnable', type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
242
+ { name: 'ul_TimerValue', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
243
+ { name: 'b_TimerEnable', type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
244
+ { name: 'ul_TransitionTime', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
245
+ ],
246
+ },
247
+ // This command allows the relay to be controlled with an impulse. The pulse time is defined by PulseLength.
248
+ pulse: {
249
+ ID: 0x04,
250
+ parameters: [{ name: 'PulseLength', type: zigbee_herdsman_1.Zcl.DataType.UINT16 }],
251
+ },
252
+ // With this command, the module is asked to perform a blinking sequence.
253
+ blink: {
254
+ ID: 0x05,
255
+ parameters: [
256
+ { name: 'uc_BlinkAmount', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
257
+ { name: 'ul_BlinkOnPeriod', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
258
+ { name: 'ul_BlinkOffPeriod', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
259
+ { name: 'uc_StateAfterSequence', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
260
+ { name: 'b_DoPeriodicCycle', type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
261
+ ],
262
+ },
263
+ // Start a deaf sequene on a device only if the attribute “eDeaf” is set to Enable.
264
+ deafBlink: {
265
+ ID: 0x06,
266
+ parameters: [
267
+ { name: 'uc_BlinkAmount', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
268
+ { name: 'ul_BlinkOnTime', type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
269
+ { name: 'uc_SequenceAmount', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
270
+ { name: 'tuc_BlinkAmount', type: zigbee_herdsman_1.Zcl.DataType.ARRAY },
271
+ ],
272
+ },
273
+ // Switch output ON for LONG ON DURATION time.
274
+ longOn: {
275
+ ID: 0x07,
276
+ parameters: [],
277
+ },
278
+ },
279
+ commandsResponse: {},
280
+ },
281
+ manuSpecificYokisDimmer: {
282
+ ID: 0xfc07,
283
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
284
+ attributes: {
285
+ // This attribute defines the current position, in %. Default: 0x00, Min-Max: 0x00 - 0x64
286
+ currentPosition: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
287
+ // This attribute defines the memory position, in %. Default: 0x00, Min-Max: 0x00 - 0x64
288
+ memoryPosition: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
289
+ // This attribute defines if a ramp up should be used or not.
290
+ eRampUp: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
291
+ // This attribute defines the time taken during the ramp up in ms. Default: 0x000003E8, Min-Max: 0x00000000 – 0x05265C00
292
+ rampUp: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
293
+ // This attribute defines if a ramp down should be used or not.
294
+ eRampDown: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
295
+ // This attribute defines the time taken during the ramp down in ms. Default: 0x000003E8, Min-Max: 0x00000000 – 0x05265C00
296
+ rampDown: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
297
+ // This attribute defines the time taken during the ramp loop in ms. Default: 0x00000FA0, Min-Max: 0x00000000 – 0x05265C00
298
+ rampContinuousTime: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
299
+ // This attribute defines the value of each step during a dimming up. This value is set in %. Default: 0x01, Min-Max: 0x00 - 0x64
300
+ stepUp: { ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
301
+ // This attribute defines the value of the low dim limit, used during a dimming loop, on a long press for example. This value is set in %. Default: 0x06, Min-Max: 0x00 - 0x64
302
+ lowDimLimit: { ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
303
+ // This attribute defines the value of the high dim limit, used during a dimming loop, on a long press for example. This value is set in %. Default: 0x64, Min-Max: 0x00 - 0x64
304
+ highDimLimit: { ID: 0x0009, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
305
+ // This attribute defines the time before the nightlight begin. This value is set in seconds. Default: 0x00000000, Min-Max: 0x00000000 – 0xFFFFFFFE
306
+ nightLightStartingDelay: { ID: 0x000c, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
307
+ // This attribute defines the dimming value at the start of the nightlight. This value is set in %. Default: 0x28, Min-Max: 0x00 - 0x64
308
+ nightLightStartingBrightness: { ID: 0x000d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
309
+ // This attribute defines the dimming value at the last step of the nightlight. This attribute must be lower than 0x000D :Nightlight starting brightness. This value is set in %. Default: 0x05, Min-Max: 0x00 - 0x64
310
+ nightLightEndingBrightness: { ID: 0x000e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
311
+ // This attribute defines the ramp duration of the nightlight. The ramp is running after the end of the starting delay and until the ending bright is reached. This value is set in seconds. Default: 0x00000E10, Min-Max: 0x00000000 – 0x05265C00
312
+ nightLightRampTime: { ID: 0x000f, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
313
+ // This attribute defines the total duration of the nightlight. It must not be lower than 0x000F : Nightlight ramp time. This value is set in seconds. Default: 0x00000E10, Min-Max: 0x00000000 – 0x05265C00
314
+ nightLightOnTime: { ID: 0x0010, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
315
+ // This attribute defines the value of the favorite position 1. This value is set in %. Default: 0x19, Min-Max: 0x00 - 0x64
316
+ favoritePosition1: { ID: 0x0011, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
317
+ // This attribute defines the value of the favorite position 2. This value is set in %. Default: 0x32, Min-Max: 0x00 - 0x64
318
+ favoritePosition2: { ID: 0x0012, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
319
+ // This attribute defines the value of the favorite position 3. This value is set in %. Default: 0x4B, Min-Max: 0x00 - 0x64
320
+ favoritePosition3: { ID: 0x0013, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
321
+ // This attribute enables or disables the 2-step controller mode. This mode enable product to run without any ramp before and after ON or OFF. It acts like a relay.
322
+ stepControllerMode: { ID: 0x0014, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
323
+ // This attribute enables or disables the memory position mode at first push button release.
324
+ memoryPositionMode: { ID: 0x0015, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
325
+ // This attribute defines the value of each step during a dimming down. This value is set in %. Default: 0x01, Min-Max: 0x01 - 0x64
326
+ stepDown: { ID: 0x0016, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
327
+ // This attribute defines the value of each step during a dimming loop. This value is set in %. Default: 0x01, Min-Max: 0x01 - 0x64
328
+ stepContinuous: { ID: 0x0017, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
329
+ // This attribute defines the value of each step during the ramp down of the nightlight mode. This value is set in %. Default: 0x01, Min-Max: 0x01 - 0x64
330
+ stepNightLight: { ID: 0x0018, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
331
+ },
332
+ commands: {
333
+ // Start dimming up, from current position to the upper dim limit. When the limit is reached, stay at this position.
334
+ dimUp: {
335
+ ID: 0x00,
336
+ parameters: [],
337
+ },
338
+ // Start dimming down, from current position to the lower dim limit. When the limit is reached, stay at this position.
339
+ dimDown: {
340
+ ID: 0x01,
341
+ parameters: [],
342
+ },
343
+ // Start the dimming loop process for the selected duration.
344
+ dim: {
345
+ ID: 0x02,
346
+ parameters: [
347
+ // Set the duration of the ramp for the continuous variation, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
348
+ { name: 'ul_RampContinuousDuration', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
349
+ // Set the step size, otherwise use 0xFF to use the one configured in the product.. Value is in %.
350
+ { name: 'uc_StepContinuous', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
351
+ ],
352
+ },
353
+ // Stop the actual dimming process.
354
+ dimStop: {
355
+ ID: 0x04,
356
+ parameters: [],
357
+ },
358
+ // Start dimming to the min value set in the device.
359
+ dimToMin: {
360
+ ID: 0x05,
361
+ parameters: [
362
+ // Set the transition time to the selected value, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
363
+ { name: 'ul_TransitionTime', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
364
+ ],
365
+ },
366
+ // Start dimming to the max value set in the device.
367
+ dimToMax: {
368
+ ID: 0x06,
369
+ parameters: [
370
+ // Set the transition time to the selected value, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
371
+ { name: 'ul_TransitionTime', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
372
+ ],
373
+ },
374
+ // Start the nightlight mode with the given parameters.
375
+ startNightLightMode: {
376
+ ID: 0x07,
377
+ parameters: [
378
+ // Set the starting delay value, used before the start of the nightlight, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
379
+ { name: 'ul_ChildModeStartingDelay', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
380
+ // Set the brightness at the beginning of the ramp, otherwise use 0xFF to use the one configured in the product. Value is in %.
381
+ { name: 'uc_ChildModeBrightnessStart', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
382
+ // Set the brightness at the end of the ramp, otherwise use 0xFF to use the one configured in the product. Value is in %.
383
+ { name: 'uc_ChildModeBrightnessEnd', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
384
+ // Set the ramp duration, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
385
+ { name: 'ul_ChildModeRampDuration', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
386
+ // Set the total duration of the nightlight, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms.
387
+ { name: 'ul_ChildModeOnDuration', type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
388
+ // Set the step size between each dim, otherwise use 0xFF to use the one configured in the product. Value is in %.
389
+ { name: 'uc_ChildStep', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
390
+ ],
391
+ },
392
+ // Start the nightlight mode from the current dimming value.
393
+ startNightLightModeCurrent: {
394
+ ID: 0x08,
395
+ parameters: [],
396
+ },
397
+ // Start dimming to the favorite position 1.
398
+ moveToFavorite1: {
399
+ ID: 0x09,
400
+ parameters: [],
401
+ },
402
+ // Start dimming to the favorite position 2.
403
+ moveToFavorite2: {
404
+ ID: 0x0a,
405
+ parameters: [],
406
+ },
407
+ // Start dimming to the favorite position 3.
408
+ moveToFavorite3: {
409
+ ID: 0x0b,
410
+ parameters: [],
411
+ },
412
+ },
413
+ commandsResponse: {},
414
+ },
415
+ manuSpecificYokisWindowCovering: {
416
+ ID: 0xfc08, // Details coming soon
417
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
418
+ attributes: {},
419
+ commands: {},
420
+ commandsResponse: {},
421
+ },
422
+ manuSpecificYokisChannel: {
423
+ ID: 0xfc09, // Details coming soon
424
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
425
+ attributes: {
426
+ // Define the command to send to the servers using cluster On/Off. 0x00 -> toggle, 0x01 -> ON, 0x02 -> OFF, 0x03 -> OFF
427
+ onOffClusterMode: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
428
+ // Define the command to send to the servers using cluster Level control. 0x00 -> nothing, 0x01 -> Move up, 0x02 -> Move down, 0x03 -> stop
429
+ levelControlClusterMode: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
430
+ // Define the command to send to the servers using cluster Window Covering. 0x00 -> toggle, 0x01 -> up/open, 0x02 -> down/close, 0x03 -> stop
431
+ windowCoveringClusterMode: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
432
+ // Defines the cluster that will be used by the channel to create an order. Default: 0xFFF0, Min-Max: 0x0000 – 0xFFFF
433
+ clusterToBeUsed: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
434
+ // Define the channel sending mode. 0x00 -> Direct, 0x01 -> Broadcast, 0x02 -> Group
435
+ sendingMode: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
436
+ // Define the light control mode used between remote and the binded device. 0x00 -> Mode pulse, 0x01 -> Mode deaf
437
+ yokisLightControlMode: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
438
+ // Define the command to send to the servers using cluster Yokis Pilot Wire. 0x00 -> toggle, 0x01 -> confort, 0x02 -> eco
439
+ yokisPilotWireClusterMode: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.ENUM8 },
440
+ // Indicate the group id who will receive the command from the dedicated endpoint. Default: 0x0000, Min-Max: 0x0000 – 0xFFFF
441
+ groupId: { ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
442
+ },
443
+ commands: {},
444
+ commandsResponse: {},
445
+ },
446
+ manuSpecificYokisPilotWire: {
447
+ ID: 0xfc0a,
448
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
449
+ attributes: {
450
+ // Represent the actual order used by the device. Default: 0x02, Min-Max: 0x00 - 0xF1. Reportable, not writable
451
+ actualOrder: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
452
+ // Define the “Order” embedded timer duration. This timer is set when the device changes its order (in second). After that duration, the device is set back to its fallback order. Default: 0x00000000, Min-Max: 0x00000000 - 0xFFFFFFFF
453
+ orderTimer: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
454
+ // Define the duration before an order is set. This timer is used when a new order is asked, it corresponds to the time before this order is applied. The duration is set in second. Default: 0x00000000, Min-Max: 0x00000000 - 0xFFFFFFFF
455
+ preOrderTimer: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
456
+ // Represent the actual unit used for local command configuration : 0x00 -> Second, 0x01 -> Minutes. Default: 0x00, Min-Max: 0x00 - 0x01.
457
+ timerUnit: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
458
+ // Define the product’s LED behavior: 0x00 -> LED is always ON and blink during radio activity, 0x01 -> LED is only OFF during few seconds after a mode transition. Default: 0x00, Min-Max: 0x00 - 0x01.
459
+ ledMode: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
460
+ // Define if the product must be set into pilot wire relay mode: 0x00 -> Relay mode is deactivated, 0x01 -> Relay mode is activated. Default: 0x00, Min-Max: 0x00 - 0x01.
461
+ pilotWireRelayMode: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
462
+ // Define the order scrolling sense: 0x00 -> Forward : Confort -> Confort – 1 -> Confort – 2 -> Eco -> Hors-Gel -> Arrêt, 0x01 -> Backward : Arrêt -> Hors-Gel -> Eco -> Confort – 2 -> Confort – 1 -> Confort. Default: 0x00, Min-Max: 0x00 - 0x01.
463
+ orderScrollingMode: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
464
+ // Define the number of orders supported by the device: 0x00 -> 4 orders (Confort, Eco, Hors-Gel, Arrêt), 0x01 -> 6 orders (Confort, Confort – 1, Confort – 2, Eco, Hors-Gel, Arrêt). Default: 0x01, Min-Max: 0x00 - 0x01.
465
+ orderNumberSupported: { ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
466
+ // Represent the fallback order used by the device after the end of an order timer is reached: 0x00 -> Stop, 0x01 -> Frost-off, 0x02 -> Eco, 0x03 -> Confort-2, 0x04 -> Confort-1, 0x05 -> Confort. Default: 0x02, Min-Max: 0x00 - 0x05.
467
+ fallbackOrder: { ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
468
+ },
469
+ commands: {
470
+ // Set the device in the specified order.
471
+ setOrder: {
472
+ ID: 0x00,
473
+ parameters: [
474
+ // Order to be set : 0x00 -> Stop, 0x01 -> Frost-off, 0x02 -> Eco, 0x03 -> Confort-2, 0x04 -> Confort-1, 0x05 -> Confort
475
+ { name: 'uc_Order', type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
476
+ ],
477
+ },
478
+ // Toggle between order by respecting the scrolling order.
479
+ toggleOrder: {
480
+ ID: 0x01,
481
+ parameters: [],
482
+ },
483
+ },
484
+ commandsResponse: {},
485
+ },
486
+ manuSpecificYokisTemperatureMeasurement: {
487
+ ID: 0xfc0b,
488
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
489
+ attributes: {
490
+ // This attribute represents the last value measured. The unit is in 0.01 °C (12,25°C -> 1225). Default: 0x0000, Min-Max: 0x954D - 0x7FFE. Reportable, not writable
491
+ currentValue: { ID: 0x0000, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
492
+ // Represent the minimal value set since the last power-on/reset. The unit is in 0.01 °C (12,25°C -> 1225). Default: 0x7FFE , Min-Max: 0x954D - 0x7FFE. Reportable, not writable
493
+ minMeasuredValue: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
494
+ // Represent the maximal value set since the last power-on/reset. The unit is in 0.01 °C (12,25°C -> 1225). Default: 0x954D , Min-Max: 0x954D - 0x7FFE. Reportable, not writable
495
+ maxMeasuredValue: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
496
+ // Represent the offset applicated to the temperature measured. The unit is in 0,1°C (1,5°C -> 15). Default: 0x00, Min-Max: 0xCE (-50) - 0x32 (50).
497
+ offset: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.INT8 },
498
+ // Represent the sampling period used to process the temperature measurement. The unit is in seconds. Default: 0x0A, Min-Max: 0x01 - 0x78.
499
+ samplingPeriod: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
500
+ // Represents the sampling number to sense per sampling period defined before. Default: 0x03, Min-Max: 0x01 - 0x14.
501
+ samplingNumber: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
502
+ // Represents the temperature variation to request a new temperature sending through reports. The unit is in 0,1°C (0,5°C ->5). Default: 0x00, Min-Max: 0x00 - 0x0A.
503
+ deltaTemp: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
504
+ // Represents the minimal sending period that the device must respect before sending a new value through reporting. A writing on this attribute will update all reporting entries related to the temperature measurement. Default: 0x0A, Min-Max: 0x0000 - 0xFFFF.
505
+ minimalSendingPeriod: { ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
506
+ // Represents the maximal sending period. The device must send a new value through reporting before the end of this period. A writing on this attribute will update all reporting entries related to the temperature measurement. Default: 0x0A, Min-Max: 0x0000 - 0xFFFF.
507
+ maximalSendingPeriod: { ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
508
+ },
509
+ commands: {
510
+ // Reset the Min and Max temperature value information.
511
+ minMaxReset: {
512
+ ID: 0x00,
513
+ parameters: [],
514
+ },
515
+ },
516
+ commandsResponse: {},
517
+ },
518
+ manuSpecificYokisStats: {
519
+ ID: 0xfcf0, // Details coming soon
520
+ manufacturerCode: zigbee_herdsman_1.Zcl.ManufacturerCode.YOKIS,
521
+ attributes: {},
522
+ commands: {},
523
+ commandsResponse: {},
524
+ },
525
+ };
526
+ // #endregion
527
+ // #region Extension definition
528
+ // Checks definition
529
+ const yokisExtendChecks = {
530
+ parseResetInput: (input) => {
531
+ if (!input) {
532
+ throw new Error(`MISSING_INPUT`);
533
+ }
534
+ if (!Object.keys(resetActionEnum).includes(input)) {
535
+ throw new Error(`INVALID_RESET_ACTION`);
536
+ }
537
+ return {
538
+ payload: {
539
+ uc_ResetAction: utils.getFromLookup(input, resetActionEnum),
540
+ },
541
+ };
542
+ },
543
+ parseOpenNetworkInput: (input) => {
544
+ if (!input || typeof input !== 'object') {
545
+ throw new Error(`NOT_OBJECT`);
546
+ }
547
+ if (!('opening_time' in input) || !utils.isNumber(input.opening_time)) {
548
+ throw new Error(`INVALID_OPENNETWORK_OPENINGTIME`);
549
+ }
550
+ return {
551
+ payload: {
552
+ uc_OpeningTime: input.opening_time,
553
+ },
554
+ };
555
+ },
556
+ parseInputModeInput: (input) => {
557
+ if (!input || typeof input !== 'object') {
558
+ throw new Error(`NOT_OBJECT`);
559
+ }
560
+ if (!('select_input_mode' in input) || !Object.keys(inputModeEnum).includes(input.select_input_mode)) {
561
+ throw new Error(`INVALID_INPUTMODE`);
562
+ }
563
+ return {
564
+ payload: {
565
+ uc_InputMode: utils.getFromLookup(input.select_input_mode, inputModeEnum),
566
+ },
567
+ };
568
+ },
569
+ parseMoveToPositionInput: (input) => {
570
+ if (!input || typeof input !== 'object') {
571
+ throw new Error(`NOT_OBJECT`);
572
+ }
573
+ if (!('brightness_start' in input) || !utils.isNumber(input.brightness_start)) {
574
+ throw new Error(`INVALID_MOVE_BRIGHTNESSSTART`);
575
+ }
576
+ if (!('brightness_end' in input) || !utils.isNumber(input.brightness_end)) {
577
+ throw new Error(`INVALID_MOVE_BRIGHTNESSEND`);
578
+ }
579
+ if (!('pre_timer_value' in input) || !utils.isNumber(input.pre_timer_value)) {
580
+ throw new Error(`INVALID_MOVE_PRETIMERVALUE`);
581
+ }
582
+ if (!('enable_pre_timer' in input) || !utils.isBoolean(input.enable_pre_timer)) {
583
+ throw new Error(`INVALID_MOVE_PRETIMERENABLE`);
584
+ }
585
+ if (!('timer_value' in input) || !utils.isNumber(input.timer_value)) {
586
+ throw new Error(`INVALID_MOVE_TIMERVALUE`);
587
+ }
588
+ if (!('enable_timer' in input) || !utils.isBoolean(input.enable_timer)) {
589
+ throw new Error(`INVALID_MOVE_TIMERENABLE`);
590
+ }
591
+ if (!('transition_time' in input) || !utils.isNumber(input.transition_time)) {
592
+ throw new Error(`INVALID_MOVE_TRANSITIONTIME`);
593
+ }
594
+ return {
595
+ payload: {
596
+ uc_BrightnessStart: input.brightness_start,
597
+ uc_BrightnessEnd: input.brightness_end,
598
+ ul_PreTimerValue: input.pre_timer_value,
599
+ b_PreTimerEnable: input.enable_pre_timer ? 1 : 0,
600
+ ul_TimerValue: input.timer_value,
601
+ b_TimerEnable: input.enable_timer ? 1 : 0,
602
+ ul_TransitionTime: input.transition_time,
603
+ },
604
+ };
605
+ },
606
+ parseBlinkInput: (input) => {
607
+ if (!input || typeof input !== 'object') {
608
+ throw new Error(`NOT_OBJECT`);
609
+ }
610
+ if (!('blink_amount' in input) || !utils.isNumber(input.blink_amount)) {
611
+ throw new Error(`INVALID_BLINK_BLINKAMOUNT`);
612
+ }
613
+ if (!('blink_on_period' in input) || !utils.isNumber(input.blink_on_period)) {
614
+ throw new Error(`INVALID_BLINK_BLINKONPERIOD`);
615
+ }
616
+ if (!('blink_off_period' in input) || !utils.isNumber(input.blink_off_period)) {
617
+ throw new Error(`INVALID_BLINK_BLINKOFFPERIOD`);
618
+ }
619
+ if (!('state_after_sequence' in input) || !Object.keys(stateAfterBlinkEnum).includes(input.state_after_sequence)) {
620
+ throw new Error(`MISSING_BLINK_STATEAFTERSEQUENCE`);
621
+ }
622
+ if (!('do_periodic_cycle' in input) || !utils.isBoolean(input.do_periodic_cycle)) {
623
+ throw new Error(`INVALID_BLINK_DOPERIODICYCLE`);
624
+ }
625
+ return {
626
+ payload: {
627
+ uc_BlinkAmount: input.blink_amount,
628
+ ul_BlinkOnPeriod: input.blink_on_period,
629
+ ul_BlinkOffPeriod: input.blink_off_period,
630
+ uc_StateAfterSequence: utils.getFromLookup(input.state_after_sequence, stateAfterBlinkEnum),
631
+ b_DoPeriodicCycle: input.do_periodic_cycle ? 1 : 0,
632
+ },
633
+ };
634
+ },
635
+ parsePulseInput: (input) => {
636
+ if (!input || typeof input !== 'object') {
637
+ throw new Error(`NOT_OBJECT`);
638
+ }
639
+ if (!('pulse_length' in input) || !utils.isNumber(input.pulse_length)) {
640
+ throw new Error(`INVALID_PULSE_PULSELENGTH`);
641
+ }
642
+ return {
643
+ payload: {
644
+ PulseLength: input.pulse_length,
645
+ },
646
+ };
647
+ },
648
+ parseDeafBlinkPropInput: (input) => {
649
+ if (!input || typeof input !== 'object') {
650
+ throw new Error(`NOT_OBJECT`);
651
+ }
652
+ if (!('blink_amount' in input) || !utils.isNumber(input.blink_amount)) {
653
+ throw new Error(`INVALID_BLINK_AMOUNT`);
654
+ }
655
+ if (!('blink_on_time' in input) || !utils.isNumber(input.blink_on_time)) {
656
+ throw new Error(`INVALID_BLINK_ONTIME`);
657
+ }
658
+ if (!('sequence_amount' in input) || !utils.isNumber(input.sequence_amount)) {
659
+ throw new Error(`INVALID_SEQUENCE_AMOUNT`);
660
+ }
661
+ if (input.sequence_of_blinks && Array.isArray(input.sequence_of_blinks)) {
662
+ // if (input.uc_SequenceAmount < input.tuc_BlinkAmount.length) {
663
+ // // more sequences configured than expected, pop extragenous
664
+ // for(let i = 0; i < input.tuc_BlinkAmount.length - input.uc_SequenceAmount; i++) {
665
+ // input.tuc_BlinkAmount.pop();
666
+ // }
667
+ // }
668
+ // if (input.uc_SequenceAmount > input.tuc_BlinkAmount.length) {
669
+ // // more sequences than configured, pad with additionals
670
+ // for(let i = 0; i < input.uc_SequenceAmount - input.tuc_BlinkAmount.length; i++) {
671
+ // input.tuc_BlinkAmount.push({"uc_BlinkAmountItem":1}); //puke
672
+ // }
673
+ // }
674
+ // Updating number of elements
675
+ input.sequence_amount = input.sequence_of_blinks.length;
676
+ }
677
+ else {
678
+ throw new Error(`INVALID_TUC_BLINKAMOUNT`);
679
+ }
680
+ if (!('uc_BlinkAmount' in input) || !utils.isNumber(input.uc_SequenceAmount)) {
681
+ throw new Error(`INVALID_SEQUENCE_AMOUNT`);
682
+ }
683
+ return {
684
+ payload: {
685
+ uc_BlinkAmount: input.blink_amount,
686
+ ul_BlinkOnTime: input.blink_on_time,
687
+ uc_SequenceAmount: input.sequence_of_blinks.length,
688
+ tuc_BlinkAmount: input.sequence_of_blinks.map((elem) => (typeof elem === 'object' ? Object.values(elem).shift() : elem)), // [{"undefined":1},{"undefined":1}] > [1,1]
689
+ },
690
+ };
691
+ },
692
+ parseDim: (input) => {
693
+ let _ul_RampContinuousDuration, _uc_StepContinuous;
694
+ if (!input || typeof input !== 'object') {
695
+ throw new Error(`NOT_OBJECT`);
696
+ }
697
+ if (!('ramp_continuous_duration' in input) || !utils.isNumber(input.ramp_continuous_duration)) {
698
+ _ul_RampContinuousDuration = 0xffffffff; // use default value
699
+ }
700
+ else
701
+ _ul_RampContinuousDuration = input.ramp_continuous_duration;
702
+ if (!('step_continuous' in input) || !utils.isNumber(input.step_continuous)) {
703
+ _uc_StepContinuous = 0xff; // use default value
704
+ }
705
+ else
706
+ _uc_StepContinuous = input.step_continuous;
707
+ return {
708
+ payload: {
709
+ ul_RampContinuousDuration: _ul_RampContinuousDuration,
710
+ uc_StepContinuous: _uc_StepContinuous,
711
+ },
712
+ };
713
+ },
714
+ parseDimMinMax: (input) => {
715
+ let _ul_TransitionTime, _action;
716
+ if (!input || typeof input !== 'object') {
717
+ throw new Error(`NOT_OBJECT`);
718
+ }
719
+ if (!('transition_time' in input) || !utils.isNumber(input.transition_time)) {
720
+ _ul_TransitionTime = 0xffffffff; // use default value
721
+ }
722
+ else
723
+ _ul_TransitionTime = input.transition_time;
724
+ if (!('action' in input)) {
725
+ throw new Error(`MISSING_ACTION`);
726
+ }
727
+ else {
728
+ _action = input.action;
729
+ }
730
+ return {
731
+ action: _action,
732
+ payload: {
733
+ ul_TransitionTime: _ul_TransitionTime,
734
+ },
735
+ };
736
+ },
737
+ parseStartNightLightMode: (input) => {
738
+ let _ul_ChildModeStartingDelay, _uc_ChildModeBrightnessStart, _uc_ChildModeBrightnessEnd, _ul_ChildModeRampDuration, _ul_ChildModeOnDuration, _uc_ChildStep;
739
+ if (!input || typeof input !== 'object') {
740
+ throw new Error(`NOT_OBJECT`);
741
+ }
742
+ if (!('childmode_starting_delay' in input) || !utils.isNumber(input.childmode_starting_delay)) {
743
+ _ul_ChildModeStartingDelay = 0xffffffff; // use default value
744
+ }
745
+ else
746
+ _ul_ChildModeStartingDelay = input.childmode_starting_delay;
747
+ if (!('childmode_brightness_start' in input) || !utils.isNumber(input.childmode_brightness_start)) {
748
+ _uc_ChildModeBrightnessStart = 0xff; // use default value
749
+ }
750
+ else
751
+ _uc_ChildModeBrightnessStart = input.childmode_brightness_start;
752
+ if (!('childmode_brightness_end' in input) || !utils.isNumber(input.childmode_brightness_end)) {
753
+ _uc_ChildModeBrightnessEnd = 0xff; // use default value
754
+ }
755
+ else
756
+ _uc_ChildModeBrightnessEnd = input.childmode_brightness_end;
757
+ if (!('childmode_ramp_duration' in input) || !utils.isNumber(input.childmode_ramp_duration)) {
758
+ _ul_ChildModeRampDuration = 0xffffffff; // use default value
759
+ }
760
+ else
761
+ _ul_ChildModeRampDuration = input.childmode_ramp_duration;
762
+ if (!('childmode_on_duration' in input) || !utils.isNumber(input.childmode_on_duration)) {
763
+ _ul_ChildModeOnDuration = 0xffffffff; // use default value
764
+ }
765
+ else
766
+ _ul_ChildModeOnDuration = input.childmode_on_duration;
767
+ if (!('childmode_step' in input) || !utils.isNumber(input.childmode_step)) {
768
+ _uc_ChildStep = 0xff; // use default value
769
+ }
770
+ else
771
+ _uc_ChildStep = input.childmode_step;
772
+ return {
773
+ payload: {
774
+ ul_ChildModeStartingDelay: _ul_ChildModeStartingDelay,
775
+ uc_ChildModeBrightnessStart: _uc_ChildModeBrightnessStart,
776
+ uc_ChildModeBrightnessEnd: _uc_ChildModeBrightnessEnd,
777
+ ul_ChildModeRampDuration: _ul_ChildModeRampDuration,
778
+ ul_ChildModeOnDuration: _ul_ChildModeOnDuration,
779
+ uc_ChildStep: _uc_ChildStep,
780
+ },
781
+ };
782
+ },
783
+ log: (key, value, payload) => {
784
+ logger_1.logger.debug(`Invoked converter with key: '${key}'`, NS);
785
+ logger_1.logger.debug('Invoked converter with values:' + JSON.stringify(value), NS);
786
+ if (payload)
787
+ logger_1.logger.debug('Invoked converter with payload:' + JSON.stringify(payload), NS);
788
+ },
789
+ };
790
+ // Command definition
791
+ const yokisCommandsExtend = {
792
+ resetToFactorySettings: () => {
793
+ const exposes = e
794
+ .enum('reset_to_factory_settings', ea.SET, Object.keys(resetActionEnum))
795
+ .withDescription('Reset setting depending on RESET ACTION value')
796
+ .withCategory('config');
797
+ const toZigbee = [
798
+ {
799
+ key: ['reset_to_factory_settings'],
800
+ convertSet: async (entity, key, value, meta) => {
801
+ const commandWrapper = yokisExtendChecks.parseResetInput(value);
802
+ yokisExtendChecks.log(key, value);
803
+ await entity.command('manuSpecificYokisDevice', 'resetToFactorySettings', commandWrapper.payload);
804
+ },
805
+ },
806
+ ];
807
+ return {
808
+ exposes: [exposes],
809
+ toZigbee,
810
+ isModernExtend: true,
811
+ };
812
+ },
813
+ relaunchBleAdvert: () => {
814
+ const exposes = e
815
+ .enum('relaunch_ble_advert', ea.SET, ['relaunch_ble_advert'])
816
+ .withDescription('Relaunch BLE advertising for 15 minutes')
817
+ .withCategory('config');
818
+ const toZigbee = [
819
+ {
820
+ key: ['relaunch_ble_advert'],
821
+ convertSet: async (entity, key, value, meta) => {
822
+ yokisExtendChecks.log(key, value);
823
+ await entity.command('manuSpecificYokisDevice', 'relaunchBleAdvert', {});
824
+ },
825
+ },
826
+ ];
827
+ return {
828
+ exposes: [exposes],
829
+ toZigbee,
830
+ isModernExtend: true,
831
+ };
832
+ },
833
+ openNetwork: () => {
834
+ const exposes = e
835
+ .composite('open_network_command', 'open_network_prop', ea.SET)
836
+ .withDescription('Open ZigBee network')
837
+ .withFeature(e
838
+ .numeric('opening_time', ea.SET) //uc_OpeningTime
839
+ .withValueMin(0)
840
+ .withValueMax(255)
841
+ .withUnit('s')
842
+ .withDescription('Opening time wanted from 1 to 255 seconds,0 means closing the network.'))
843
+ .withCategory('config');
844
+ const toZigbee = [
845
+ {
846
+ key: ['open_network_prop'],
847
+ convertSet: async (entity, key, value, meta) => {
848
+ const commandWrapper = yokisExtendChecks.parseOpenNetworkInput(value);
849
+ yokisExtendChecks.log(key, value);
850
+ await entity.command('manuSpecificYokisDevice', 'OpenNetwork', commandWrapper.payload);
851
+ },
852
+ },
853
+ ];
854
+ return {
855
+ exposes: [exposes],
856
+ toZigbee,
857
+ isModernExtend: true,
858
+ };
859
+ },
860
+ moveToPosition: () => {
861
+ const exposes = e
862
+ .composite('move_to_position_command', 'move_to_position_prop', ea.SET)
863
+ .withDescription('Move to position specified in uc_BrightnessEnd parameter.' +
864
+ 'If TOR mode is set (no dimming) or MTR : if uc_BrightnessEnd under 50% will set to OFF else will be set to ON')
865
+ .withFeature(e
866
+ .numeric('brightness_start', ea.SET) // uc_BrightnessStart
867
+ .withDescription('Define the brightness at the beginning of the transition, in %'))
868
+ .withFeature(e
869
+ .numeric('brightness_end', ea.SET) // uc_BrightnessEnd
870
+ .withDescription('Define the brightness at the end of the transition, in %'))
871
+ .withFeature(e
872
+ .numeric('pre_timer_value', ea.SET) // ul_PreTimerValue
873
+ .withUnit('s')
874
+ .withDescription('Define the pre timer value, otherwise use 0xFFFFFFFF to use the one configured in the product'))
875
+ .withFeature(e
876
+ .binary('enable_pre_timer', ea.SET, true, false) // b_PreTimerEnable
877
+ .withDescription('Define whether the device should use the pre timer or not, if 0xFF then use the one configured in product'))
878
+ .withFeature(e
879
+ .numeric('timer_value', ea.SET) // ul_TimerValue
880
+ .withUnit('s')
881
+ .withDescription('Define the timer ON value, otherwise use 0xFFFFFFFF to use the one configured in the product'))
882
+ .withFeature(e
883
+ .binary('enable_timer', ea.SET, true, false) // b_TimerEnable
884
+ .withDescription('Define whether the device should use the timer ON or not, if 0xFF then use the one configured in product'))
885
+ .withFeature(e
886
+ .numeric('transition_time', ea.SET) // ul_TransitionTime
887
+ .withDescription('Define the transition time from the brightness start to the brightness end, in ms'))
888
+ .withCategory('config');
889
+ const toZigbee = [
890
+ {
891
+ key: ['move_to_position_prop'],
892
+ convertSet: async (entity, key, value, meta) => {
893
+ // const options = utils.getOptions(meta.mapped, entity);
894
+ // logger.debug('Invoked converter with options:' + JSON.stringify(options));
895
+ const commandWrapper = yokisExtendChecks.parseMoveToPositionInput(value);
896
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
897
+ await entity.command('manuSpecificYokisLightControl', 'moveToPosition', commandWrapper.payload);
898
+ },
899
+ },
900
+ ];
901
+ return {
902
+ exposes: [exposes],
903
+ toZigbee,
904
+ isModernExtend: true,
905
+ };
906
+ },
907
+ blink: () => {
908
+ const exposes = e
909
+ .composite('blink_command', 'blink_prop', ea.SET)
910
+ .withDescription('With this command, the module is asked to perform a blinking sequence.')
911
+ .withFeature(e
912
+ .numeric('blink_amount', ea.SET) // uc_BlinkAmount
913
+ .withDescription('If defined will force the number of blink to be done (only for this order) if not the device will use its own value.'))
914
+ .withFeature(e
915
+ .numeric('blink_on_period', ea.SET) // ul_BlinkOnPeriod
916
+ .withDescription('If defined will force the blink’s “on time” (only for this order) if not the device will use its own value.'))
917
+ .withFeature(e
918
+ .numeric('blink_off_period', ea.SET) // ul_BlinkOffPeriod
919
+ .withDescription('If defined will force the blink’s “off time” (only for this order) if not the device will use its own value.'))
920
+ .withFeature(e
921
+ .enum('state_after_sequence', ea.SET, Object.keys(stateAfterBlinkEnum)) // uc_StateAfterSequence
922
+ .withDescription('If defined will force the state after the sequence (only for this order). if not the device will use its own value-'))
923
+ .withFeature(e
924
+ .binary('do_periodic_cycle', ea.SET, true, false) // b_DoPeriodicCycle
925
+ .withDescription('If set to true the blinking will be “infinite”'))
926
+ .withCategory('config');
927
+ const toZigbee = [
928
+ {
929
+ key: ['blink_prop'],
930
+ convertSet: async (entity, key, value, meta) => {
931
+ const commandWrapper = yokisExtendChecks.parseBlinkInput(value);
932
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
933
+ await entity.command('manuSpecificYokisLightControl', 'blink', commandWrapper.payload);
934
+ },
935
+ },
936
+ ];
937
+ return {
938
+ exposes: [exposes],
939
+ toZigbee,
940
+ isModernExtend: true,
941
+ };
942
+ },
943
+ pulse: () => {
944
+ const exposes = e
945
+ .composite('pulse_command', 'pulse_prop', ea.SET)
946
+ .withDescription('This command allows the relay to be controlled with an impulse. The pulse time is defined by PulseLength')
947
+ .withFeature(e
948
+ .numeric('pulse_length', ea.SET) // pulseLength
949
+ .withValueMax(65535)
950
+ .withUnit('ms')
951
+ .withDescription('Pulse length'))
952
+ .withCategory('config');
953
+ const toZigbee = [
954
+ {
955
+ key: ['pulse_prop'],
956
+ convertSet: async (entity, key, value, meta) => {
957
+ const commandWrapper = yokisExtendChecks.parsePulseInput(value);
958
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
959
+ // await entity.command('manuSpecificYokisLightControl', 'pulse', commandWrapper.payload);
960
+ },
961
+ },
962
+ ];
963
+ return {
964
+ exposes: [exposes],
965
+ toZigbee,
966
+ isModernExtend: true,
967
+ };
968
+ },
969
+ deafBlink: () => {
970
+ const exposes = e
971
+ .composite('deaf_blink_command', 'deaf_blink_prop', ea.SET)
972
+ .withDescription('Start a deaf sequene on a device only if the attribute “eDeaf” is set to Enable')
973
+ .withFeature(e
974
+ .numeric('blink_amount', ea.SET) // uc_BlinkAmount
975
+ .withDescription('If defined will force the number of blink to be done during one sequence (only for this order) if not the device will use its own value'))
976
+ .withFeature(e
977
+ .numeric('blink_on_time', ea.SET) // ul_BlinkOnTime
978
+ .withDescription('If defined will force the blink’s “on time” (only for this order) if not the device will use its own value'))
979
+ .withFeature(e
980
+ .numeric('sequence_amount', ea.STATE) // uc_SequenceAmount
981
+ .withValueMin(0)
982
+ .withValueMax(6)
983
+ .withDescription('If defined will set the number of sequence to be done. Each sequence is spaced by 1 second. (Max 6)'))
984
+ .withFeature(e
985
+ .list('sequence_of_blinks', // tuc_BlinkAmount
986
+ ea.SET, e
987
+ .composite('uc_BlinkAmountItems', 'uc_BlinkAmountItems', ea.SET)
988
+ .withLabel('Number of blink items for the sequence')
989
+ .withFeature(e.numeric('uc_BlinkAmountItem', ea.SET).withLabel('Blinks')))
990
+ .withLengthMin(0)
991
+ .withLengthMax(6)
992
+ .withDescription('Array with the number of blink to be done for each sequence. Will override “uc_BlinkAmount“'))
993
+ .withCategory('config');
994
+ const toZigbee = [
995
+ {
996
+ key: ['deaf_blink_prop'],
997
+ convertSet: async (entity, key, value, meta) => {
998
+ const commandWrapper = yokisExtendChecks.parseDeafBlinkPropInput(value);
999
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
1000
+ await entity.command('manuSpecificYokisLightControl', 'deafBlink', commandWrapper.payload);
1001
+ },
1002
+ },
1003
+ ];
1004
+ return {
1005
+ exposes: [exposes],
1006
+ toZigbee,
1007
+ isModernExtend: true,
1008
+ };
1009
+ },
1010
+ longOnCommand: () => {
1011
+ const exposes = e
1012
+ .enum('long_on_command', ea.SET, ['longOnAction'])
1013
+ .withDescription('Switch output ON for LONG ON DURATION time')
1014
+ .withCategory('config');
1015
+ const toZigbee = [
1016
+ {
1017
+ key: ['long_on_command'],
1018
+ convertSet: async (entity, key, value, meta) => {
1019
+ yokisExtendChecks.log(key, value);
1020
+ await entity.command('manuSpecificYokisLightControl', 'longOn', {});
1021
+ },
1022
+ },
1023
+ ];
1024
+ return {
1025
+ exposes: [exposes],
1026
+ toZigbee,
1027
+ isModernExtend: true,
1028
+ };
1029
+ },
1030
+ sendPress: () => {
1031
+ const exposes = e
1032
+ .enum('send_press', ea.SET, ['SendPress'])
1033
+ .withDescription('Send to the server cluster a button press')
1034
+ .withCategory('config');
1035
+ const toZigbee = [
1036
+ {
1037
+ key: ['send_press'],
1038
+ convertSet: async (entity, key, value, meta) => {
1039
+ yokisExtendChecks.log(key, value);
1040
+ await entity.command('manuSpecificYokisDevice', 'sendPress', {});
1041
+ },
1042
+ },
1043
+ ];
1044
+ return {
1045
+ exposes: [exposes],
1046
+ toZigbee,
1047
+ isModernExtend: true,
1048
+ };
1049
+ },
1050
+ sendRelease: () => {
1051
+ const exposes = e
1052
+ .enum('send_release', ea.SET, ['SendRelease'])
1053
+ .withDescription('Send to the server cluster a button release')
1054
+ .withCategory('config');
1055
+ const toZigbee = [
1056
+ {
1057
+ key: ['send_release'],
1058
+ convertSet: async (entity, key, value, meta) => {
1059
+ yokisExtendChecks.log(key, value);
1060
+ await entity.command('manuSpecificYokisDevice', 'sendRelease', {});
1061
+ },
1062
+ },
1063
+ ];
1064
+ return {
1065
+ exposes: [exposes],
1066
+ toZigbee,
1067
+ isModernExtend: true,
1068
+ };
1069
+ },
1070
+ selectInputMode: () => {
1071
+ const exposes = e
1072
+ .enum('select_input_mode', ea.SET, Object.keys(inputModeEnum))
1073
+ .withDescription('Change the Input mode to use switch input, wired relay or simple push button')
1074
+ .withCategory('config');
1075
+ const toZigbee = [
1076
+ {
1077
+ key: ['select_input_mode'],
1078
+ convertSet: async (entity, key, value, meta) => {
1079
+ const commandWrapper = yokisExtendChecks.parseInputModeInput(value);
1080
+ yokisExtendChecks.log(key, value);
1081
+ await entity.command('manuSpecificYokisLightControl', 'selectInputMode', commandWrapper.payload);
1082
+ },
1083
+ },
1084
+ ];
1085
+ return {
1086
+ exposes: [exposes],
1087
+ toZigbee,
1088
+ isModernExtend: true,
1089
+ };
1090
+ },
1091
+ dimmerDim: () => {
1092
+ const exposes = e
1093
+ .composite('dimmer_loop_command', 'dimmer_prop', ea.SET)
1094
+ .withDescription('Start the dimming loop process for the selected duration.')
1095
+ .withFeature(e
1096
+ .numeric('ramp_continuous_duration', ea.SET) // ul_RampContinuousDuration
1097
+ .withUnit('ms')
1098
+ .withDescription('Set the duration of the ramp for the continuous variation, otherwise use 0xFFFFFFFF to use the one configured in the product'))
1099
+ .withFeature(e
1100
+ .numeric('step_continuous', ea.SET) // uc_StepContinuous
1101
+ .withUnit('s')
1102
+ .withDescription('Set the step size, otherwise use 0xFF to use the one configured in the product. Value is in %'))
1103
+ .withCategory('config');
1104
+ const toZigbee = [
1105
+ {
1106
+ key: ['dimmer_prop'],
1107
+ convertSet: async (entity, key, value, meta) => {
1108
+ // const options = utils.getOptions(meta.mapped, entity);
1109
+ // logger.debug('Invoked converter with options:' + JSON.stringify(options));
1110
+ const commandWrapper = yokisExtendChecks.parseDim(value);
1111
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
1112
+ await entity.command('manuSpecificYokisDimmer', 'dim', commandWrapper.payload);
1113
+ },
1114
+ },
1115
+ ];
1116
+ return {
1117
+ exposes: [exposes],
1118
+ toZigbee,
1119
+ isModernExtend: true,
1120
+ };
1121
+ },
1122
+ dimmerDimMinMax: () => {
1123
+ const exposes = e
1124
+ .composite('dimmer_min_max_command', 'dimmer_min_max_prop', ea.SET)
1125
+ .withDescription('Start dimming to the min or max value set in the device')
1126
+ .withFeature(e
1127
+ .numeric('transition_time', ea.SET) // ul_TransitionTime
1128
+ .withUnit('ms')
1129
+ .withDescription('Set the transition time to the selected value, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms'))
1130
+ .withFeature(e.enum('action', ea.SET, ['dimToMin', 'dimToMax']))
1131
+ .withCategory('config');
1132
+ const toZigbee = [
1133
+ {
1134
+ key: ['dimmer_min_max_prop'],
1135
+ convertSet: async (entity, key, value, meta) => {
1136
+ // const options = utils.getOptions(meta.mapped, entity);
1137
+ // logger.debug('Invoked converter with options:' + JSON.stringify(options));
1138
+ const commandWrapper = yokisExtendChecks.parseDimMinMax(value);
1139
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
1140
+ await entity.command('manuSpecificYokisDimmer', commandWrapper.action, commandWrapper.payload);
1141
+ },
1142
+ },
1143
+ ];
1144
+ return {
1145
+ exposes: [exposes],
1146
+ toZigbee,
1147
+ isModernExtend: true,
1148
+ };
1149
+ },
1150
+ dimmerUpDown: () => {
1151
+ const exposes = e.enum('dimmer_Up_down_command', ea.SET, ['dimUp', 'dimDown']).withDescription('Dim up or Down').withCategory('config');
1152
+ const toZigbee = [
1153
+ {
1154
+ key: ['dimmer_Up_down_command'],
1155
+ convertSet: async (entity, key, value, meta) => {
1156
+ yokisExtendChecks.log(key, value);
1157
+ await entity.command('manuSpecificYokisDimmer', value, {});
1158
+ },
1159
+ },
1160
+ ];
1161
+ return {
1162
+ exposes: [exposes],
1163
+ toZigbee,
1164
+ isModernExtend: true,
1165
+ };
1166
+ },
1167
+ dimmerMoveToFavorite: () => {
1168
+ const exposes = e
1169
+ .enum('dimmer_move_to_favorite', ea.SET, ['moveToFavorite1', 'moveToFavorite2', 'moveToFavorite3'])
1170
+ .withDescription('Start dimming to the favorite position 1, 2 or 3')
1171
+ .withCategory('config');
1172
+ const toZigbee = [
1173
+ {
1174
+ key: ['dimmer_move_to_favorite'],
1175
+ convertSet: async (entity, key, value, meta) => {
1176
+ yokisExtendChecks.log(key, value);
1177
+ await entity.command('manuSpecificYokisDimmer', value, {});
1178
+ },
1179
+ },
1180
+ ];
1181
+ return {
1182
+ exposes: [exposes],
1183
+ toZigbee,
1184
+ isModernExtend: true,
1185
+ };
1186
+ },
1187
+ dimmerStartNightLightModeCurrent: () => {
1188
+ const exposes = e
1189
+ .enum('dimmer_start_nightlight_command', ea.SET, ['startNightLightModeCurrent'])
1190
+ .withDescription('Trigger Starnight mode from the current diming value')
1191
+ .withCategory('config');
1192
+ const toZigbee = [
1193
+ {
1194
+ key: ['dimmer_start_nightlight_command'],
1195
+ convertSet: async (entity, key, value, meta) => {
1196
+ yokisExtendChecks.log(key, value);
1197
+ await entity.command('manuSpecificYokisDimmer', value, {});
1198
+ },
1199
+ },
1200
+ ];
1201
+ return {
1202
+ exposes: [exposes],
1203
+ toZigbee,
1204
+ isModernExtend: true,
1205
+ };
1206
+ },
1207
+ dimmerStartNightLightMode: () => {
1208
+ const exposes = e
1209
+ .composite('dimmer_start_nightlight_custom_command', 'dimmer_start_nightlight_custom_prop', ea.SET)
1210
+ .withDescription('Start the nightlight mode with the given parameters')
1211
+ .withFeature(e
1212
+ .numeric('childmode_starting_delay', ea.SET) // ul_ChildModeStartingDelay
1213
+ .withUnit('ms')
1214
+ .withDescription('Set the starting delay value, used before the start of the nightlight, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms'))
1215
+ .withFeature(e
1216
+ .numeric('childmode_brightness_start', ea.SET) // uc_ChildModeBrightnessStart
1217
+ .withUnit('%')
1218
+ .withDescription('Set the brightness at the beginning of the ramp, otherwise use 0xFF to use the one configured in the product. Value is in %'))
1219
+ .withFeature(e
1220
+ .numeric('childmode_brightness_end', ea.SET) // uc_ChildModeBrightnessEnd
1221
+ .withUnit('%')
1222
+ .withDescription('Set the brightness at the end of the ramp, otherwise use 0xFF to use the one configured in the product. Value is in %'))
1223
+ .withFeature(e
1224
+ .numeric('childmode_ramp_duration', ea.SET) // ul_ChildModeRampDuration
1225
+ .withUnit('ms')
1226
+ .withDescription('Set the ramp duration, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms'))
1227
+ .withFeature(e
1228
+ .numeric('childmode_on_duration', ea.SET) // ul_ChildModeOnDuration
1229
+ .withUnit('ms')
1230
+ .withDescription('Set the total duration of the nightlight, otherwise use 0xFFFFFFFF to use the one configured in the product. Value is in ms'))
1231
+ .withFeature(e
1232
+ .numeric('childmode_step', ea.SET) // uc_ChildStep
1233
+ .withUnit('%')
1234
+ .withDescription('Set the step size between each dim, otherwise use 0xFF to use the one configured in the product. Value is in %'))
1235
+ .withCategory('config');
1236
+ const toZigbee = [
1237
+ {
1238
+ key: ['dimmer_start_nightlight_custom_prop'],
1239
+ convertSet: async (entity, key, value, meta) => {
1240
+ const commandWrapper = yokisExtendChecks.parseStartNightLightMode(value);
1241
+ yokisExtendChecks.log(key, value, commandWrapper.payload);
1242
+ await entity.command('manuSpecificYokisDimmer', 'startNightLightMode', commandWrapper.payload);
1243
+ },
1244
+ },
1245
+ ];
1246
+ return {
1247
+ exposes: [exposes],
1248
+ toZigbee,
1249
+ isModernExtend: true,
1250
+ };
1251
+ },
1252
+ };
1253
+ // Custom cluster exposition
1254
+ const YokisDeviceExtend = [
1255
+ // ConfigurationChanged => This attribute is used by Yokis-based controller and probably not very useful at the moment, as we don't know which configuration was changed.
1256
+ // Leaving it here for future evaluation
1257
+ //
1258
+ // numeric({
1259
+ // name: configuration_changed,
1260
+ // cluster: 'manuSpecificYokisDevice',
1261
+ // attribute: 'configurationChanged',
1262
+ // description: `Indicate if the device configuration has changed:
1263
+ // - 0 to 0xFFFE -> No Change
1264
+ // - 0xFFFF -> Change have been detected`,
1265
+ // access: 'STATE_SET',
1266
+ // valueMin: 0,
1267
+ // valueMax: 3600,
1268
+ // reporting: {min: 0, max: repInterval.HOUR, change: 1},
1269
+ // entityCategory: 'config',
1270
+ // }),
1271
+ yokisCommandsExtend.resetToFactorySettings(),
1272
+ yokisCommandsExtend.relaunchBleAdvert(),
1273
+ // openNetwork command : very specific case where the Yokis devices can create their own Zigbee network without the need of a coordinator
1274
+ // Leaving it here for future evaluation
1275
+ //
1276
+ // yokisCommandsExtend.openNetwork(),
1277
+ ];
1278
+ const YokisInputExtend = [
1279
+ // InputMode
1280
+ (0, modernExtend_1.enumLookup)({
1281
+ name: 'input_mode',
1282
+ lookup: inputModeEnum,
1283
+ cluster: 'manuSpecificYokisInput',
1284
+ attribute: 'inputMode',
1285
+ description: `Indicate how the input should be handle:
1286
+ - 0 -> Unknow
1287
+ - 1 -> Push button
1288
+ - 2 -> Switch
1289
+ - 3 -> Relay
1290
+ - 4 -> FP_IN`,
1291
+ entityCategory: 'config',
1292
+ }),
1293
+ // InputMode
1294
+ (0, modernExtend_1.enumLookup)({
1295
+ name: 'contact_mode',
1296
+ lookup: { nc: 0x00, no: 0x01 },
1297
+ cluster: 'manuSpecificYokisInput',
1298
+ attribute: 'contactMode',
1299
+ description: `Indicate the contact nature of the entry:
1300
+ - 0 -> NC
1301
+ - 1 -> NO`,
1302
+ entityCategory: 'config',
1303
+ }),
1304
+ // LastLocalCommandState
1305
+ (0, modernExtend_1.binary)({
1306
+ name: 'last_local_command_state',
1307
+ cluster: 'manuSpecificYokisInput',
1308
+ attribute: 'lastLocalCommandState',
1309
+ description: 'Indicate the last known state of the local BP',
1310
+ valueOn: ['PRESSED', 0x01],
1311
+ valueOff: ['RELEASED', 0x00],
1312
+ access: 'STATE_GET',
1313
+ entityCategory: 'diagnostic',
1314
+ }),
1315
+ // LastBPConnectState
1316
+ (0, modernExtend_1.binary)({
1317
+ name: 'last_bp_connect_state',
1318
+ cluster: 'manuSpecificYokisInput',
1319
+ attribute: 'lastBPConnectState',
1320
+ description: 'Indicate the last known state of the Bp connect',
1321
+ valueOn: ['PRESSED', 0x01],
1322
+ valueOff: ['RELEASED', 0x00],
1323
+ access: 'STATE_GET',
1324
+ entityCategory: 'diagnostic',
1325
+ }),
1326
+ yokisCommandsExtend.sendPress(),
1327
+ yokisCommandsExtend.sendRelease(),
1328
+ yokisCommandsExtend.selectInputMode(),
1329
+ ];
1330
+ /* Pending checks for a specific device
1331
+ const YokisInputExtendWithBacklight: ModernExtend[] = [
1332
+ // BacklightIntensity
1333
+ numeric({
1334
+ name: 'backlight_intensity',
1335
+ cluster: 'manuSpecificYokisDevice',
1336
+ attribute: 'BacklightIntensity',
1337
+ description: 'Indicate the backlight intensity applied on the keys. Only use for “Simon” product',
1338
+ valueMin: 0x00,
1339
+ valueMax: 0x64,
1340
+ entityCategory: 'config',
1341
+ }),
1342
+
1343
+ ...YokisInputExtend,
1344
+ ];
1345
+ */
1346
+ const YokisEntryExtend = [
1347
+ // eShortPress
1348
+ (0, modernExtend_1.binary)({
1349
+ name: 'enable_short_press',
1350
+ cluster: 'manuSpecificYokisEntryConfigurator',
1351
+ attribute: 'eShortPress',
1352
+ description: 'Use to enable short press action',
1353
+ valueOn: ['ON', 0x01],
1354
+ valueOff: ['OFF', 0x00],
1355
+ entityCategory: 'config',
1356
+ }),
1357
+ // eLongPress
1358
+ (0, modernExtend_1.binary)({
1359
+ name: 'enable_long_press',
1360
+ cluster: 'manuSpecificYokisEntryConfigurator',
1361
+ attribute: 'eLongPress',
1362
+ description: 'Use to enable long press action',
1363
+ valueOn: ['ON', 0x01],
1364
+ valueOff: ['OFF', 0x00],
1365
+ entityCategory: 'config',
1366
+ }),
1367
+ // LongPressDuration
1368
+ (0, modernExtend_1.numeric)({
1369
+ name: 'long_press_duration',
1370
+ cluster: 'manuSpecificYokisEntryConfigurator',
1371
+ attribute: 'longPressDuration',
1372
+ description: 'Define long Press duration in milliseconds',
1373
+ valueMin: 0x00,
1374
+ valueMax: 0x1388,
1375
+ valueStep: 1,
1376
+ unit: 'ms',
1377
+ entityCategory: 'config',
1378
+ }),
1379
+ // TimeBetweenPress
1380
+ (0, modernExtend_1.numeric)({
1381
+ name: 'time_between_press',
1382
+ cluster: 'manuSpecificYokisEntryConfigurator',
1383
+ attribute: 'timeBetweenPress',
1384
+ description: 'Define the maximum time between 2 press to keep in a sequence (In milliseconds)',
1385
+ valueMin: 0x0064,
1386
+ valueMax: 0x0258,
1387
+ valueStep: 1,
1388
+ unit: 'ms',
1389
+ entityCategory: 'config',
1390
+ }),
1391
+ // eR12MLongPress
1392
+ (0, modernExtend_1.binary)({
1393
+ name: 'enable_R12M_long_press',
1394
+ cluster: 'manuSpecificYokisEntryConfigurator',
1395
+ attribute: 'eR12MLongPress',
1396
+ description: 'Enable R12M Long Press action',
1397
+ valueOn: ['ON', 0x01],
1398
+ valueOff: ['OFF', 0x00],
1399
+ entityCategory: 'config',
1400
+ }),
1401
+ // eLocalConfigLock
1402
+ (0, modernExtend_1.binary)({
1403
+ name: 'enable_local_config_lock',
1404
+ cluster: 'manuSpecificYokisEntryConfigurator',
1405
+ attribute: 'eLocalConfigLock',
1406
+ description: 'Disable local configuration',
1407
+ valueOn: ['ON', 0x01],
1408
+ valueOff: ['OFF', 0x00],
1409
+ entityCategory: 'config',
1410
+ }),
1411
+ ];
1412
+ const YokisSubSystemExtend = [
1413
+ (0, modernExtend_1.enumLookup)({
1414
+ name: 'power_failure_mode',
1415
+ lookup: { last_state: 0x00, off: 0x01, on: 0x02, blink: 0x03 },
1416
+ cluster: 'manuSpecificYokisSubSystem',
1417
+ attribute: 'powerFailureMode',
1418
+ description: 'Define the device behavior after power failure',
1419
+ entityCategory: 'config',
1420
+ // zigbeeCommandOptions: manufacturerOptions,
1421
+ }),
1422
+ ];
1423
+ const yokisLightControlExtend = [
1424
+ // OnOff => this is redundant from the GenOnOff state
1425
+ // Leaving it here for future evaluation
1426
+ //
1427
+ // binary({
1428
+ // name: 'on_off',
1429
+ // cluster: 'manuSpecificYokisLightControl',
1430
+ // attribute: 'onOff',
1431
+ // description: 'Use to know which state is the relay',
1432
+ // valueOn: ['ON', 0x01],
1433
+ // valueOff: ['OFF', 0x00],
1434
+ // access: 'STATE_GET',
1435
+ // reporting: {min: 0, max: repInterval.HOUR, change: 0, attribute: 'onOff'},
1436
+ // entityCategory: 'diagnostic',
1437
+ // }),
1438
+ // PrevState
1439
+ (0, modernExtend_1.binary)({
1440
+ name: 'prev_state',
1441
+ cluster: 'manuSpecificYokisLightControl',
1442
+ attribute: 'prevState',
1443
+ description: 'Indicate the previous state before action',
1444
+ valueOn: ['ON', 0x01],
1445
+ valueOff: ['OFF', 0x00],
1446
+ access: 'STATE_GET',
1447
+ entityCategory: 'diagnostic',
1448
+ }),
1449
+ // onTimer
1450
+ // eOnTimer => This attribute has been superseded by just using onTimer (a "0" onTimer will deactivate it)
1451
+ // Leaving it here for future evaluation
1452
+ //
1453
+ // binary({
1454
+ // name: 'e_on_timer',
1455
+ // cluster: 'manuSpecificYokisLightControl',
1456
+ // attribute: 'eOnTimer',
1457
+ // description: 'Enable (0x01) / Disable (0x00) use of onTimer',
1458
+ // valueOn: ['ON', 0x01],
1459
+ // valueOff: ['OFF', 0x00],
1460
+ // entityCategory: 'config',
1461
+ // }),
1462
+ (0, modernExtend_1.numeric)({
1463
+ name: 'on_timer',
1464
+ cluster: 'manuSpecificYokisLightControl',
1465
+ attribute: 'onTimer',
1466
+ description: 'Define the ON embedded timer duration in seconds. A `0` value will deactivate the timer',
1467
+ valueMin: 0,
1468
+ valueMax: 3600,
1469
+ valueStep: 1,
1470
+ unit: 's',
1471
+ entityCategory: 'config',
1472
+ }),
1473
+ // preOnDelay
1474
+ (0, modernExtend_1.binary)({
1475
+ name: 'enable_pre_on_delay',
1476
+ cluster: 'manuSpecificYokisLightControl',
1477
+ attribute: 'ePreOnDelay',
1478
+ description: 'Enable (`0x01`) / Disable (`0x00`) PreOn delay',
1479
+ valueOn: ['ON', 0x01],
1480
+ valueOff: ['OFF', 0x00],
1481
+ entityCategory: 'config',
1482
+ }),
1483
+ (0, modernExtend_1.numeric)({
1484
+ name: 'pre_on_delay',
1485
+ cluster: 'manuSpecificYokisLightControl',
1486
+ attribute: 'preOnDelay',
1487
+ description: 'Define the PreOn embedded delay in seconds',
1488
+ valueMin: 0,
1489
+ valueMax: 3600,
1490
+ valueStep: 1,
1491
+ unit: 's',
1492
+ entityCategory: 'config',
1493
+ }),
1494
+ // preOffDelay
1495
+ (0, modernExtend_1.binary)({
1496
+ name: 'enable_pre_off_delay',
1497
+ cluster: 'manuSpecificYokisLightControl',
1498
+ attribute: 'ePreOffDelay',
1499
+ description: 'Enable (`0x01`) / Disable (`0x00`) PreOff delay',
1500
+ valueOn: ['ON', 0x01],
1501
+ valueOff: ['OFF', 0x00],
1502
+ entityCategory: 'config',
1503
+ }),
1504
+ (0, modernExtend_1.numeric)({
1505
+ name: 'pre_off_delay',
1506
+ cluster: 'manuSpecificYokisLightControl',
1507
+ attribute: 'preOffDelay',
1508
+ description: 'Define the PreOff embedded delay in seconds',
1509
+ valueMin: 0,
1510
+ valueMax: 3600,
1511
+ valueStep: 1,
1512
+ unit: 's',
1513
+ entityCategory: 'config',
1514
+ }),
1515
+ // Pulseduration
1516
+ (0, modernExtend_1.numeric)({
1517
+ name: 'pulse_duration',
1518
+ cluster: 'manuSpecificYokisLightControl',
1519
+ attribute: 'pulseDuration',
1520
+ description: 'Set the value of ON pulse length',
1521
+ valueMin: 0x0014,
1522
+ valueMax: 0xfffe,
1523
+ valueStep: 1,
1524
+ unit: 'ms',
1525
+ entityCategory: 'config',
1526
+ }),
1527
+ // TimeType
1528
+ (0, modernExtend_1.enumLookup)({
1529
+ name: 'time_type',
1530
+ lookup: { seconds: 0x00, minutes: 0x01 },
1531
+ cluster: 'manuSpecificYokisLightControl',
1532
+ attribute: 'timeType',
1533
+ description: `Indicates the current Type of time selected that will be used during push button configuration:
1534
+ - 0x00 -> Seconds
1535
+ - 0x01 -> Minutes`,
1536
+ entityCategory: 'config',
1537
+ }),
1538
+ // LongOnDuration
1539
+ (0, modernExtend_1.numeric)({
1540
+ name: 'long_on_duration',
1541
+ cluster: 'manuSpecificYokisLightControl',
1542
+ attribute: 'longOnDuration',
1543
+ description: 'Set the value of the LONG ON embedded timer in seconds',
1544
+ valueMin: 0x00,
1545
+ valueMax: 0x00409980,
1546
+ valueStep: 1,
1547
+ unit: 's',
1548
+ entityCategory: 'config',
1549
+ }),
1550
+ // OperatingMode
1551
+ (0, modernExtend_1.enumLookup)({
1552
+ name: 'operating_mode',
1553
+ lookup: { timer: 0x00, staircase: 0x01, pulse: 0x02 },
1554
+ cluster: 'manuSpecificYokisLightControl',
1555
+ attribute: 'operatingMode',
1556
+ description: `Indicates the operating mode:
1557
+ - 0x00 -> Timer
1558
+ - 0x01 -> Staircase
1559
+ - 0x02 -> Pulse`,
1560
+ entityCategory: 'config',
1561
+ }),
1562
+ // stopAnnounce
1563
+ (0, modernExtend_1.binary)({
1564
+ name: 'enable_stop_announce',
1565
+ cluster: 'manuSpecificYokisLightControl',
1566
+ attribute: 'eStopAnnounce',
1567
+ description: 'Enable (`0x01`) / Disable (`0x00`) the announcement before turning OFF',
1568
+ valueOn: ['ON', 0x01],
1569
+ valueOff: ['OFF', 0x00],
1570
+ entityCategory: 'config',
1571
+ }),
1572
+ (0, modernExtend_1.numeric)({
1573
+ name: 'stop_announce_time',
1574
+ cluster: 'manuSpecificYokisLightControl',
1575
+ attribute: 'stopAnnounceTime',
1576
+ description: 'Time before goes off after the stop announce blinking. (In seconds)',
1577
+ valueMin: 0x00,
1578
+ valueMax: 0x00409980,
1579
+ valueStep: 1,
1580
+ unit: 's',
1581
+ entityCategory: 'config',
1582
+ }),
1583
+ // eDeaf
1584
+ (0, modernExtend_1.binary)({
1585
+ name: 'enable_deaf',
1586
+ cluster: 'manuSpecificYokisLightControl',
1587
+ attribute: 'eDeaf',
1588
+ description: 'Enable (`0x01`) / Disable (`0x00`) Deaf Actions',
1589
+ valueOn: ['ON', 0x01],
1590
+ valueOff: ['OFF', 0x00],
1591
+ entityCategory: 'config',
1592
+ }),
1593
+ (0, modernExtend_1.numeric)({
1594
+ name: 'deaf_blink_amount',
1595
+ cluster: 'manuSpecificYokisLightControl',
1596
+ attribute: 'deafBlinkAmount',
1597
+ description: 'Define number of blink to do when receiving the DEAF action. One blink is considered as one ON step followed by one OFF step',
1598
+ valueMin: 0x00,
1599
+ valueMax: 0x14,
1600
+ valueStep: 1,
1601
+ entityCategory: 'config',
1602
+ }),
1603
+ (0, modernExtend_1.numeric)({
1604
+ name: 'deaf_blink_time',
1605
+ cluster: 'manuSpecificYokisLightControl',
1606
+ attribute: 'deafBlinkTime',
1607
+ description: 'Define duration of a blink ON (In millisecond)',
1608
+ valueMin: 0x0064,
1609
+ valueMax: 0x4e20,
1610
+ valueStep: 1,
1611
+ entityCategory: 'config',
1612
+ }),
1613
+ // Blink
1614
+ (0, modernExtend_1.binary)({
1615
+ name: 'enable_blink',
1616
+ cluster: 'manuSpecificYokisLightControl',
1617
+ attribute: 'eBlink',
1618
+ description: 'Enable (`0x01`) / Disable (`0x00`) Blink Actions',
1619
+ valueOn: ['ON', 0x01],
1620
+ valueOff: ['OFF', 0x00],
1621
+ entityCategory: 'config',
1622
+ }),
1623
+ (0, modernExtend_1.numeric)({
1624
+ name: 'blink_amount',
1625
+ cluster: 'manuSpecificYokisLightControl',
1626
+ attribute: 'blinkAmount',
1627
+ description: 'Number of blinks done when receiving the corresponding order. One blink is considered as one ON step followed by one OFF step',
1628
+ valueMin: 0x00,
1629
+ valueMax: 0x14,
1630
+ valueStep: 1,
1631
+ entityCategory: 'config',
1632
+ }),
1633
+ (0, modernExtend_1.numeric)({
1634
+ name: 'blink_on_time',
1635
+ cluster: 'manuSpecificYokisLightControl',
1636
+ attribute: 'blinkOnTime',
1637
+ description: 'Duration for the ON time on a blink period (In millisecond)',
1638
+ valueMin: 0x00,
1639
+ valueMax: 0x00409980,
1640
+ valueStep: 1,
1641
+ entityCategory: 'config',
1642
+ }),
1643
+ (0, modernExtend_1.numeric)({
1644
+ name: 'blink_off_time',
1645
+ cluster: 'manuSpecificYokisLightControl',
1646
+ attribute: 'blinkOffTime',
1647
+ description: 'Duration for the OFF time on a blink period (In millisecond)',
1648
+ valueMin: 0x00,
1649
+ valueMax: 0x00409980,
1650
+ valueStep: 1,
1651
+ entityCategory: 'config',
1652
+ }),
1653
+ // StateAfterBlink
1654
+ (0, modernExtend_1.enumLookup)({
1655
+ name: 'state_after_blink',
1656
+ lookup: stateAfterBlinkEnum,
1657
+ cluster: 'manuSpecificYokisLightControl',
1658
+ attribute: 'stateAfterBlink',
1659
+ description: `Indicate which state must be apply after a blink sequence:
1660
+ - 0x00 -> State before blinking
1661
+ - 0x01 -> OFF
1662
+ - 0x02 -> ON
1663
+ - 0x03 -> Infinite blinking`,
1664
+ entityCategory: 'config',
1665
+ }),
1666
+ // eNcCommand
1667
+ (0, modernExtend_1.binary)({
1668
+ name: 'enable_nc_command',
1669
+ cluster: 'manuSpecificYokisLightControl',
1670
+ attribute: 'eNcCommand',
1671
+ description: 'Define the output relay as Normaly close',
1672
+ valueOn: ['ON', 0x01],
1673
+ valueOff: ['OFF', 0x00],
1674
+ entityCategory: 'config',
1675
+ }),
1676
+ yokisCommandsExtend.moveToPosition(),
1677
+ yokisCommandsExtend.pulse(),
1678
+ yokisCommandsExtend.blink(),
1679
+ yokisCommandsExtend.deafBlink(),
1680
+ yokisCommandsExtend.longOnCommand(),
1681
+ ];
1682
+ const YokisDimmerExtend = [
1683
+ // currentPosition
1684
+ (0, modernExtend_1.numeric)({
1685
+ name: 'current_position',
1686
+ cluster: 'manuSpecificYokisDimmer',
1687
+ attribute: 'currentPosition',
1688
+ description: 'This attribute defines the current position, in %',
1689
+ access: 'STATE_GET',
1690
+ entityCategory: 'diagnostic',
1691
+ }),
1692
+ // memoryPosition
1693
+ (0, modernExtend_1.numeric)({
1694
+ name: 'memory_position',
1695
+ cluster: 'manuSpecificYokisDimmer',
1696
+ attribute: 'memoryPosition',
1697
+ description: 'This attribute defines the memory position, in %',
1698
+ access: 'STATE_GET',
1699
+ entityCategory: 'diagnostic',
1700
+ }),
1701
+ // RampUp
1702
+ (0, modernExtend_1.binary)({
1703
+ name: 'enable_ramp_up',
1704
+ cluster: 'manuSpecificYokisDimmer',
1705
+ attribute: 'eRampUp',
1706
+ description: 'This attribute defines if a ramp up should be used or not',
1707
+ valueOn: ['ON', 0x01],
1708
+ valueOff: ['OFF', 0x00],
1709
+ entityCategory: 'config',
1710
+ }),
1711
+ (0, modernExtend_1.numeric)({
1712
+ name: 'ramp_up',
1713
+ cluster: 'manuSpecificYokisDimmer',
1714
+ attribute: 'rampUp',
1715
+ description: 'This attribute defines the time taken during the ramp up in ms',
1716
+ valueMin: 0x00000000,
1717
+ valueMax: 0x05265c00,
1718
+ valueStep: 1000,
1719
+ entityCategory: 'config',
1720
+ }),
1721
+ // RampDown
1722
+ (0, modernExtend_1.binary)({
1723
+ name: 'enable_ramp_down',
1724
+ cluster: 'manuSpecificYokisDimmer',
1725
+ attribute: 'eRampDown',
1726
+ description: 'This attribute defines if a ramp down should be used or not',
1727
+ valueOn: ['ON', 0x01],
1728
+ valueOff: ['OFF', 0x00],
1729
+ entityCategory: 'config',
1730
+ }),
1731
+ (0, modernExtend_1.numeric)({
1732
+ name: 'ramp_down',
1733
+ cluster: 'manuSpecificYokisDimmer',
1734
+ attribute: 'rampDown',
1735
+ description: 'This attribute defines the time taken during the ramp down in ms',
1736
+ valueMin: 0x00000000,
1737
+ valueMax: 0x05265c00,
1738
+ valueStep: 1000,
1739
+ entityCategory: 'config',
1740
+ }),
1741
+ // rampContinuousTime
1742
+ (0, modernExtend_1.numeric)({
1743
+ name: 'ramp_continuous_time',
1744
+ cluster: 'manuSpecificYokisDimmer',
1745
+ attribute: 'rampContinuousTime',
1746
+ description: 'This attribute defines the time taken during the ramp loop in ms',
1747
+ valueMin: 0x00000000,
1748
+ valueMax: 0x05265c00,
1749
+ valueStep: 1000,
1750
+ entityCategory: 'config',
1751
+ }),
1752
+ // stepUp
1753
+ (0, modernExtend_1.numeric)({
1754
+ name: 'step_up',
1755
+ cluster: 'manuSpecificYokisDimmer',
1756
+ attribute: 'stepUp',
1757
+ description: 'This attribute defines the value of each step during a dimming up. This value is set in %',
1758
+ valueMin: 0x00,
1759
+ valueMax: 0x64,
1760
+ valueStep: 1,
1761
+ entityCategory: 'config',
1762
+ }),
1763
+ // lowDimLimit
1764
+ (0, modernExtend_1.numeric)({
1765
+ name: 'low_dim_limit',
1766
+ cluster: 'manuSpecificYokisDimmer',
1767
+ attribute: 'lowDimLimit',
1768
+ description: 'This attribute defines the value of the low dim limit, used during a dimming loop, on a long press for example. This value is set in %',
1769
+ valueMin: 0x00,
1770
+ valueMax: 0x64,
1771
+ valueStep: 1,
1772
+ entityCategory: 'config',
1773
+ }),
1774
+ // highDimLimit
1775
+ (0, modernExtend_1.numeric)({
1776
+ name: 'high_dim_limit',
1777
+ cluster: 'manuSpecificYokisDimmer',
1778
+ attribute: 'highDimLimit',
1779
+ description: 'This attribute defines the value of the high dim limit, used during a dimming loop, on a long press for example. This value is set in %',
1780
+ valueMin: 0x00,
1781
+ valueMax: 0x64,
1782
+ valueStep: 1,
1783
+ entityCategory: 'config',
1784
+ }),
1785
+ // nightLightStartingDelay
1786
+ (0, modernExtend_1.numeric)({
1787
+ name: 'nightlight_starting_delay',
1788
+ cluster: 'manuSpecificYokisDimmer',
1789
+ attribute: 'nightLightStartingDelay',
1790
+ description: 'This attribute defines the time before the nightlight begin. This value is set in seconds',
1791
+ valueMin: 0x00000000,
1792
+ valueMax: 0xfffffffe,
1793
+ valueStep: 10,
1794
+ entityCategory: 'config',
1795
+ }),
1796
+ // nightLightStartingBrightness
1797
+ (0, modernExtend_1.numeric)({
1798
+ name: 'nightlight_starting_brightness',
1799
+ cluster: 'manuSpecificYokisDimmer',
1800
+ attribute: 'nightLightStartingBrightness',
1801
+ description: 'This attribute defines the dimming value at the start of the nightlight. This value is set in %',
1802
+ valueMin: 0x00,
1803
+ valueMax: 0x64,
1804
+ valueStep: 1,
1805
+ entityCategory: 'config',
1806
+ }),
1807
+ // nightLightEndingBrightness
1808
+ (0, modernExtend_1.numeric)({
1809
+ name: 'nightlight_ending_brightness',
1810
+ cluster: 'manuSpecificYokisDimmer',
1811
+ attribute: 'nightLightEndingBrightness',
1812
+ description: 'This attribute defines the dimming value at the last step of the nightlight. This attribute must be lower than 0x000D : Nightlight starting brightness. This value is set in %',
1813
+ valueMin: 0x00,
1814
+ valueMax: 0x64,
1815
+ valueStep: 1,
1816
+ entityCategory: 'config',
1817
+ }),
1818
+ // nightLightRampTime
1819
+ (0, modernExtend_1.numeric)({
1820
+ name: 'nightlight_ramp_time',
1821
+ cluster: 'manuSpecificYokisDimmer',
1822
+ attribute: 'nightLightRampTime',
1823
+ description: 'This attribute defines the ramp duration of the nightlight. The ramp is running after the end of the starting delay and until the ending bright is reached. This value is set in seconds',
1824
+ valueMin: 0x00000000,
1825
+ valueMax: 0x05265c00,
1826
+ valueStep: 10,
1827
+ entityCategory: 'config',
1828
+ }),
1829
+ // nightLightOnTime
1830
+ (0, modernExtend_1.numeric)({
1831
+ name: 'nightlight_on_time',
1832
+ cluster: 'manuSpecificYokisDimmer',
1833
+ attribute: 'nightLightOnTime',
1834
+ description: 'This attribute defines the total duration of the nightlight. It must not be lower than 0x000F : Nightlight ramp time. This value is set in seconds',
1835
+ valueMin: 0x00000000,
1836
+ valueMax: 0x00409980,
1837
+ valueStep: 10,
1838
+ entityCategory: 'config',
1839
+ }),
1840
+ // favoritePosition1
1841
+ (0, modernExtend_1.numeric)({
1842
+ name: 'favorite_position_1',
1843
+ cluster: 'manuSpecificYokisDimmer',
1844
+ attribute: 'favoritePosition1',
1845
+ description: 'This attribute defines the value of the favorite position 1. This value is set in %',
1846
+ valueMin: 0x00,
1847
+ valueMax: 0x64,
1848
+ valueStep: 1,
1849
+ entityCategory: 'config',
1850
+ }),
1851
+ // favoritePosition2
1852
+ (0, modernExtend_1.numeric)({
1853
+ name: 'favorite_position_2',
1854
+ cluster: 'manuSpecificYokisDimmer',
1855
+ attribute: 'favoritePosition2',
1856
+ description: 'This attribute defines the value of the favorite position 2. This value is set in %',
1857
+ valueMin: 0x00,
1858
+ valueMax: 0x64,
1859
+ valueStep: 1,
1860
+ entityCategory: 'config',
1861
+ }),
1862
+ // favoritePosition3
1863
+ (0, modernExtend_1.numeric)({
1864
+ name: 'favorite_position_3',
1865
+ cluster: 'manuSpecificYokisDimmer',
1866
+ attribute: 'favoritePosition3',
1867
+ description: 'This attribute defines the value of the favorite position 3. This value is set in %',
1868
+ valueMin: 0x00,
1869
+ valueMax: 0x64,
1870
+ valueStep: 1,
1871
+ entityCategory: 'config',
1872
+ }),
1873
+ // stepControllerMode
1874
+ (0, modernExtend_1.binary)({
1875
+ name: 'step_controller_mode',
1876
+ cluster: 'manuSpecificYokisDimmer',
1877
+ attribute: 'stepControllerMode',
1878
+ description: 'This attribute enables or disables the 2-step controller mode. This mode enable product to run without any ramp before and after ON or OFF. It acts like a relay',
1879
+ valueOn: ['ON', 0x01],
1880
+ valueOff: ['OFF', 0x00],
1881
+ entityCategory: 'config',
1882
+ }),
1883
+ // memoryPositionMode
1884
+ (0, modernExtend_1.binary)({
1885
+ name: 'memory_position_mode',
1886
+ cluster: 'manuSpecificYokisDimmer',
1887
+ attribute: 'memoryPositionMode',
1888
+ description: 'This attribute enables or disables the memory position mode at first push button release',
1889
+ valueOn: ['ON', 0x01],
1890
+ valueOff: ['OFF', 0x00],
1891
+ entityCategory: 'config',
1892
+ }),
1893
+ // stepDown
1894
+ (0, modernExtend_1.numeric)({
1895
+ name: 'step_down',
1896
+ cluster: 'manuSpecificYokisDimmer',
1897
+ attribute: 'stepDown',
1898
+ description: 'This attribute defines the value of each step during a dimming down. This value is set in %',
1899
+ valueMin: 0x00,
1900
+ valueMax: 0x64,
1901
+ valueStep: 1,
1902
+ entityCategory: 'config',
1903
+ }),
1904
+ // stepContinuous
1905
+ (0, modernExtend_1.numeric)({
1906
+ name: 'step_continuous',
1907
+ cluster: 'manuSpecificYokisDimmer',
1908
+ attribute: 'stepContinuous',
1909
+ description: 'This attribute defines the value of each step during a dimming loop. This value is set in %',
1910
+ valueMin: 0x00,
1911
+ valueMax: 0x64,
1912
+ valueStep: 1,
1913
+ entityCategory: 'config',
1914
+ }),
1915
+ // stepNightLigth
1916
+ (0, modernExtend_1.numeric)({
1917
+ name: 'step_nightlight',
1918
+ cluster: 'manuSpecificYokisDimmer',
1919
+ attribute: 'stepNightLight',
1920
+ description: 'This attribute defines the value of each step during the ramp down of the nightlight mode. This value is set in %',
1921
+ valueMin: 0x00,
1922
+ valueMax: 0x64,
1923
+ valueStep: 1,
1924
+ entityCategory: 'config',
1925
+ }),
1926
+ yokisCommandsExtend.dimmerDim(),
1927
+ yokisCommandsExtend.dimmerUpDown(),
1928
+ yokisCommandsExtend.dimmerDimMinMax(),
1929
+ yokisCommandsExtend.dimmerMoveToFavorite(),
1930
+ yokisCommandsExtend.dimmerStartNightLightModeCurrent(),
1931
+ yokisCommandsExtend.dimmerStartNightLightMode(),
1932
+ ];
1933
+ const YokisWindowCoveringExtend = [
1934
+ // TODO : Placeholder - pending documentation
1935
+ ];
1936
+ /* Pending checks for a specific device
1937
+ const YokisChannelExtend: ModernExtend[] = [
1938
+ // On/Off cluster mode
1939
+ enumLookup({
1940
+ name: 'on_off_cluster_mode',
1941
+ lookup: {toggle: 0x00, on: 0x01, off: 0x02, off2: 0x03},
1942
+ cluster: 'manuSpecificYokisChannel',
1943
+ attribute: 'onOffClusterMode',
1944
+ description: `Define the command to send to the servers using cluster On/Off. Values are:
1945
+ - 0x00 – TOGGLE (1)
1946
+ - 0x01 – ON
1947
+ - 0x02 – OFF
1948
+ - 0x03 – OFF
1949
+ `,
1950
+ entityCategory: 'config',
1951
+ }),
1952
+
1953
+ // Level control cluster mode
1954
+ enumLookup({
1955
+ name: 'level_control_cluster_mode',
1956
+ lookup: {nothing: 0x00, move_up: 0x01, move_down: 0x02, stop: 0x03},
1957
+ cluster: 'manuSpecificYokisChannel',
1958
+ attribute: 'levelControlClusterMode',
1959
+ description: `Define the command to send to the servers using cluster Level control. Values are:
1960
+ - 0x00 – Nothing
1961
+ - 0x01 – Move up
1962
+ - 0x02 – Move down
1963
+ - 0x03 – Stop
1964
+ `,
1965
+ entityCategory: 'config',
1966
+ }),
1967
+
1968
+ // Window covering cluster mode
1969
+ enumLookup({
1970
+ name: 'window_covering_cluster_mode',
1971
+ lookup: {toggle: 0x00, up_open: 0x01, down_close: 0x02, stop: 0x03},
1972
+ cluster: 'manuSpecificYokisChannel',
1973
+ attribute: 'windowCoveringClusterMode',
1974
+ description: `Define the command to send to the servers using cluster Window Covering. Values are:
1975
+ - 0x00 – TOGGLE (1)
1976
+ - 0x01 – UP/OPEN
1977
+ - 0x02 – DOWN/CLOSE
1978
+ - 0x03 – STOP
1979
+ `,
1980
+ entityCategory: 'config',
1981
+ }),
1982
+
1983
+ // Cluster to be used
1984
+ // Supports reporting
1985
+ numeric({
1986
+ name: 'cluster_to_be_used',
1987
+ cluster: 'manuSpecificYokisChannel',
1988
+ attribute: 'clusterToBeUsed',
1989
+ description: `Defines the cluster that will be used by the channel to create an order.
1990
+
1991
+ If the value is set to 0xFFF0 the device will use a cluster priority list in order to choose the correct cluster and create the order associate depending on the target binded to the channel. The device will check which cluster the target declares and use the highest priority
1992
+
1993
+ The priority list is:
1994
+ - Yokis Input cluster (0xFC02)
1995
+ - Window covering (0x0102)
1996
+ - On Off (0x0006)
1997
+ - Level Control (0x0008)
1998
+ - Yokis Pilot Wire (0xFC0A)
1999
+ - Yokis Light Control (0xFC06)
2000
+
2001
+ This mode allows the user to “mix” multiple device type on the same channel.
2002
+
2003
+ When a cluster is specified, the channel will only “control” the device binded with this specific cluster.
2004
+ `,
2005
+ entityCategory: 'config',
2006
+ }),
2007
+
2008
+ // Sending mode
2009
+ enumLookup({
2010
+ name: 'sending_mode',
2011
+ lookup: {direct: 0x00, broadcast: 0x01, group: 0x02},
2012
+ cluster: 'manuSpecificYokisChannel',
2013
+ attribute: 'sendingMode',
2014
+ description: `Define the channel sending mode:
2015
+ - 0x00 : DIRECT
2016
+ - 0x01 : BROADCAST
2017
+ - 0x02: GROUP (Will use the Group Id)
2018
+ `,
2019
+ entityCategory: 'config',
2020
+ }),
2021
+
2022
+ // Yokis light control mode
2023
+ enumLookup({
2024
+ name: 'yokis_light_control_mode',
2025
+ lookup: {pulse: 0x00, deaf: 0x01},
2026
+ cluster: 'manuSpecificYokisChannel',
2027
+ attribute: 'yokisLightControlMode',
2028
+ description: `Define the light control mode used between remote and the binded device. Values are:
2029
+ - 0x00 – Mode pulse
2030
+ - 0x01 – Mode deaf
2031
+ `,
2032
+ entityCategory: 'config',
2033
+ }),
2034
+
2035
+ // Yokis pilot wire cluster mode
2036
+ enumLookup({
2037
+ name: 'yokis_pilot_wire_cluster_mode',
2038
+ lookup: {toggle: 0x00, confort: 0x01, eco: 0x02},
2039
+ cluster: 'manuSpecificYokisChannel',
2040
+ attribute: 'yokisPilotWireClusterMode',
2041
+ description: `Define the command to send to the servers using cluster Yokis Pilot Wire. Values are:
2042
+ - 0x00 – TOGGLE (1)
2043
+ - 0x01 – CONFORT
2044
+ - 0x02 – ECO
2045
+ `,
2046
+ entityCategory: 'config',
2047
+ }),
2048
+
2049
+ // Group id
2050
+ numeric({
2051
+ name: 'group_id',
2052
+ cluster: 'manuSpecificYokisChannel',
2053
+ attribute: 'groupId',
2054
+ description: `Indicate the group id who will receive the command from the dedicated endpoint. Only used when the sending mode is set to “GROUP” (0x02)`,
2055
+ entityCategory: 'config',
2056
+ }),
2057
+ ];
2058
+ */
2059
+ const YokisLoadManagerExtend = [
2060
+ // TODO : Placeholder - pending documentation
2061
+ ];
2062
+ const YokisPilotWireExtend = [
2063
+ // TODO : Placeholder - pending documentation
2064
+ ];
2065
+ const YokisStatsExtend = [
2066
+ // TODO : Placeholder - pending documentation
2067
+ ];
2068
+ // #endregion
2069
+ const definitions = [
2070
+ {
2071
+ // MTR500E-UP
2072
+ zigbeeModel: ['MTR500E-UP'],
2073
+ model: 'MTR500E-UP',
2074
+ vendor: 'YOKIS',
2075
+ description: 'Remote power switch with timer 500W',
2076
+ extend: [
2077
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2078
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2079
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisEntryConfigurator', YokisClustersDefinition['manuSpecificYokisEntryConfigurator']),
2080
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisSubSystem', YokisClustersDefinition['manuSpecificYokisSubSystem']),
2081
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLoadManager', YokisClustersDefinition['manuSpecificYokisLoadManager']), // Pending implementation
2082
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2083
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisStats', YokisClustersDefinition['manuSpecificYokisStats']), // Pending implementation
2084
+ (0, modernExtend_1.onOff)({ powerOnBehavior: false }), // StartupOnOff is not supported
2085
+ (0, modernExtend_1.identify)(),
2086
+ ...YokisSubSystemExtend,
2087
+ ...yokisLightControlExtend,
2088
+ ...YokisDeviceExtend,
2089
+ ...YokisInputExtend,
2090
+ ...YokisEntryExtend,
2091
+ ...YokisLoadManagerExtend, // Pending implementation
2092
+ ...YokisStatsExtend, // Pending implementation
2093
+ ],
2094
+ },
2095
+ {
2096
+ // MTR1300E-UP
2097
+ zigbeeModel: ['MTR1300E-UP'],
2098
+ model: 'MTR1300E-UP',
2099
+ vendor: 'YOKIS',
2100
+ description: 'Remote power switch with timer 1300W',
2101
+ extend: [
2102
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2103
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2104
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisEntryConfigurator', YokisClustersDefinition['manuSpecificYokisEntryConfigurator']),
2105
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisSubSystem', YokisClustersDefinition['manuSpecificYokisSubSystem']),
2106
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLoadManager', YokisClustersDefinition['manuSpecificYokisLoadManager']), // Pending implementation
2107
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2108
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisStats', YokisClustersDefinition['manuSpecificYokisStats']), // Pending implementation
2109
+ (0, modernExtend_1.onOff)({ powerOnBehavior: false }), // StartupOnOff is not supported
2110
+ (0, modernExtend_1.identify)(),
2111
+ ...YokisSubSystemExtend,
2112
+ ...yokisLightControlExtend,
2113
+ ...YokisDeviceExtend,
2114
+ ...YokisInputExtend,
2115
+ ...YokisEntryExtend,
2116
+ ...YokisLoadManagerExtend, // Pending implementation
2117
+ ...YokisStatsExtend, // Pending implementation
2118
+ ],
2119
+ },
2120
+ {
2121
+ // MTR2000E-UP
2122
+ zigbeeModel: ['MTR2000E-UP'],
2123
+ model: 'MTR2000E-UP',
2124
+ vendor: 'YOKIS',
2125
+ description: 'Remote power switch with timer 2000W',
2126
+ extend: [
2127
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2128
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2129
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisEntryConfigurator', YokisClustersDefinition['manuSpecificYokisEntryConfigurator']),
2130
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisSubSystem', YokisClustersDefinition['manuSpecificYokisSubSystem']),
2131
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLoadManager', YokisClustersDefinition['manuSpecificYokisLoadManager']), // Pending implementation
2132
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2133
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisStats', YokisClustersDefinition['manuSpecificYokisStats']), // Pending implementation
2134
+ (0, modernExtend_1.onOff)({ powerOnBehavior: false }), // StartupOnOff is not supported
2135
+ (0, modernExtend_1.identify)(),
2136
+ ...YokisSubSystemExtend,
2137
+ ...yokisLightControlExtend,
2138
+ ...YokisDeviceExtend,
2139
+ ...YokisInputExtend,
2140
+ ...YokisEntryExtend,
2141
+ ...YokisLoadManagerExtend, // Pending implementation
2142
+ ...YokisStatsExtend, // Pending implementation
2143
+ ],
2144
+ },
2145
+ {
2146
+ // MTV300E-UP
2147
+ zigbeeModel: ['MTV300E-UP'],
2148
+ model: 'MTV300E-UP',
2149
+ vendor: 'YOKIS',
2150
+ description: 'Remote dimmer with timer 300W',
2151
+ extend: [
2152
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2153
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2154
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisEntryConfigurator', YokisClustersDefinition['manuSpecificYokisEntryConfigurator']),
2155
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisSubSystem', YokisClustersDefinition['manuSpecificYokisSubSystem']),
2156
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLoadManager', YokisClustersDefinition['manuSpecificYokisLoadManager']), // Pending implementation
2157
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2158
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2159
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisStats', YokisClustersDefinition['manuSpecificYokisStats']), // Pending implementation
2160
+ (0, modernExtend_1.light)({ configureReporting: true, powerOnBehavior: false }), // StartupOnOff is not supported, TODO: review dimmer cluster instead
2161
+ (0, modernExtend_1.identify)(),
2162
+ ...yokisLightControlExtend,
2163
+ ...YokisSubSystemExtend,
2164
+ ...YokisDimmerExtend,
2165
+ ...YokisDeviceExtend,
2166
+ ...YokisInputExtend,
2167
+ ...YokisEntryExtend,
2168
+ ...YokisLoadManagerExtend, // Pending implementation
2169
+ ...YokisStatsExtend, // Pending implementation
2170
+ ],
2171
+ },
2172
+ {
2173
+ // MVR500E-UP
2174
+ zigbeeModel: ['MVR500E-UP'],
2175
+ model: 'MVR500E-UP',
2176
+ vendor: 'YOKIS',
2177
+ description: 'Roller shutter module 500W',
2178
+ extend: [
2179
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2180
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2181
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisEntryConfigurator', YokisClustersDefinition['manuSpecificYokisEntryConfigurator']),
2182
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisSubSystem', YokisClustersDefinition['manuSpecificYokisSubSystem']),
2183
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLoadManager', YokisClustersDefinition['manuSpecificYokisLoadManager']), // Pending implementation
2184
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']),
2185
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisStats', YokisClustersDefinition['manuSpecificYokisStats']), // Pending implementation
2186
+ (0, modernExtend_1.identify)(),
2187
+ (0, modernExtend_1.windowCovering)({ controls: ['lift'] }),
2188
+ (0, modernExtend_1.commandsWindowCovering)(),
2189
+ ...YokisSubSystemExtend,
2190
+ ...YokisWindowCoveringExtend,
2191
+ ...YokisDeviceExtend,
2192
+ ...YokisInputExtend,
2193
+ ...YokisEntryExtend,
2194
+ ...YokisLoadManagerExtend, // Pending implementation
2195
+ ...YokisStatsExtend, // Pending implementation
2196
+ ],
2197
+ },
2198
+ {
2199
+ // E2BPA-UP
2200
+ zigbeeModel: ['E2BPA-UP', 'E2BP-UP'],
2201
+ model: 'E2BP-UP',
2202
+ vendor: 'YOKIS',
2203
+ description: 'Flush-mounted independent 2-channel transmitter',
2204
+ extend: [
2205
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2206
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2207
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2208
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2209
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2210
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2211
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2212
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2 } }),
2213
+ (0, modernExtend_1.identify)(),
2214
+ (0, modernExtend_1.commandsOnOff)(),
2215
+ (0, modernExtend_1.commandsLevelCtrl)(),
2216
+ (0, modernExtend_1.commandsWindowCovering)(),
2217
+ // ...YokisDeviceExtend,
2218
+ // ...YokisInputExtend,
2219
+ // ...YokisChannelExtend,
2220
+ ...YokisPilotWireExtend,
2221
+ ],
2222
+ },
2223
+ {
2224
+ // E4BPA-UP
2225
+ zigbeeModel: ['E4BPA-UP', 'E4BP-UP', 'E4BPX-UP'],
2226
+ model: 'E4BP-UP',
2227
+ vendor: 'YOKIS',
2228
+ description: 'Flush-mounted independent 4-channel transmitter',
2229
+ extend: [
2230
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2231
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2232
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2233
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2234
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2235
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2236
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2237
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2, '3': 3, '4': 4 } }),
2238
+ (0, modernExtend_1.identify)(),
2239
+ (0, modernExtend_1.commandsOnOff)(),
2240
+ (0, modernExtend_1.commandsLevelCtrl)(),
2241
+ (0, modernExtend_1.commandsWindowCovering)(),
2242
+ // ...YokisDeviceExtend,
2243
+ // ...YokisInputExtend,
2244
+ // ...YokisChannelExtend,
2245
+ ...YokisPilotWireExtend,
2246
+ ],
2247
+ },
2248
+ {
2249
+ // TLC1-UP
2250
+ zigbeeModel: ['TLC1-UP'],
2251
+ model: 'TLC1-UP',
2252
+ vendor: 'YOKIS',
2253
+ description: 'Tabletop Design series 1-button remote control',
2254
+ extend: [
2255
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2256
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2257
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2258
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2259
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2260
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2261
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2262
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisTemperatureMeasurement', YokisClustersDefinition['manuSpecificYokisTemperatureMeasurement']), // Pending implementation
2263
+ (0, modernExtend_1.identify)(),
2264
+ (0, modernExtend_1.commandsOnOff)(),
2265
+ (0, modernExtend_1.commandsLevelCtrl)(),
2266
+ (0, modernExtend_1.commandsWindowCovering)(),
2267
+ // ...YokisDeviceExtend,
2268
+ // ...YokisInputExtend,
2269
+ // ...YokisChannelExtend,
2270
+ ...YokisPilotWireExtend,
2271
+ ],
2272
+ },
2273
+ {
2274
+ // TLC2-UP
2275
+ zigbeeModel: ['TLC2-UP'],
2276
+ model: 'TLC2-UP',
2277
+ vendor: 'YOKIS',
2278
+ description: 'Keyring Design series 2-button remote control',
2279
+ extend: [
2280
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2281
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2282
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2283
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2284
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2285
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2286
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2287
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2 } }),
2288
+ (0, modernExtend_1.identify)(),
2289
+ (0, modernExtend_1.commandsOnOff)(),
2290
+ (0, modernExtend_1.commandsLevelCtrl)(),
2291
+ (0, modernExtend_1.commandsWindowCovering)(),
2292
+ // ...YokisDeviceExtend,
2293
+ // ...YokisInputExtend,
2294
+ // ...YokisChannelExtend,
2295
+ ...YokisPilotWireExtend,
2296
+ ],
2297
+ },
2298
+ {
2299
+ // TLC4-UP
2300
+ zigbeeModel: ['TLC4-UP'],
2301
+ model: 'TLC4-UP',
2302
+ vendor: 'YOKIS',
2303
+ description: 'Keyring Design series 4-button remote control',
2304
+ extend: [
2305
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2306
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2307
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2308
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2309
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2310
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2311
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2312
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2, '3': 3, '4': 4 } }),
2313
+ (0, modernExtend_1.identify)(),
2314
+ (0, modernExtend_1.commandsOnOff)(),
2315
+ (0, modernExtend_1.commandsLevelCtrl)(),
2316
+ (0, modernExtend_1.commandsWindowCovering)(),
2317
+ // ...YokisDeviceExtend,
2318
+ // ...YokisInputExtend,
2319
+ // ...YokisChannelExtend,
2320
+ ...YokisPilotWireExtend,
2321
+ ],
2322
+ },
2323
+ {
2324
+ // TLC8-UP
2325
+ zigbeeModel: ['TLC8-UP'],
2326
+ model: 'TLC8-UP',
2327
+ vendor: 'YOKIS',
2328
+ description: 'Keyring Design series 8-button remote control',
2329
+ extend: [
2330
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2331
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2332
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2333
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2334
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2335
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2336
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2337
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8 } }),
2338
+ (0, modernExtend_1.identify)(),
2339
+ (0, modernExtend_1.commandsOnOff)(),
2340
+ (0, modernExtend_1.commandsLevelCtrl)(),
2341
+ (0, modernExtend_1.commandsWindowCovering)(),
2342
+ // ...YokisDeviceExtend,
2343
+ // ...YokisInputExtend,
2344
+ // ...YokisChannelExtend,
2345
+ ...YokisPilotWireExtend,
2346
+ ],
2347
+ },
2348
+ {
2349
+ // TLM1-UP
2350
+ zigbeeModel: ['TLM1-UP', 'TLM503-UP'],
2351
+ model: 'TLM1-UP',
2352
+ vendor: 'YOKIS',
2353
+ description: 'Wall-mounted 1-button transmitter',
2354
+ extend: [
2355
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2356
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2357
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2358
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2359
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2360
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2361
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2362
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisTemperatureMeasurement', YokisClustersDefinition['manuSpecificYokisTemperatureMeasurement']), // Pending implementation
2363
+ (0, modernExtend_1.identify)(),
2364
+ (0, modernExtend_1.commandsOnOff)(),
2365
+ (0, modernExtend_1.commandsLevelCtrl)(),
2366
+ (0, modernExtend_1.commandsWindowCovering)(),
2367
+ // ...YokisDeviceExtend,
2368
+ // ...YokisInputExtend,
2369
+ // ...YokisChannelExtend,
2370
+ ...YokisPilotWireExtend,
2371
+ ],
2372
+ },
2373
+ {
2374
+ // TLM2-UP
2375
+ zigbeeModel: ['TLM2-UP', 'TLM2_503-UP'],
2376
+ model: 'TLM2-UP',
2377
+ vendor: 'YOKIS',
2378
+ description: 'Wall-mounted 2-button transmitter',
2379
+ extend: [
2380
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2381
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2382
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2383
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2384
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2385
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2386
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2387
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisTemperatureMeasurement', YokisClustersDefinition['manuSpecificYokisTemperatureMeasurement']), // Pending implementation
2388
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2 } }),
2389
+ (0, modernExtend_1.identify)(),
2390
+ (0, modernExtend_1.commandsOnOff)(),
2391
+ (0, modernExtend_1.commandsLevelCtrl)(),
2392
+ (0, modernExtend_1.commandsWindowCovering)(),
2393
+ // ...YokisDeviceExtend,
2394
+ // ...YokisInputExtend,
2395
+ // ...YokisChannelExtend,
2396
+ ...YokisPilotWireExtend,
2397
+ ],
2398
+ },
2399
+ {
2400
+ // TLM4-UP
2401
+ zigbeeModel: ['TLM4-UP', 'TLM4_503-UP'],
2402
+ model: 'TLM4-UP',
2403
+ vendor: 'YOKIS',
2404
+ description: 'Wall-mounted 4-button transmitter',
2405
+ extend: [
2406
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2407
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2408
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2409
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2410
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2411
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2412
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2413
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisTemperatureMeasurement', YokisClustersDefinition['manuSpecificYokisTemperatureMeasurement']), // Pending implementation
2414
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2, '3': 3, '4': 4 } }),
2415
+ (0, modernExtend_1.identify)(),
2416
+ (0, modernExtend_1.commandsOnOff)(),
2417
+ (0, modernExtend_1.commandsLevelCtrl)(),
2418
+ (0, modernExtend_1.commandsWindowCovering)(),
2419
+ // ...YokisDeviceExtend,
2420
+ // ...YokisInputExtend,
2421
+ // ...YokisChannelExtend,
2422
+ ...YokisPilotWireExtend,
2423
+ ],
2424
+ },
2425
+ {
2426
+ // GALET4-UP
2427
+ zigbeeModel: ['GALET4-UP'],
2428
+ model: 'GALET4-UP',
2429
+ vendor: 'YOKIS',
2430
+ description: '4-button remote control',
2431
+ extend: [
2432
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDevice', YokisClustersDefinition['manuSpecificYokisDevice']),
2433
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisInput', YokisClustersDefinition['manuSpecificYokisInput']),
2434
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisLightControl', YokisClustersDefinition['manuSpecificYokisLightControl']),
2435
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisDimmer', YokisClustersDefinition['manuSpecificYokisDimmer']),
2436
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisWindowCovering', YokisClustersDefinition['manuSpecificYokisWindowCovering']), // Pending implementation
2437
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisChannel', YokisClustersDefinition['manuSpecificYokisChannel']),
2438
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisPilotWire', YokisClustersDefinition['manuSpecificYokisPilotWire']), // Pending implementation
2439
+ (0, modernExtend_1.deviceAddCustomCluster)('manuSpecificYokisTemperatureMeasurement', YokisClustersDefinition['manuSpecificYokisTemperatureMeasurement']), // Pending implementation
2440
+ (0, modernExtend_1.deviceEndpoints)({ endpoints: { '1': 1, '2': 2, '3': 3, '4': 4 } }),
2441
+ (0, modernExtend_1.identify)(),
2442
+ (0, modernExtend_1.commandsOnOff)(),
2443
+ (0, modernExtend_1.commandsLevelCtrl)(),
2444
+ (0, modernExtend_1.commandsWindowCovering)(),
2445
+ // ...YokisDeviceExtend,
2446
+ // ...YokisInputExtend,
2447
+ // ...YokisChannelExtend,
2448
+ ...YokisPilotWireExtend,
2449
+ ],
2450
+ },
2451
+ ];
2452
+ exports.default = definitions;
2453
+ module.exports = definitions;
2454
+ //# sourceMappingURL=yokis.js.map