Skip to content

Commit 541e2b7

Browse files
committed
Update / Modification from the production live system: 2026-03-04 11:35
1 parent 032f97d commit 541e2b7

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

iobroker/10_System/Anwesenheit/anwesenheitserkennung.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Anwesenheitsskript für ioBroker
44
================================================================================
55
* Author: Sanweb
6-
* Version: 3.0.0 (Masterpiece)
6+
* Version: 3.0.1 (Masterpiece - Syntax Fix)
77
* Erstellt am: 04.03.2026
88
*
99
* Beschreibung:
@@ -49,7 +49,8 @@ Anwesenheitsskript für ioBroker
4949
/**
5050
* @typedef {Object} DeviceConfig
5151
* @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)
5354
*/
5455

5556
/** @type {DeviceConfig[]} */
@@ -576,10 +577,12 @@ Anwesenheitsskript für ioBroker
576577
const pathToPersonMap = {};
577578

578579
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+
}
583586
});
584587

585588
deviceSubscription = on({ id: allPaths, change: "ne" }, function (obj) {
@@ -660,7 +663,7 @@ Anwesenheitsskript für ioBroker
660663
});
661664

662665
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)...");
664667

665668
// Merke die Anzahl der statisch im Code hinterlegten Geräte
666669
staticDeviceCount = devices.length;

0 commit comments

Comments
 (0)