iobroker.acinfinity 0.7.0 → 0.7.2

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.
@@ -3,18 +3,19 @@
3
3
  * Verantwortlich für das Erstellen von Port-Strukturen in ioBroker
4
4
  */
5
5
 
6
- "use strict";
6
+ 'use strict';
7
7
 
8
- const {
9
- MODE_OPTIONS,
10
- SETTINGS_MODE_OPTIONS,
8
+ const {
9
+ MODE_OPTIONS,
10
+ SETTINGS_MODE_OPTIONS,
11
11
  DYNAMIC_RESPONSE_OPTIONS,
12
- DEVICE_LOAD_TYPE_OPTIONS
13
- } = require("../constants");
12
+ DEVICE_LOAD_TYPE_OPTIONS,
13
+ } = require('../constants');
14
14
 
15
15
  class PortCreator {
16
16
  /**
17
17
  * Erstellt einen neuen PortCreator
18
+ *
18
19
  * @param {object} stateManager - Referenz zum StateManager
19
20
  */
20
21
  constructor(stateManager) {
@@ -25,6 +26,7 @@ class PortCreator {
25
26
 
26
27
  /**
27
28
  * Erstellt einen Port-Kanal für ein Gerät
29
+ *
28
30
  * @param {string} deviceId - Geräte-ID
29
31
  * @param {number} portId - Port-ID
30
32
  * @param {string} portName - Port-Name
@@ -33,9 +35,9 @@ class PortCreator {
33
35
  async createPortChannel(deviceId, portId, portName) {
34
36
  // Erstelle Port-Channel
35
37
  await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}`, portName || `Port ${portId}`, {
36
- portId: portId
38
+ portId: portId,
37
39
  });
38
-
40
+
39
41
  // Erstelle Port-Unterkanäle
40
42
  await this.createPortInfoChannel(deviceId, portId);
41
43
  await this.createPortModeChannel(deviceId, portId);
@@ -44,94 +46,97 @@ class PortCreator {
44
46
 
45
47
  /**
46
48
  * Erstellt einen Port-Kanal für ein Gerät
49
+ *
47
50
  * @param {string} deviceId - Geräte-ID
48
51
  * @param {number} portId - Port-ID
49
52
  * @returns {Promise<void>}
50
53
  */
51
54
  async createPortInfoChannel(deviceId, portId) {
52
55
  // Erstelle Port-Info-Kanal
53
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.info`, "Information");
54
-
56
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.info`, 'Information');
57
+
55
58
  // Erstelle Port-Info-States
56
59
  await this.stateCreator.createMultipleStates([
57
60
  {
58
61
  id: `devices.${deviceId}.ports.${portId}.info.name`,
59
- name: "Name",
60
- type: "string",
61
- role: "text"
62
+ name: 'Name',
63
+ type: 'string',
64
+ role: 'text',
62
65
  },
63
66
  {
64
67
  id: `devices.${deviceId}.ports.${portId}.info.online`,
65
- name: "Online",
66
- type: "boolean",
67
- role: "indicator.connected"
68
+ name: 'Online',
69
+ type: 'boolean',
70
+ role: 'indicator.connected',
68
71
  },
69
72
  {
70
73
  id: `devices.${deviceId}.ports.${portId}.info.power`,
71
- name: "Aktuelle Leistung",
72
- type: "number",
73
- role: "value.power"
74
+ name: 'Aktuelle Leistung (0-10)',
75
+ type: 'number',
76
+ role: 'value.power',
77
+ common: { min: 0, max: 10 },
74
78
  },
75
79
  {
76
80
  id: `devices.${deviceId}.ports.${portId}.info.state`,
77
- name: "Status",
78
- type: "boolean",
79
- role: "switch.power"
81
+ name: 'Status',
82
+ type: 'boolean',
83
+ role: 'switch.power',
80
84
  },
81
85
  {
82
86
  id: `devices.${deviceId}.ports.${portId}.info.remainingTime`,
83
- name: "Verbleibende Zeit",
84
- type: "number",
85
- role: "value.interval",
86
- unit: "s"
87
+ name: 'Verbleibende Zeit',
88
+ type: 'number',
89
+ role: 'value.interval',
90
+ unit: 's',
87
91
  },
88
92
  {
89
93
  id: `devices.${deviceId}.ports.${portId}.info.nextStateChange`,
90
- name: "Nächste Statusänderung",
91
- type: "string",
92
- role: "date.start"
93
- }
94
+ name: 'Nächste Statusänderung',
95
+ type: 'string',
96
+ role: 'date.start',
97
+ },
94
98
  ]);
95
99
  }
96
100
 
97
101
  /**
98
102
  * Erstellt einen Modus-Kanal für einen Port
103
+ *
99
104
  * @param {string} deviceId - Geräte-ID
100
105
  * @param {number} portId - Port-ID
101
106
  * @returns {Promise<void>}
102
107
  */
103
108
  async createPortModeChannel(deviceId, portId) {
104
109
  // Erstelle Port-Mode-Kanal
105
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode`, "Modus-Einstellungen");
106
-
110
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode`, 'Modus-Einstellungen');
111
+
107
112
  // Erstelle Port-Mode-States
108
113
  await this.stateCreator.createMultipleStates([
109
114
  {
110
115
  id: `devices.${deviceId}.ports.${portId}.mode.active`,
111
- name: "Aktiver Modus",
112
- type: "string",
113
- role: "text",
116
+ name: 'Aktiver Modus',
117
+ type: 'string',
118
+ role: 'text',
114
119
  write: true,
115
- states: MODE_OPTIONS
120
+ states: MODE_OPTIONS,
116
121
  },
117
122
  {
118
123
  id: `devices.${deviceId}.ports.${portId}.mode.onSpeed`,
119
- name: "Ein-Geschwindigkeit",
120
- type: "number",
121
- role: "level",
124
+ name: 'Ein-Geschwindigkeit (0-10)',
125
+ type: 'number',
126
+ role: 'level',
122
127
  write: true,
123
- common: { min: 0, max: 10 }
128
+ common: { min: 0, max: 10 },
124
129
  },
125
130
  {
126
131
  id: `devices.${deviceId}.ports.${portId}.mode.offSpeed`,
127
- name: "Aus-Geschwindigkeit",
128
- type: "number",
129
- role: "level",
132
+ name: 'Aus-Geschwindigkeit (0-10)',
133
+ type: 'number',
134
+ role: 'level',
130
135
  write: true,
131
- common: { min: 0, max: 10 }
132
- }
136
+ common: { min: 0, max: 10 },
137
+ },
133
138
  ]);
134
-
139
+
135
140
  // Erstelle Unterkanäle für verschiedene Modi
136
141
  await this.createTimerModeChannel(deviceId, portId);
137
142
  await this.createCycleModeChannel(deviceId, portId);
@@ -142,395 +147,404 @@ class PortCreator {
142
147
 
143
148
  /**
144
149
  * Erstellt einen Timer-Modus-Unterkanal
150
+ *
145
151
  * @param {string} deviceId - Geräte-ID
146
152
  * @param {number} portId - Port-ID
147
153
  * @returns {Promise<void>}
148
154
  */
149
155
  async createTimerModeChannel(deviceId, portId) {
150
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.timer`, "Timer-Modus");
151
-
156
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.timer`, 'Timer-Modus');
157
+
152
158
  await this.stateCreator.createMultipleStates([
153
159
  {
154
160
  id: `devices.${deviceId}.ports.${portId}.mode.timer.toOnMinutes`,
155
- name: "Minuten bis Ein",
156
- type: "number",
157
- role: "value.interval",
158
- unit: "min",
161
+ name: 'Minuten bis Ein (0-1440)',
162
+ type: 'number',
163
+ role: 'value.interval',
164
+ unit: 'min',
159
165
  write: true,
160
- common: { min: 0, max: 1440 }
166
+ common: { min: 0, max: 1440 },
161
167
  },
162
168
  {
163
169
  id: `devices.${deviceId}.ports.${portId}.mode.timer.toOffMinutes`,
164
- name: "Minuten bis Aus",
165
- type: "number",
166
- role: "value.interval",
167
- unit: "min",
170
+ name: 'Minuten bis Aus (0-1440)',
171
+ type: 'number',
172
+ role: 'value.interval',
173
+ unit: 'min',
168
174
  write: true,
169
- common: { min: 0, max: 1440 }
170
- }
175
+ common: { min: 0, max: 1440 },
176
+ },
171
177
  ]);
172
178
  }
173
179
 
174
180
  /**
175
181
  * Erstellt einen Zyklus-Modus-Unterkanal
182
+ *
176
183
  * @param {string} deviceId - Geräte-ID
177
184
  * @param {number} portId - Port-ID
178
185
  * @returns {Promise<void>}
179
186
  */
180
187
  async createCycleModeChannel(deviceId, portId) {
181
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.cycle`, "Zyklus-Modus");
182
-
188
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.cycle`, 'Zyklus-Modus');
189
+
183
190
  await this.stateCreator.createMultipleStates([
184
191
  {
185
192
  id: `devices.${deviceId}.ports.${portId}.mode.cycle.onMinutes`,
186
- name: "Minuten Ein",
187
- type: "number",
188
- role: "value.interval",
189
- unit: "min",
193
+ name: 'Minuten Ein (0-1440)',
194
+ type: 'number',
195
+ role: 'value.interval',
196
+ unit: 'min',
190
197
  write: true,
191
- common: { min: 0, max: 1440 }
198
+ common: { min: 0, max: 1440 },
192
199
  },
193
200
  {
194
201
  id: `devices.${deviceId}.ports.${portId}.mode.cycle.offMinutes`,
195
- name: "Minuten Aus",
196
- type: "number",
197
- role: "value.interval",
198
- unit: "min",
202
+ name: 'Minuten Aus (0-1440)',
203
+ type: 'number',
204
+ role: 'value.interval',
205
+ unit: 'min',
199
206
  write: true,
200
- common: { min: 0, max: 1440 }
201
- }
207
+ common: { min: 0, max: 1440 },
208
+ },
202
209
  ]);
203
210
  }
204
211
 
205
212
  /**
206
213
  * Erstellt einen Zeitplan-Modus-Unterkanal
214
+ *
207
215
  * @param {string} deviceId - Geräte-ID
208
216
  * @param {number} portId - Port-ID
209
217
  * @returns {Promise<void>}
210
218
  */
211
219
  async createScheduleModeChannel(deviceId, portId) {
212
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.schedule`, "Zeitplan-Modus");
213
-
220
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.schedule`, 'Zeitplan-Modus');
221
+
214
222
  await this.stateCreator.createMultipleStates([
215
223
  {
216
224
  id: `devices.${deviceId}.ports.${portId}.mode.schedule.startEnabled`,
217
- name: "Startzeit aktiviert",
218
- type: "boolean",
219
- role: "switch.enable",
220
- write: true
225
+ name: 'Startzeit aktiviert',
226
+ type: 'boolean',
227
+ role: 'switch.enable',
228
+ write: true,
221
229
  },
222
230
  {
223
231
  id: `devices.${deviceId}.ports.${portId}.mode.schedule.startTime`,
224
- name: "Startzeit",
225
- type: "string",
226
- role: "value.time",
227
- write: true
232
+ name: 'Startzeit',
233
+ type: 'string',
234
+ role: 'value.time',
235
+ write: true,
228
236
  },
229
237
  {
230
238
  id: `devices.${deviceId}.ports.${portId}.mode.schedule.endEnabled`,
231
- name: "Endzeit aktiviert",
232
- type: "boolean",
233
- role: "switch.enable",
234
- write: true
239
+ name: 'Endzeit aktiviert',
240
+ type: 'boolean',
241
+ role: 'switch.enable',
242
+ write: true,
235
243
  },
236
244
  {
237
245
  id: `devices.${deviceId}.ports.${portId}.mode.schedule.endTime`,
238
- name: "Endzeit",
239
- type: "string",
240
- role: "value.time",
241
- write: true
242
- }
246
+ name: 'Endzeit',
247
+ type: 'string',
248
+ role: 'value.time',
249
+ write: true,
250
+ },
243
251
  ]);
244
252
  }
245
253
 
246
254
  /**
247
255
  * Erstellt einen Auto-Modus-Unterkanal
256
+ *
248
257
  * @param {string} deviceId - Geräte-ID
249
258
  * @param {number} portId - Port-ID
250
259
  * @returns {Promise<void>}
251
260
  */
252
261
  async createAutoModeChannel(deviceId, portId) {
253
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.auto`, "Auto-Modus");
254
-
262
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.auto`, 'Auto-Modus');
263
+
255
264
  await this.stateCreator.createMultipleStates([
256
265
  {
257
266
  id: `devices.${deviceId}.ports.${portId}.mode.auto.settingsMode`,
258
- name: "Einstellungsmodus",
259
- type: "string",
260
- role: "text",
267
+ name: 'Einstellungsmodus',
268
+ type: 'string',
269
+ role: 'text',
261
270
  write: true,
262
- states: SETTINGS_MODE_OPTIONS
271
+ states: SETTINGS_MODE_OPTIONS,
263
272
  },
264
273
  {
265
274
  id: `devices.${deviceId}.ports.${portId}.mode.auto.tempHighEnabled`,
266
- name: "Temperatur-Hochgrenze aktiviert",
267
- type: "boolean",
268
- role: "switch.enable",
269
- write: true
275
+ name: 'Temperatur-Hochgrenze aktiviert',
276
+ type: 'boolean',
277
+ role: 'switch.enable',
278
+ write: true,
270
279
  },
271
280
  {
272
281
  id: `devices.${deviceId}.ports.${portId}.mode.auto.tempHighTrigger`,
273
- name: "Temperatur-Hochgrenze",
274
- type: "number",
275
- role: "value.temperature",
276
- unit: "°C",
282
+ name: 'Temperatur-Hochgrenze (0-90)',
283
+ type: 'number',
284
+ role: 'value.temperature',
285
+ unit: '°C',
277
286
  write: true,
278
- common: { min: 0, max: 90 }
287
+ common: { min: 0, max: 90 },
279
288
  },
280
289
  {
281
290
  id: `devices.${deviceId}.ports.${portId}.mode.auto.tempLowEnabled`,
282
- name: "Temperatur-Tiefgrenze aktiviert",
283
- type: "boolean",
284
- role: "switch.enable",
285
- write: true
291
+ name: 'Temperatur-Tiefgrenze aktiviert',
292
+ type: 'boolean',
293
+ role: 'switch.enable',
294
+ write: true,
286
295
  },
287
296
  {
288
297
  id: `devices.${deviceId}.ports.${portId}.mode.auto.tempLowTrigger`,
289
- name: "Temperatur-Tiefgrenze",
290
- type: "number",
291
- role: "value.temperature",
292
- unit: "°C",
298
+ name: 'Temperatur-Tiefgrenze (0-90)',
299
+ type: 'number',
300
+ role: 'value.temperature',
301
+ unit: '°C',
293
302
  write: true,
294
- common: { min: 0, max: 90 }
303
+ common: { min: 0, max: 90 },
295
304
  },
296
305
  {
297
306
  id: `devices.${deviceId}.ports.${portId}.mode.auto.humidityHighEnabled`,
298
- name: "Feuchtigkeit-Hochgrenze aktiviert",
299
- type: "boolean",
300
- role: "switch.enable",
301
- write: true
307
+ name: 'Feuchtigkeit-Hochgrenze aktiviert',
308
+ type: 'boolean',
309
+ role: 'switch.enable',
310
+ write: true,
302
311
  },
303
312
  {
304
313
  id: `devices.${deviceId}.ports.${portId}.mode.auto.humidityHighTrigger`,
305
- name: "Feuchtigkeit-Hochgrenze",
306
- type: "number",
307
- role: "value.humidity",
308
- unit: "%",
314
+ name: 'Feuchtigkeit-Hochgrenze (0-100)',
315
+ type: 'number',
316
+ role: 'value.humidity',
317
+ unit: '%',
309
318
  write: true,
310
- common: { min: 0, max: 100 }
319
+ common: { min: 0, max: 100 },
311
320
  },
312
321
  {
313
322
  id: `devices.${deviceId}.ports.${portId}.mode.auto.humidityLowEnabled`,
314
- name: "Feuchtigkeit-Tiefgrenze aktiviert",
315
- type: "boolean",
316
- role: "switch.enable",
317
- write: true
323
+ name: 'Feuchtigkeit-Tiefgrenze aktiviert',
324
+ type: 'boolean',
325
+ role: 'switch.enable',
326
+ write: true,
318
327
  },
319
328
  {
320
329
  id: `devices.${deviceId}.ports.${portId}.mode.auto.humidityLowTrigger`,
321
- name: "Feuchtigkeit-Tiefgrenze",
322
- type: "number",
323
- role: "value.humidity",
324
- unit: "%",
330
+ name: 'Feuchtigkeit-Tiefgrenze (0-100)',
331
+ type: 'number',
332
+ role: 'value.humidity',
333
+ unit: '%',
325
334
  write: true,
326
- common: { min: 0, max: 100 }
335
+ common: { min: 0, max: 100 },
327
336
  },
328
337
  {
329
338
  id: `devices.${deviceId}.ports.${portId}.mode.auto.targetTempEnabled`,
330
- name: "Zieltemperatur aktiviert",
331
- type: "boolean",
332
- role: "switch.enable",
333
- write: true
339
+ name: 'Zieltemperatur aktiviert',
340
+ type: 'boolean',
341
+ role: 'switch.enable',
342
+ write: true,
334
343
  },
335
344
  {
336
345
  id: `devices.${deviceId}.ports.${portId}.mode.auto.targetTemp`,
337
- name: "Zieltemperatur",
338
- type: "number",
339
- role: "value.temperature",
340
- unit: "°C",
346
+ name: 'Zieltemperatur (0-90)',
347
+ type: 'number',
348
+ role: 'value.temperature',
349
+ unit: '°C',
341
350
  write: true,
342
- common: { min: 0, max: 90 }
351
+ common: { min: 0, max: 90 },
343
352
  },
344
353
  {
345
354
  id: `devices.${deviceId}.ports.${portId}.mode.auto.targetHumidityEnabled`,
346
- name: "Zielfeuchtigkeit aktiviert",
347
- type: "boolean",
348
- role: "switch.enable",
349
- write: true
355
+ name: 'Zielfeuchtigkeit aktiviert',
356
+ type: 'boolean',
357
+ role: 'switch.enable',
358
+ write: true,
350
359
  },
351
360
  {
352
361
  id: `devices.${deviceId}.ports.${portId}.mode.auto.targetHumidity`,
353
- name: "Zielfeuchtigkeit",
354
- type: "number",
355
- role: "value.humidity",
356
- unit: "%",
362
+ name: 'Zielfeuchtigkeit (0-100)',
363
+ type: 'number',
364
+ role: 'value.humidity',
365
+ unit: '%',
357
366
  write: true,
358
- common: { min: 0, max: 100 }
359
- }
367
+ common: { min: 0, max: 100 },
368
+ },
360
369
  ]);
361
370
  }
362
371
 
363
372
  /**
364
373
  * Erstellt einen VPD-Modus-Unterkanal
374
+ *
365
375
  * @param {string} deviceId - Geräte-ID
366
376
  * @param {number} portId - Port-ID
367
377
  * @returns {Promise<void>}
368
378
  */
369
379
  async createVpdModeChannel(deviceId, portId) {
370
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.vpd`, "VPD-Modus");
371
-
380
+ await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.mode.vpd`, 'VPD-Modus');
381
+
372
382
  await this.stateCreator.createMultipleStates([
373
383
  {
374
384
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.settingsMode`,
375
- name: "Einstellungsmodus",
376
- type: "string",
377
- role: "text",
385
+ name: 'Einstellungsmodus',
386
+ type: 'string',
387
+ role: 'text',
378
388
  write: true,
379
- states: SETTINGS_MODE_OPTIONS
389
+ states: SETTINGS_MODE_OPTIONS,
380
390
  },
381
391
  {
382
392
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.highEnabled`,
383
- name: "VPD-Hochgrenze aktiviert",
384
- type: "boolean",
385
- role: "switch.enable",
386
- write: true
393
+ name: 'VPD-Hochgrenze aktiviert',
394
+ type: 'boolean',
395
+ role: 'switch.enable',
396
+ write: true,
387
397
  },
388
398
  {
389
399
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.highTrigger`,
390
- name: "VPD-Hochgrenze",
391
- type: "number",
392
- role: "value",
393
- unit: "kPa",
400
+ name: 'VPD-Hochgrenze (0-9.9)',
401
+ type: 'number',
402
+ role: 'value',
403
+ unit: 'kPa',
394
404
  write: true,
395
- common: { min: 0, max: 9.9 }
405
+ common: { min: 0, max: 9.9 },
396
406
  },
397
407
  {
398
408
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.lowEnabled`,
399
- name: "VPD-Tiefgrenze aktiviert",
400
- type: "boolean",
401
- role: "switch.enable",
402
- write: true
409
+ name: 'VPD-Tiefgrenze aktiviert',
410
+ type: 'boolean',
411
+ role: 'switch.enable',
412
+ write: true,
403
413
  },
404
414
  {
405
415
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.lowTrigger`,
406
- name: "VPD-Tiefgrenze",
407
- type: "number",
408
- role: "value",
409
- unit: "kPa",
416
+ name: 'VPD-Tiefgrenze (0-9.9)',
417
+ type: 'number',
418
+ role: 'value',
419
+ unit: 'kPa',
410
420
  write: true,
411
- common: { min: 0, max: 9.9 }
421
+ common: { min: 0, max: 9.9 },
412
422
  },
413
423
  {
414
424
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.targetEnabled`,
415
- name: "Ziel-VPD aktiviert",
416
- type: "boolean",
417
- role: "switch.enable",
418
- write: true
425
+ name: 'Ziel-VPD aktiviert',
426
+ type: 'boolean',
427
+ role: 'switch.enable',
428
+ write: true,
419
429
  },
420
430
  {
421
431
  id: `devices.${deviceId}.ports.${portId}.mode.vpd.target`,
422
- name: "Ziel-VPD",
423
- type: "number",
424
- role: "value",
425
- unit: "kPa",
432
+ name: 'Ziel-VPD (0-9.9)',
433
+ type: 'number',
434
+ role: 'value',
435
+ unit: 'kPa',
426
436
  write: true,
427
- common: { min: 0, max: 9.9 }
428
- }
437
+ common: { min: 0, max: 9.9 },
438
+ },
429
439
  ]);
430
440
  }
431
441
 
432
442
  /**
433
443
  * Erstellt einen Einstellungskanal für einen Port
444
+ *
434
445
  * @param {string} deviceId - Geräte-ID
435
446
  * @param {number} portId - Port-ID
436
447
  * @returns {Promise<void>}
437
448
  */
438
449
  async createPortSettingsChannel(deviceId, portId) {
439
- await this.stateCreator.createChannel(`devices.${deviceId}.ports.${portId}.settings`, "Erweiterte Einstellungen");
440
-
450
+ await this.stateCreator.createChannel(
451
+ `devices.${deviceId}.ports.${portId}.settings`,
452
+ 'Erweiterte Einstellungen',
453
+ );
454
+
441
455
  await this.stateCreator.createMultipleStates([
442
456
  {
443
457
  id: `devices.${deviceId}.ports.${portId}.settings.deviceType`,
444
- name: "Gerätetyp",
445
- type: "number",
446
- role: "value",
458
+ name: 'Gerätetyp',
459
+ type: 'number',
460
+ role: 'value',
447
461
  write: true,
448
462
  states: Object.keys(DEVICE_LOAD_TYPE_OPTIONS).map(key => parseInt(key, 10)),
449
463
  common: {
450
464
  // Mapping der numerischen IDs zu Gerätetypnamen
451
- states: DEVICE_LOAD_TYPE_OPTIONS
452
- }
465
+ states: DEVICE_LOAD_TYPE_OPTIONS,
466
+ },
453
467
  },
454
468
  {
455
469
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicResponse`,
456
- name: "Dynamische Reaktion",
457
- type: "string",
458
- role: "text",
470
+ name: 'Dynamische Reaktion',
471
+ type: 'string',
472
+ role: 'text',
459
473
  write: true,
460
- states: DYNAMIC_RESPONSE_OPTIONS
474
+ states: DYNAMIC_RESPONSE_OPTIONS,
461
475
  },
462
476
  {
463
477
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicTransitionTemp`,
464
- name: "Übergangstemperatur",
465
- type: "number",
466
- role: "value.temperature",
467
- unit: "°",
478
+ name: 'Übergangstemperatur (0-20)',
479
+ type: 'number',
480
+ role: 'value.temperature',
481
+ unit: '°',
468
482
  write: true,
469
- common: { min: 0, max: 20 }
483
+ common: { min: 0, max: 20 },
470
484
  },
471
485
  {
472
486
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicTransitionHumidity`,
473
- name: "Übergangsfeuchtigkeit",
474
- type: "number",
475
- role: "value.humidity",
476
- unit: "%",
487
+ name: 'Übergangsfeuchtigkeit (0-10)',
488
+ type: 'number',
489
+ role: 'value.humidity',
490
+ unit: '%',
477
491
  write: true,
478
- common: { min: 0, max: 10 }
492
+ common: { min: 0, max: 10 },
479
493
  },
480
494
  {
481
495
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicTransitionVPD`,
482
- name: "Übergangs-VPD",
483
- type: "number",
484
- role: "value",
485
- unit: "kPa",
496
+ name: 'Übergangs-VPD (0-1)',
497
+ type: 'number',
498
+ role: 'value',
499
+ unit: 'kPa',
486
500
  write: true,
487
- common: { min: 0, max: 1 }
501
+ common: { min: 0, max: 1 },
488
502
  },
489
503
  {
490
504
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicBufferTemp`,
491
- name: "Puffertemperatur",
492
- type: "number",
493
- role: "value.temperature",
494
- unit: "°",
505
+ name: 'Puffertemperatur (0-20)',
506
+ type: 'number',
507
+ role: 'value.temperature',
508
+ unit: '°',
495
509
  write: true,
496
- common: { min: 0, max: 20 }
510
+ common: { min: 0, max: 20 },
497
511
  },
498
512
  {
499
513
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicBufferHumidity`,
500
- name: "Pufferfeuchtigkeit",
501
- type: "number",
502
- role: "value.humidity",
503
- unit: "%",
514
+ name: 'Pufferfeuchtigkeit (0-10)',
515
+ type: 'number',
516
+ role: 'value.humidity',
517
+ unit: '%',
504
518
  write: true,
505
- common: { min: 0, max: 10 }
519
+ common: { min: 0, max: 10 },
506
520
  },
507
521
  {
508
522
  id: `devices.${deviceId}.ports.${portId}.settings.dynamicBufferVPD`,
509
- name: "Puffer-VPD",
510
- type: "number",
511
- role: "value",
512
- unit: "kPa",
523
+ name: 'Puffer-VPD (0-1)',
524
+ type: 'number',
525
+ role: 'value',
526
+ unit: 'kPa',
513
527
  write: true,
514
- common: { min: 0, max: 1 }
528
+ common: { min: 0, max: 1 },
515
529
  },
516
530
  {
517
531
  id: `devices.${deviceId}.ports.${portId}.settings.sunriseTimerEnabled`,
518
- name: "Sonnenaufgang/Sonnenuntergang-Timer aktiviert",
519
- type: "boolean",
520
- role: "switch.enable",
521
- write: true
532
+ name: 'Sonnenaufgang/Sonnenuntergang-Timer aktiviert',
533
+ type: 'boolean',
534
+ role: 'switch.enable',
535
+ write: true,
522
536
  },
523
537
  {
524
538
  id: `devices.${deviceId}.ports.${portId}.settings.sunriseTimerMinutes`,
525
- name: "Sonnenaufgang/Sonnenuntergang-Timer Minuten",
526
- type: "number",
527
- role: "value.interval",
528
- unit: "min",
539
+ name: 'Sonnenaufgang/Sonnenuntergang-Timer Minuten (0-360)',
540
+ type: 'number',
541
+ role: 'value.interval',
542
+ unit: 'min',
529
543
  write: true,
530
- common: { min: 0, max: 360 }
531
- }
544
+ common: { min: 0, max: 360 },
545
+ },
532
546
  ]);
533
547
  }
534
548
  }
535
549
 
536
- module.exports = PortCreator;
550
+ module.exports = PortCreator;