hoffmation-base 3.2.1-alpha.5 → 3.2.1-alpha.7
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.
- package/lib/action/actuatorChangeAction.js +1 -1
- package/lib/action/baseAction.d.ts +2 -1
- package/lib/action/baseAction.js +1 -2
- package/lib/action/batteryLevelChangeAction.js +1 -1
- package/lib/action/handleChangeAction.js +1 -1
- package/lib/action/humiditySensorChangeAction.js +1 -1
- package/lib/action/motionSensorAction.js +1 -1
- package/lib/action/presenceGroupAnyMovementAction.d.ts +2 -2
- package/lib/action/presenceGroupFirstEnterAction.d.ts +2 -2
- package/lib/action/presenceGroupLastLeftAction.d.ts +2 -2
- package/lib/action/shutterPositionChangedAction.js +1 -1
- package/lib/action/temperatureSensorChangeAction.js +1 -1
- package/lib/command/baseCommand.js +2 -2
- package/lib/devices/BaseDevice.js +1 -1
- package/lib/devices/CameraDevice.d.ts +1 -2
- package/lib/devices/CameraDevice.js +1 -10
- package/lib/devices/espresense/detectedBluetoothDevice.d.ts +1 -2
- package/lib/devices/espresense/detectedBluetoothDevice.js +0 -3
- package/lib/devices/espresense/espresenseDevice.d.ts +1 -3
- package/lib/devices/espresense/espresenseDevice.js +0 -5
- package/lib/devices/hmIPDevices/hmIpRoll.d.ts +0 -2
- package/lib/devices/hmIPDevices/hmIpRoll.js +1 -7
- package/lib/devices/tv/tvDevice.js +2 -6
- package/lib/devices/velux/veluxShutter.d.ts +0 -2
- package/lib/devices/velux/veluxShutter.js +1 -7
- package/lib/devices/victron/victron-device.js +1 -1
- package/lib/services/ac/ac-device.js +2 -6
- package/lib/services/ac/own-daikin-device.d.ts +0 -2
- package/lib/services/ac/own-daikin-device.js +1 -11
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class ActuatorChangeAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(device) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `New Actuator state (${device.actuatorOn}) received`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.ActuatorChangeAction;
|
|
11
11
|
this.actuatorOn = device.actuatorOn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../command';
|
|
2
|
+
import { CommandSource } from '../enums';
|
|
2
3
|
export declare abstract class BaseAction extends BaseCommand {
|
|
3
|
-
protected constructor(source
|
|
4
|
+
protected constructor(source: BaseAction | CommandSource, reason?: string);
|
|
4
5
|
get logMessage(): string;
|
|
5
6
|
}
|
package/lib/action/baseAction.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseAction = void 0;
|
|
4
4
|
const command_1 = require("../command");
|
|
5
|
-
const enums_1 = require("../enums");
|
|
6
5
|
class BaseAction extends command_1.BaseCommand {
|
|
7
6
|
constructor(source, reason) {
|
|
8
|
-
super(source
|
|
7
|
+
super(source, reason);
|
|
9
8
|
}
|
|
10
9
|
get logMessage() {
|
|
11
10
|
return this.reasonTrace;
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class BatteryLevelChangeAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(device) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `New Battery Level (${device.batteryLevel}%) received`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.BatteryManagerLevelChangeAction;
|
|
11
11
|
this.newLevel = device.batteryLevel;
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class HandleChangeAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(handle) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `${handle.customName} ${handle.position === enums_1.WindowPosition.closed ? 'opened' : 'closed'}`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.HandleChangedAction;
|
|
11
11
|
this.handle = handle;
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class HumiditySensorChangeAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(sensor, newHumidity) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `${sensor.customName} detected ${newHumidity} humidity`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.HumiditySensorChangeAction;
|
|
11
11
|
this.newHumidity = newHumidity;
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class MotionSensorAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(sensor) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `${sensor.customName} ${sensor.movementDetected ? 'detected' : 'cleared'} motion`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.MotionSensorAction;
|
|
11
11
|
this.motionDetected = sensor.movementDetected;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseAction } from './baseAction';
|
|
2
|
-
import { CommandType } from '../enums';
|
|
2
|
+
import { CommandSource, CommandType } from '../enums';
|
|
3
3
|
export declare class PresenceGroupAnyMovementAction extends BaseAction {
|
|
4
4
|
/** @inheritDoc */
|
|
5
5
|
type: CommandType;
|
|
6
|
-
constructor(source
|
|
6
|
+
constructor(source: BaseAction | CommandSource, reason?: string);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseAction } from './baseAction';
|
|
2
|
-
import { CommandType } from '../enums';
|
|
2
|
+
import { CommandSource, CommandType } from '../enums';
|
|
3
3
|
export declare class PresenceGroupFirstEnterAction extends BaseAction {
|
|
4
4
|
/** @inheritDoc */
|
|
5
5
|
type: CommandType;
|
|
6
|
-
constructor(source
|
|
6
|
+
constructor(source: BaseAction | CommandSource, reason?: string);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CommandType } from '../enums';
|
|
1
|
+
import { CommandSource, CommandType } from '../enums';
|
|
2
2
|
import { BaseAction } from './baseAction';
|
|
3
3
|
export declare class PresenceGroupLastLeftAction extends BaseAction {
|
|
4
4
|
/** @inheritDoc */
|
|
5
5
|
type: CommandType;
|
|
6
|
-
constructor(source
|
|
6
|
+
constructor(source: BaseAction | CommandSource, reason?: string);
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class ShutterPositionChangedAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(shutter, newPosition) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `${shutter.customName} changed position to ${newPosition}`);
|
|
9
9
|
this.newPosition = newPosition;
|
|
10
10
|
/** @inheritDoc */
|
|
11
11
|
this.type = enums_1.CommandType.ShutterPositionChangedAction;
|
|
@@ -5,7 +5,7 @@ const baseAction_1 = require("./baseAction");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
class TemperatureSensorChangeAction extends baseAction_1.BaseAction {
|
|
7
7
|
constructor(sensor, newTemperature) {
|
|
8
|
-
super(
|
|
8
|
+
super(enums_1.CommandSource.Automatic, `${sensor.customName} detected ${newTemperature} °C`);
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
this.type = enums_1.CommandType.TemperatureSensorChangeAction;
|
|
11
11
|
this.newTemperature = newTemperature;
|
|
@@ -67,7 +67,7 @@ class BaseCommand {
|
|
|
67
67
|
if (this.ignoreReason !== undefined) {
|
|
68
68
|
ownPart += ` ignored due to: "${this.ignoreReason}"`;
|
|
69
69
|
}
|
|
70
|
-
if (this.source
|
|
70
|
+
if (this.source instanceof BaseCommand) {
|
|
71
71
|
return `${this.source.reasonTrace} -> ${ownPart}`;
|
|
72
72
|
}
|
|
73
73
|
return `CommandType("${enums_1.CommandSource[this.source]}") stack => ${ownPart}`;
|
|
@@ -76,7 +76,7 @@ class BaseCommand {
|
|
|
76
76
|
if (this.type === type) {
|
|
77
77
|
return true;
|
|
78
78
|
}
|
|
79
|
-
if (this.source
|
|
79
|
+
if (this.source instanceof BaseCommand) {
|
|
80
80
|
return this.source.containsType(type);
|
|
81
81
|
}
|
|
82
82
|
return false;
|
|
@@ -93,7 +93,7 @@ class BaseDevice {
|
|
|
93
93
|
// eslint-disable-next-line
|
|
94
94
|
const returnValue = lodash_1.default.omit(this, 'lastCommands');
|
|
95
95
|
returnValue['lastCommands'] = this.lastCommands.readAmount(this.lastCommands.maximumSize);
|
|
96
|
-
return utils_1.Utils.jsonFilter(
|
|
96
|
+
return utils_1.Utils.jsonFilter(returnValue, this.jsonOmitKeys);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
exports.BaseDevice = BaseDevice;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { iBaseDevice, iCameraDevice, iCameraSettings
|
|
1
|
+
import { iBaseDevice, iCameraDevice, iCameraSettings } from '../interfaces';
|
|
2
2
|
import { LogDebugType, LogLevel } from '../enums';
|
|
3
3
|
import { MotionSensorAction } from '../action';
|
|
4
4
|
import { DeviceInfo } from './DeviceInfo';
|
|
@@ -34,7 +34,6 @@ export declare abstract class CameraDevice extends RoomBaseDevice implements iCa
|
|
|
34
34
|
protected _lastUpdate: Date;
|
|
35
35
|
get lastUpdate(): Date;
|
|
36
36
|
protected constructor(name: string, roomName: string);
|
|
37
|
-
toJSON(): Partial<iRoomDevice>;
|
|
38
37
|
/** @inheritDoc */
|
|
39
38
|
get lastImage(): string;
|
|
40
39
|
/** @inheritDoc */
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.CameraDevice = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const settingsObjects_1 = require("../settingsObjects");
|
|
9
5
|
const enums_1 = require("../enums");
|
|
10
6
|
const models_1 = require("../models");
|
|
@@ -43,18 +39,13 @@ class CameraDevice extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
43
39
|
this._movementDetectFallbackTimeout = null;
|
|
44
40
|
this._dogDetectFallbackTimeout = null;
|
|
45
41
|
this._lastUpdate = new Date(0);
|
|
42
|
+
this.jsonOmitKeys.push('_lastImage');
|
|
46
43
|
this.deviceCapabilities.push(enums_1.DeviceCapability.camera);
|
|
47
44
|
this.deviceCapabilities.push(enums_1.DeviceCapability.motionSensor);
|
|
48
45
|
this.name = name;
|
|
49
46
|
devices_1.Devices.alLDevices[allDevicesKey] = this;
|
|
50
47
|
utils_1.Utils.guardedTimeout(this.initializeMovementCounter, 4000, this);
|
|
51
48
|
}
|
|
52
|
-
toJSON() {
|
|
53
|
-
return utils_1.Utils.jsonFilter(lodash_1.default.omit(super.toJSON(), [
|
|
54
|
-
// To reduce Byte-size on cyclic update
|
|
55
|
-
'_lastImage',
|
|
56
|
-
]));
|
|
57
|
-
}
|
|
58
49
|
/** @inheritDoc */
|
|
59
50
|
get lastImage() {
|
|
60
51
|
return this._lastImage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogDebugType, LogLevel } from '../../enums';
|
|
2
|
-
import {
|
|
2
|
+
import { iBluetoothTrackingSettings } from '../../interfaces';
|
|
3
3
|
import { TrackedDistanceData } from './trackedDistanceData';
|
|
4
4
|
import { iBluetoothDetector } from '../../interfaces/baseDevices/iBluetoothDetector';
|
|
5
5
|
import { BaseDevice } from '../BaseDevice';
|
|
@@ -24,7 +24,6 @@ export declare class DetectedBluetoothDevice extends BaseDevice {
|
|
|
24
24
|
get name(): string;
|
|
25
25
|
updateDistance(tracker: iBluetoothDetector, distance: number): void;
|
|
26
26
|
log(level: LogLevel, message: string, debugType?: LogDebugType): void;
|
|
27
|
-
toJSON(): Partial<iBaseDevice>;
|
|
28
27
|
getDistance(id: string, maxAge?: number): TrackedDistanceData | undefined;
|
|
29
28
|
getDistances(maxAge?: number): Array<TrackedDistanceData>;
|
|
30
29
|
getDistanceReport(maxAge?: number): string;
|
|
@@ -62,9 +62,6 @@ class DetectedBluetoothDevice extends BaseDevice_1.BaseDevice {
|
|
|
62
62
|
deviceName: this.name,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
toJSON() {
|
|
66
|
-
return utils_1.Utils.jsonFilter(this);
|
|
67
|
-
}
|
|
68
65
|
getDistance(id, maxAge = 120) {
|
|
69
66
|
const data = this.distanceMap.get(id);
|
|
70
67
|
if (data === undefined) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iTrilaterationBasePoint } from '../../interfaces';
|
|
2
2
|
import { iBluetoothDetector } from '../../interfaces/baseDevices/iBluetoothDetector';
|
|
3
3
|
import { ProximityCallback } from './proximityCallback';
|
|
4
4
|
import { RoomBaseDevice } from '../RoomBaseDevice';
|
|
@@ -35,8 +35,6 @@ export declare class EspresenseDevice extends RoomBaseDevice implements iBluetoo
|
|
|
35
35
|
*/
|
|
36
36
|
update(devName: string, state: ioBroker.State): void;
|
|
37
37
|
/** @inheritDoc */
|
|
38
|
-
toJSON(): Partial<iRoomDevice>;
|
|
39
|
-
/** @inheritDoc */
|
|
40
38
|
loadDeviceSettings(): void;
|
|
41
39
|
/** @inheritDoc */
|
|
42
40
|
addProximityCallback(cb: ProximityCallback): void;
|
|
@@ -8,7 +8,6 @@ const DeviceInfo_1 = require("../DeviceInfo");
|
|
|
8
8
|
const devices_1 = require("../devices");
|
|
9
9
|
const espresenseCoordinator_1 = require("./espresenseCoordinator");
|
|
10
10
|
const trilateration_1 = require("./trilateration");
|
|
11
|
-
const utils_1 = require("../../utils");
|
|
12
11
|
const RoomBaseDevice_1 = require("../RoomBaseDevice");
|
|
13
12
|
class EspresenseDevice extends RoomBaseDevice_1.RoomBaseDevice {
|
|
14
13
|
/**
|
|
@@ -107,10 +106,6 @@ class EspresenseDevice extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
/** @inheritDoc */
|
|
110
|
-
toJSON() {
|
|
111
|
-
return utils_1.Utils.jsonFilter(this);
|
|
112
|
-
}
|
|
113
|
-
/** @inheritDoc */
|
|
114
109
|
loadDeviceSettings() {
|
|
115
110
|
// Nothing
|
|
116
111
|
}
|
|
@@ -3,7 +3,6 @@ import { iShutter, iWindow } from '../../interfaces';
|
|
|
3
3
|
import { ShutterSettings } from '../../settingsObjects';
|
|
4
4
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
import { ShutterSetLevelCommand } from '../../command';
|
|
6
|
-
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
7
6
|
export declare class HmIpRoll extends HmIPDevice implements iShutter {
|
|
8
7
|
/** @inheritDoc */
|
|
9
8
|
settings: ShutterSettings;
|
|
@@ -23,5 +22,4 @@ export declare class HmIpRoll extends HmIPDevice implements iShutter {
|
|
|
23
22
|
persist(): void;
|
|
24
23
|
private setCurrentLevel;
|
|
25
24
|
setLevel(command: ShutterSetLevelCommand): void;
|
|
26
|
-
toJSON(): Partial<IoBrokerBaseDevice>;
|
|
27
25
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.HmIpRoll = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const hmIpDevice_1 = require("./hmIpDevice");
|
|
9
5
|
const settingsObjects_1 = require("../../settingsObjects");
|
|
10
6
|
const enums_1 = require("../../enums");
|
|
@@ -21,6 +17,7 @@ class HmIpRoll extends hmIpDevice_1.HmIPDevice {
|
|
|
21
17
|
this._setLevel = -1;
|
|
22
18
|
this._setLevelTime = -1;
|
|
23
19
|
this._currentLevel = -1;
|
|
20
|
+
this.jsonOmitKeys.push('_window');
|
|
24
21
|
this.deviceCapabilities.push(enums_1.DeviceCapability.shutter);
|
|
25
22
|
this._setLevelSwitchID = `${this.info.fullID}.4.LEVEL`;
|
|
26
23
|
(_a = this.dbo) === null || _a === void 0 ? void 0 : _a.getLastDesiredPosition(this).then((val) => {
|
|
@@ -117,8 +114,5 @@ class HmIpRoll extends hmIpDevice_1.HmIPDevice {
|
|
|
117
114
|
this.log(enums_1.LogLevel.Debug, `Fahre Rollo auf Position ${targetLevel}`);
|
|
118
115
|
this.setState(this._setLevelSwitchID, targetLevel);
|
|
119
116
|
}
|
|
120
|
-
toJSON() {
|
|
121
|
-
return lodash_1.default.omit(super.toJSON(), ['_window']);
|
|
122
|
-
}
|
|
123
117
|
}
|
|
124
118
|
exports.HmIpRoll = HmIpRoll;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.TvDevice = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const enums_1 = require("../../enums");
|
|
9
5
|
const settingsObjects_1 = require("../../settingsObjects");
|
|
10
6
|
const DeviceInfo_1 = require("../DeviceInfo");
|
|
@@ -45,9 +41,9 @@ class TvDevice extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
45
41
|
}
|
|
46
42
|
toJSON() {
|
|
47
43
|
// eslint-disable-next-line
|
|
48
|
-
const result =
|
|
44
|
+
const result = super.toJSON();
|
|
49
45
|
result['on'] = this.on;
|
|
50
|
-
return
|
|
46
|
+
return result;
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
exports.TvDevice = TvDevice;
|
|
@@ -3,7 +3,6 @@ import { iShutter, iWindow } from '../../interfaces';
|
|
|
3
3
|
import { ShutterSettings } from '../../settingsObjects';
|
|
4
4
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
import { ShutterSetLevelCommand } from '../../command';
|
|
6
|
-
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
7
6
|
export declare class VeluxShutter extends VeluxDevice implements iShutter {
|
|
8
7
|
/** @inheritDoc */
|
|
9
8
|
settings: ShutterSettings;
|
|
@@ -22,6 +21,5 @@ export declare class VeluxShutter extends VeluxDevice implements iShutter {
|
|
|
22
21
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
23
22
|
persist(): void;
|
|
24
23
|
setLevel(command: ShutterSetLevelCommand): void;
|
|
25
|
-
toJSON(): Partial<IoBrokerBaseDevice>;
|
|
26
24
|
private setCurrentLevel;
|
|
27
25
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.VeluxShutter = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const veluxDevice_1 = require("./veluxDevice");
|
|
9
5
|
const settingsObjects_1 = require("../../settingsObjects");
|
|
10
6
|
const enums_1 = require("../../enums");
|
|
@@ -21,6 +17,7 @@ class VeluxShutter extends veluxDevice_1.VeluxDevice {
|
|
|
21
17
|
this._setLevel = -1;
|
|
22
18
|
this._setLevelTime = -1;
|
|
23
19
|
this._currentLevel = -1;
|
|
20
|
+
this.jsonOmitKeys.push('_window');
|
|
24
21
|
this.deviceCapabilities.push(enums_1.DeviceCapability.shutter);
|
|
25
22
|
this._setLevelSwitchID = `${this.info.fullID}.targetPosition`;
|
|
26
23
|
(_a = this.dbo) === null || _a === void 0 ? void 0 : _a.getLastDesiredPosition(this).then((val) => {
|
|
@@ -103,9 +100,6 @@ class VeluxShutter extends veluxDevice_1.VeluxDevice {
|
|
|
103
100
|
// Level is inverted for Velux Adapter (100 = 0, 0 = 100, 25 = 75, etc.)
|
|
104
101
|
this.setState(this._setLevelSwitchID, Math.abs(targetLevel - 100));
|
|
105
102
|
}
|
|
106
|
-
toJSON() {
|
|
107
|
-
return lodash_1.default.omit(super.toJSON(), ['_window']);
|
|
108
|
-
}
|
|
109
103
|
setCurrentLevel(value, initial = false) {
|
|
110
104
|
let correctedValue = Math.abs(value - 100);
|
|
111
105
|
if (correctedValue !== this._setLevel && utils_1.Utils.nowMS() - this._setLevelTime < 60 * 10000) {
|
|
@@ -135,7 +135,7 @@ class VictronDevice extends BaseDevice_1.BaseDevice {
|
|
|
135
135
|
injectingWattage: this.injectingWattage,
|
|
136
136
|
selfConsumingWattage: this.selfConsumingWattage,
|
|
137
137
|
},
|
|
138
|
-
...
|
|
138
|
+
...super.toJSON(),
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.AcDevice = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const devices_1 = require("../../devices");
|
|
9
5
|
const interfaces_1 = require("../../interfaces");
|
|
10
6
|
const enums_1 = require("../../enums");
|
|
@@ -301,9 +297,9 @@ class AcDevice extends devices_1.RoomBaseDevice {
|
|
|
301
297
|
/** @inheritDoc */
|
|
302
298
|
toJSON() {
|
|
303
299
|
// eslint-disable-next-line
|
|
304
|
-
const result =
|
|
300
|
+
const result = super.toJSON();
|
|
305
301
|
result['on'] = this.on;
|
|
306
|
-
return
|
|
302
|
+
return result;
|
|
307
303
|
}
|
|
308
304
|
}
|
|
309
305
|
exports.AcDevice = AcDevice;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.OwnDaikinDevice = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const ac_device_1 = require("./ac-device");
|
|
9
5
|
const daikin_controller_1 = require("daikin-controller");
|
|
10
6
|
const enums_1 = require("../../enums");
|
|
@@ -35,6 +31,7 @@ class OwnDaikinDevice extends ac_device_1.AcDevice {
|
|
|
35
31
|
/** @inheritDoc */
|
|
36
32
|
this.deviceType = enums_1.DeviceType.Daikin;
|
|
37
33
|
this._on = false;
|
|
34
|
+
this.jsonOmitKeys.push('_device');
|
|
38
35
|
}
|
|
39
36
|
get device() {
|
|
40
37
|
return this._device;
|
|
@@ -191,12 +188,5 @@ class OwnDaikinDevice extends ac_device_1.AcDevice {
|
|
|
191
188
|
}
|
|
192
189
|
});
|
|
193
190
|
}
|
|
194
|
-
/** @inheritDoc */
|
|
195
|
-
toJSON() {
|
|
196
|
-
// eslint-disable-next-line
|
|
197
|
-
const result = lodash_1.default.omit(super.toJSON(), ['device', '_device']);
|
|
198
|
-
result['on'] = this.on;
|
|
199
|
-
return utils_1.Utils.jsonFilter(result);
|
|
200
|
-
}
|
|
201
191
|
}
|
|
202
192
|
exports.OwnDaikinDevice = OwnDaikinDevice;
|