hoffmation-base 3.0.0-alpha.77 → 3.0.0-alpha.79

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.
@@ -7,7 +7,7 @@ export declare class DeviceCluster {
7
7
  constructor(deviceMap?: Map<DeviceClusterType, DeviceList>);
8
8
  getIoBrokerDevicesByType(type: DeviceClusterType): IoBrokerBaseDevice[];
9
9
  getDevicesByType(type: DeviceClusterType): Array<iBaseDevice>;
10
- addByDeviceType(device: iBaseDevice): void;
10
+ addByDeviceType(device?: iBaseDevice): void;
11
11
  addToList(type: DeviceClusterType, device: iBaseDevice): void;
12
12
  toJSON(): Partial<DeviceCluster & {
13
13
  /**
@@ -20,6 +20,9 @@ class DeviceCluster {
20
20
  return (_b = (_a = this.deviceMap.get(type)) === null || _a === void 0 ? void 0 : _a.getDevices()) !== null && _b !== void 0 ? _b : [];
21
21
  }
22
22
  addByDeviceType(device) {
23
+ if (!device) {
24
+ return;
25
+ }
23
26
  const type = device.deviceType;
24
27
  const clusterTypes = [device_cluster_type_1.DeviceClusterType.all];
25
28
  switch (type) {
@@ -15,7 +15,7 @@ class VeluxDevice extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
15
15
  }
16
16
  /** @inheritDoc */
17
17
  update(idSplit, state, initial = false, pOverride = false) {
18
- this.log(models_1.LogLevel.DeepTrace, `Smartgarden: ${initial ? 'Initiales ' : ''}Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
18
+ this.log(models_1.LogLevel.DeepTrace, `Velux: ${initial ? 'Initiales ' : ''}Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
19
19
  if (!pOverride) {
20
20
  this.log(models_1.LogLevel.Warn, `Keine Update Überschreibung:\n\tID: ${idSplit.join('.')}\n\tData: ${JSON.stringify(state)}`);
21
21
  }
@@ -2,6 +2,6 @@ import { deviceConfig } from '../../../models';
2
2
  import { VeluxDeviceRegistrationInfo } from './veluxDeviceRegistrationInfo';
3
3
  export declare class VeluxService {
4
4
  private static readonly _registeredDevices;
5
- static preRegisterDevice(id: string, registrationInfo: VeluxDeviceRegistrationInfo): void;
5
+ static preRegisterDevice(devName: string, registrationInfo: VeluxDeviceRegistrationInfo): void;
6
6
  static processVeluxDevice(cDevConf: deviceConfig): void;
7
7
  }
@@ -8,8 +8,8 @@ const deviceType_1 = require("../deviceType");
8
8
  const devices_1 = require("../devices");
9
9
  const veluxShutter_1 = require("./veluxShutter");
10
10
  class VeluxService {
11
- static preRegisterDevice(id, registrationInfo) {
12
- this._registeredDevices.set(id, registrationInfo);
11
+ static preRegisterDevice(devName, registrationInfo) {
12
+ this._registeredDevices.set(devName, registrationInfo);
13
13
  }
14
14
  static processVeluxDevice(cDevConf) {
15
15
  var _a;
@@ -19,7 +19,7 @@ class VeluxService {
19
19
  }
20
20
  const registrationInfo = this._registeredDevices.get(devName);
21
21
  if (!registrationInfo) {
22
- services_1.ServerLogService.writeLog(models_1.LogLevel.Error, `SmartGarden Device ${devName} not registered`);
22
+ services_1.ServerLogService.writeLog(models_1.LogLevel.Error, `Velux Device ${devName} not registered`);
23
23
  return;
24
24
  }
25
25
  const ioBrokerDeviceInfo = new IoBrokerDeviceInfo_1.IoBrokerDeviceInfo(cDevConf, registrationInfo.deviceId, deviceType_1.DeviceType[registrationInfo.deviceType], registrationInfo.room, registrationInfo.roomIndex);