hoffmation-base 3.0.0-alpha.25 → 3.0.0-alpha.26
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.
|
@@ -37,7 +37,7 @@ class DeviceUpdater {
|
|
|
37
37
|
classifier = devices_1.Devices.IDENTIFIER_ZIGBEE;
|
|
38
38
|
devId = idSplit[2].substring(2);
|
|
39
39
|
}
|
|
40
|
-
const device = services_1.API.getDevice(`${classifier}-${devId}
|
|
40
|
+
const device = services_1.API.getDevice(`${classifier}-${devId}`, false);
|
|
41
41
|
if (typeof device === 'undefined' || device.update === undefined) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
@@ -19,7 +19,7 @@ export declare class API {
|
|
|
19
19
|
static getDevices(): {
|
|
20
20
|
[id: string]: iBaseDevice;
|
|
21
21
|
};
|
|
22
|
-
static getDevice(id: string): iBaseDevice;
|
|
22
|
+
static getDevice(id: string, warnIfNotFound?: boolean): iBaseDevice;
|
|
23
23
|
static getGroup(id: string): BaseGroup | undefined;
|
|
24
24
|
static getRooms(): Map<string, RoomBase>;
|
|
25
25
|
static getRoom(id: string): RoomBase | undefined;
|
|
@@ -45,9 +45,9 @@ class API {
|
|
|
45
45
|
return devices_1.Devices.alLDevices;
|
|
46
46
|
}
|
|
47
47
|
// TODO: Missing Comment
|
|
48
|
-
static getDevice(id) {
|
|
48
|
+
static getDevice(id, warnIfNotFound = true) {
|
|
49
49
|
const d = devices_1.Devices.alLDevices[id];
|
|
50
|
-
if (d === undefined) {
|
|
50
|
+
if (d === undefined && warnIfNotFound) {
|
|
51
51
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Warn, `Api.getDevice() --> "${id}" not found`);
|
|
52
52
|
}
|
|
53
53
|
return d;
|