hoffmation-base 3.2.5 → 3.2.6
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.
|
@@ -9,6 +9,8 @@ export declare abstract class BaseDevice implements iBaseDevice {
|
|
|
9
9
|
/** @inheritDoc */
|
|
10
10
|
readonly jsonOmitKeys: string[];
|
|
11
11
|
/** @inheritDoc */
|
|
12
|
+
readonly jsonOmitTopLevelKeys: string[];
|
|
13
|
+
/** @inheritDoc */
|
|
12
14
|
readonly deviceCapabilities: DeviceCapability[];
|
|
13
15
|
/**
|
|
14
16
|
* @inheritDoc
|
|
@@ -16,6 +16,8 @@ class BaseDevice {
|
|
|
16
16
|
/** @inheritDoc */
|
|
17
17
|
this.jsonOmitKeys = [];
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
+
this.jsonOmitTopLevelKeys = [];
|
|
20
|
+
/** @inheritDoc */
|
|
19
21
|
this.deviceCapabilities = [];
|
|
20
22
|
/**
|
|
21
23
|
* @inheritDoc
|
|
@@ -95,7 +97,7 @@ class BaseDevice {
|
|
|
95
97
|
// eslint-disable-next-line
|
|
96
98
|
const returnValue = lodash_1.default.omit(this, 'lastCommands');
|
|
97
99
|
returnValue['lastCommands'] = this.lastCommands.readAmount(this.lastCommands.maximumSize);
|
|
98
|
-
return utils_1.Utils.jsonFilter(returnValue, this.jsonOmitKeys);
|
|
100
|
+
return utils_1.Utils.jsonFilter(returnValue, this.jsonOmitKeys, this.jsonOmitTopLevelKeys);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
exports.BaseDevice = BaseDevice;
|
|
@@ -52,14 +52,13 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
52
52
|
* The timestamp of the last time the Block was enforced.
|
|
53
53
|
*/
|
|
54
54
|
this._blockStarted = 0;
|
|
55
|
+
this.jsonOmitTopLevelKeys.push(...['warmWaterPump', 'heatingRod']);
|
|
55
56
|
this.jsonOmitKeys.push(...[
|
|
56
57
|
'client',
|
|
57
58
|
'config',
|
|
58
59
|
'_influxClient',
|
|
59
60
|
'warmWaterSensor',
|
|
60
61
|
'heatStorageTempSensor',
|
|
61
|
-
'warmWaterPump',
|
|
62
|
-
'heatingRod',
|
|
63
62
|
'blockDachsStart',
|
|
64
63
|
'warmWaterDachsAlternativeActuator',
|
|
65
64
|
]);
|