|
3 | 3 | Anwesenheitsskript für ioBroker |
4 | 4 | ================================================================================ |
5 | 5 | * Author: Sanweb |
6 | | - * Version: 3.0.0 (Masterpiece) |
| 6 | + * Version: 3.0.1 (Masterpiece - Syntax Fix) |
7 | 7 | * Erstellt am: 04.03.2026 |
8 | 8 | * |
9 | 9 | * Beschreibung: |
@@ -49,7 +49,8 @@ Anwesenheitsskript für ioBroker |
49 | 49 | /** |
50 | 50 | * @typedef {Object} DeviceConfig |
51 | 51 | * @property {string} name - Name der Person |
52 | | - * @property {string[]} devicePaths - Array der zu überwachenden ioBroker-Datenpunkte (ODER-verknüpft) |
| 52 | + * @property {string[]} [devicePaths] - Array der zu überwachenden ioBroker-Datenpunkte (ODER-verknüpft) |
| 53 | + * @property {string} [devicePath] - Veraltet: Einzelner Datenpunkt (für Abwärtskompatibilität) |
53 | 54 | */ |
54 | 55 |
|
55 | 56 | /** @type {DeviceConfig[]} */ |
@@ -576,10 +577,12 @@ Anwesenheitsskript für ioBroker |
576 | 577 | const pathToPersonMap = {}; |
577 | 578 |
|
578 | 579 | devices.forEach(d => { |
579 | | - d.devicePaths.forEach(path => { |
580 | | - allPaths.push(path); |
581 | | - pathToPersonMap[path] = d; |
582 | | - }); |
| 580 | + if (d.devicePaths) { |
| 581 | + d.devicePaths.forEach(path => { |
| 582 | + allPaths.push(path); |
| 583 | + pathToPersonMap[path] = d; |
| 584 | + }); |
| 585 | + } |
583 | 586 | }); |
584 | 587 |
|
585 | 588 | deviceSubscription = on({ id: allPaths, change: "ne" }, function (obj) { |
@@ -660,7 +663,7 @@ Anwesenheitsskript für ioBroker |
660 | 663 | }); |
661 | 664 |
|
662 | 665 | try { |
663 | | - log("[Hm-Rega] Skript wird gestartet (v3.0.0 Masterpiece)..."); |
| 666 | + log("[Hm-Rega] Skript wird gestartet (v3.0.1 Masterpiece - Syntax Fix)..."); |
664 | 667 |
|
665 | 668 | // Merke die Anzahl der statisch im Code hinterlegten Geräte |
666 | 669 | staticDeviceCount = devices.length; |
|
0 commit comments