hoffmation-base 2.18.2 → 2.18.3
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.
|
@@ -19,7 +19,7 @@ class DeviceUpdater {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
updateState(id, state, initial = false) {
|
|
22
|
-
var _a;
|
|
22
|
+
var _a, _b;
|
|
23
23
|
if (state === null) {
|
|
24
24
|
// Ignore null states
|
|
25
25
|
return;
|
|
@@ -30,7 +30,7 @@ class DeviceUpdater {
|
|
|
30
30
|
if (idSplit[0] == 'mqtt') {
|
|
31
31
|
mqtt_1.MqttCoordinator.update(idSplit, state);
|
|
32
32
|
}
|
|
33
|
-
const device = devices_1.Devices.alLDevices[`${idSplit[0]}-${idSplit[2]}`];
|
|
33
|
+
const device = (_a = devices_1.Devices.alLDevices[`${idSplit[0]}-${idSplit[2]}`]) !== null && _a !== void 0 ? _a : devices_1.Devices.alLDevices[`${idSplit[0]}-${idSplit[2].substring(2)}`];
|
|
34
34
|
if (typeof device === 'undefined' || device.update === undefined) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ class DeviceUpdater {
|
|
|
38
38
|
device.update(idSplit, state, initial, false);
|
|
39
39
|
}
|
|
40
40
|
catch (e) {
|
|
41
|
-
services_1.ServerLogService.writeLog(models_1.LogLevel.Alert, `deviceUpdater.updateState('${id}', '${state}'): Error occured updating Device: ${e} \n ${(
|
|
41
|
+
services_1.ServerLogService.writeLog(models_1.LogLevel.Alert, `deviceUpdater.updateState('${id}', '${state}'): Error occured updating Device: ${e} \n ${(_b = e === null || e === void 0 ? void 0 : e.stack) !== null && _b !== void 0 ? _b : ''}`);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|