hoffmation-base 3.2.5 → 3.2.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.
@@ -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
  ]);
@@ -48,6 +48,11 @@ export interface iAcSettings extends iDeviceSettings {
48
48
  *
49
49
  */
50
50
  minOutdoorTempForCooling: number;
51
+ /**
52
+ * Set's a specific override temperature as cooling target (e.g. to maximize cooling)
53
+ * -1 = Off
54
+ */
55
+ overrideCoolingTargetTemp?: number;
51
56
  /**
52
57
  *
53
58
  */
@@ -168,6 +168,9 @@ class AcDevice extends devices_1.RoomBaseDevice {
168
168
  return enums_1.AcMode.Heating;
169
169
  }
170
170
  else if (this.coolingAllowed) {
171
+ if (this.settings.overrideCoolingTargetTemp > 0) {
172
+ this._desiredTemperatur = this.settings.overrideCoolingTargetTemp;
173
+ }
171
174
  return enums_1.AcMode.Cooling;
172
175
  }
173
176
  return enums_1.AcMode.Off;
@@ -111,7 +111,12 @@ class OwnDaikinDevice extends ac_device_1.AcDevice {
111
111
  targetTemp = this.settings.useOwnTemperature ? targetTemp : 29;
112
112
  }
113
113
  else if (this.desiredMode == daikin_controller_1.Mode.COLD) {
114
- targetTemp = this.settings.useOwnTemperature ? targetTemp : 16;
114
+ if (this.settings.useOwnTemperature) {
115
+ targetTemp = this.settings.overrideCoolingTargetTemp > 0 ? this.settings.overrideCoolingTargetTemp : targetTemp;
116
+ }
117
+ else {
118
+ targetTemp = 16;
119
+ }
115
120
  }
116
121
  const changeObject = {
117
122
  power: this.desiredState,
@@ -44,6 +44,8 @@ export declare class AcSettings extends DeviceSettings implements iAcSettings {
44
44
  * The minimum outside temperature (max. of day) in Celsius to even consider cooling.
45
45
  */
46
46
  minOutdoorTempForCooling: number;
47
+ /** @inheritDoc */
48
+ overrideCoolingTargetTemp: number;
47
49
  fromPartialObject(data: Partial<AcSettings>): void;
48
50
  toJSON(): Partial<AcSettings>;
49
51
  }
@@ -50,9 +50,11 @@ class AcSettings extends deviceSettings_1.DeviceSettings {
50
50
  * The minimum outside temperature (max. of day) in Celsius to even consider cooling.
51
51
  */
52
52
  this.minOutdoorTempForCooling = 21;
53
+ /** @inheritDoc */
54
+ this.overrideCoolingTargetTemp = -1;
53
55
  }
54
56
  fromPartialObject(data) {
55
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
57
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
56
58
  this.minimumHours = (_a = data.minimumHours) !== null && _a !== void 0 ? _a : this.minimumHours;
57
59
  this.minimumMinutes = (_b = data.minimumMinutes) !== null && _b !== void 0 ? _b : this.minimumMinutes;
58
60
  this.maximumHours = (_c = data.maximumHours) !== null && _c !== void 0 ? _c : this.maximumHours;
@@ -63,6 +65,7 @@ class AcSettings extends deviceSettings_1.DeviceSettings {
63
65
  this.useAutomatic = (_h = data.useAutomatic) !== null && _h !== void 0 ? _h : this.useAutomatic;
64
66
  this.manualDisabled = (_j = data.manualDisabled) !== null && _j !== void 0 ? _j : this.manualDisabled;
65
67
  this.minOutdoorTempForCooling = (_k = data.minOutdoorTempForCooling) !== null && _k !== void 0 ? _k : this.minOutdoorTempForCooling;
68
+ this.overrideCoolingTargetTemp = (_l = data.overrideCoolingTargetTemp) !== null && _l !== void 0 ? _l : this.overrideCoolingTargetTemp;
66
69
  super.fromPartialObject(data);
67
70
  }
68
71
  toJSON() {