hoffmation-base 3.2.10 → 3.2.11-alpha.1

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.
@@ -26,6 +26,7 @@ class HmIpRoll extends hmIpDevice_1.HmIPDevice {
26
26
  this._currentLevel = -1;
27
27
  this.jsonOmitKeys.push('_window');
28
28
  this.deviceCapabilities.push(enums_1.DeviceCapability.shutter);
29
+ this.deviceCapabilities.push(enums_1.DeviceCapability.blockAutomatic);
29
30
  this._setLevelSwitchID = `${this.info.fullID}.4.LEVEL`;
30
31
  this.blockAutomationHandler = new services_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this), this.log.bind(this));
31
32
  (_a = this.dbo) === null || _a === void 0 ? void 0 : _a.getLastDesiredPosition(this).then((val) => {
@@ -26,6 +26,7 @@ class VeluxShutter extends veluxDevice_1.VeluxDevice {
26
26
  this._currentLevel = -1;
27
27
  this.jsonOmitKeys.push('_window');
28
28
  this.deviceCapabilities.push(enums_1.DeviceCapability.shutter);
29
+ this.deviceCapabilities.push(enums_1.DeviceCapability.blockAutomatic);
29
30
  this._setLevelSwitchID = `${this.info.fullID}.targetPosition`;
30
31
  this.blockAutomationHandler = new services_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this), this.log.bind(this));
31
32
  (_a = this.dbo) === null || _a === void 0 ? void 0 : _a.getLastDesiredPosition(this).then((val) => {
@@ -17,6 +17,7 @@ export declare class ZigbeeMotionSensor extends ZigbeeDevice implements iMotionS
17
17
  protected _needsMovementResetFallback: boolean;
18
18
  protected _fallBackTimeout: NodeJS.Timeout | undefined;
19
19
  protected _timeSinceLastMotion: number;
20
+ protected readonly _occupancyStateId: string;
20
21
  private _movementDetected;
21
22
  constructor(pInfo: IoBrokerDeviceInfo, type: DeviceType);
22
23
  /** @inheritDoc */
@@ -21,6 +21,7 @@ class ZigbeeMotionSensor extends zigbeeDevice_1.ZigbeeDevice {
21
21
  this._movementDetectedCallback = [];
22
22
  this._needsMovementResetFallback = true;
23
23
  this._timeSinceLastMotion = 0;
24
+ this._occupancyStateId = 'occupancy';
24
25
  this._movementDetected = false;
25
26
  this.deviceCapabilities.push(enums_1.DeviceCapability.motionSensor);
26
27
  this.deviceCapabilities.push(enums_1.DeviceCapability.batteryDriven);
@@ -115,7 +116,7 @@ class ZigbeeMotionSensor extends zigbeeDevice_1.ZigbeeDevice {
115
116
  this.log(enums_1.LogLevel.Warn, 'Das Zigbee Gerät hat unter 20% Batterie.');
116
117
  }
117
118
  break;
118
- case 'occupancy':
119
+ case this._occupancyStateId:
119
120
  this.log(enums_1.LogLevel.Trace, `Motion sensor: Update for motion state of ${this.info.customName}: ${state.val}`);
120
121
  this.updateMovement(state.val);
121
122
  break;
@@ -28,6 +28,7 @@ class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
28
28
  /** @inheritDoc */
29
29
  this.baseAutomaticLevel = 0;
30
30
  this.deviceCapabilities.push(enums_1.DeviceCapability.shutter);
31
+ this.deviceCapabilities.push(enums_1.DeviceCapability.blockAutomatic);
31
32
  this.jsonOmitKeys.push('_window');
32
33
  // Initialize blockAutomationHandler for iTemporaryDisableAutomatic
33
34
  this.blockAutomationHandler = new services_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this), this.log.bind(this));
@@ -1,7 +1,7 @@
1
1
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
2
2
  import { ZigbeeMotionSensor } from './BaseDevices';
3
3
  export declare class ZigbeeAqaraPresence extends ZigbeeMotionSensor {
4
+ protected _needsMovementResetFallback: boolean;
5
+ protected readonly _occupancyStateId: string;
4
6
  constructor(pInfo: IoBrokerDeviceInfo);
5
- /** @inheritDoc */
6
- update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
7
7
  }
@@ -6,17 +6,8 @@ const enums_1 = require("../../enums");
6
6
  class ZigbeeAqaraPresence extends BaseDevices_1.ZigbeeMotionSensor {
7
7
  constructor(pInfo) {
8
8
  super(pInfo, enums_1.DeviceType.ZigbeeAqaraPresence);
9
- }
10
- /** @inheritDoc */
11
- update(idSplit, state, initial = false) {
12
- this.log(enums_1.LogLevel.DeepTrace, `Motion update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
13
- super.update(idSplit, state, initial, true);
14
- switch (idSplit[3]) {
15
- case 'presence':
16
- this.log(enums_1.LogLevel.Trace, `Motion sensor: Update for motion of ${this.info.customName}: ${state.val}`);
17
- this.updateMovement(state.val);
18
- break;
19
- }
9
+ this._needsMovementResetFallback = false;
10
+ this._occupancyStateId = 'presence';
20
11
  }
21
12
  }
22
13
  exports.ZigbeeAqaraPresence = ZigbeeAqaraPresence;