hoffmation-base 3.0.0-alpha.18 → 3.0.0-alpha.19

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.
@@ -15,7 +15,13 @@ export declare class AcSettings extends DeviceSettings {
15
15
  * Whether we should ignore the room temperature and let the AC decide on its own
16
16
  * @type {boolean}
17
17
  */
18
- useOwnTemperatureAndAutomatic: boolean;
18
+ useOwnTemperature: boolean;
19
+ /**
20
+ * Whether the AC should use automatic mode to decide on its own whether to heat or cool
21
+ * !!Warning!! This can result in excessive energy consumption, as overshooting the temperature can result in the AC switching to the opposite mode
22
+ * @type {boolean}
23
+ */
24
+ useAutomatic: boolean;
19
25
  /**
20
26
  * Whether we should turn off AC-Cooling when someone is in the room
21
27
  * @type {boolean}
@@ -21,7 +21,13 @@ class AcSettings extends deviceSettings_1.DeviceSettings {
21
21
  * Whether we should ignore the room temperature and let the AC decide on its own
22
22
  * @type {boolean}
23
23
  */
24
- this.useOwnTemperatureAndAutomatic = false;
24
+ this.useOwnTemperature = false;
25
+ /**
26
+ * Whether the AC should use automatic mode to decide on its own whether to heat or cool
27
+ * !!Warning!! This can result in excessive energy consumption, as overshooting the temperature can result in the AC switching to the opposite mode
28
+ * @type {boolean}
29
+ */
30
+ this.useAutomatic = false;
25
31
  /**
26
32
  * Whether we should turn off AC-Cooling when someone is in the room
27
33
  * @type {boolean}
@@ -34,15 +40,16 @@ class AcSettings extends deviceSettings_1.DeviceSettings {
34
40
  this.manualDisabled = false;
35
41
  }
36
42
  fromPartialObject(data) {
37
- var _a, _b, _c, _d, _e, _f, _g, _h;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
38
44
  this.minimumHours = (_a = data.minimumHours) !== null && _a !== void 0 ? _a : this.minimumHours;
39
45
  this.minimumMinutes = (_b = data.minimumMinutes) !== null && _b !== void 0 ? _b : this.minimumMinutes;
40
46
  this.maximumHours = (_c = data.maximumHours) !== null && _c !== void 0 ? _c : this.maximumHours;
41
47
  this.maximumMinutes = (_d = data.maximumMinutes) !== null && _d !== void 0 ? _d : this.maximumMinutes;
42
48
  this.heatingAllowed = (_e = data.heatingAllowed) !== null && _e !== void 0 ? _e : this.heatingAllowed;
43
49
  this.noCoolingOnMovement = (_f = data.noCoolingOnMovement) !== null && _f !== void 0 ? _f : this.noCoolingOnMovement;
44
- this.useOwnTemperatureAndAutomatic = (_g = data.useOwnTemperatureAndAutomatic) !== null && _g !== void 0 ? _g : this.useOwnTemperatureAndAutomatic;
45
- this.manualDisabled = (_h = data.manualDisabled) !== null && _h !== void 0 ? _h : this.manualDisabled;
50
+ this.useOwnTemperature = (_g = data.useOwnTemperature) !== null && _g !== void 0 ? _g : this.useOwnTemperature;
51
+ this.useAutomatic = (_h = data.useAutomatic) !== null && _h !== void 0 ? _h : this.useAutomatic;
52
+ this.manualDisabled = (_j = data.manualDisabled) !== null && _j !== void 0 ? _j : this.manualDisabled;
46
53
  super.fromPartialObject(data);
47
54
  }
48
55
  toJSON() {
@@ -3,6 +3,10 @@ import { iIdHolder } from '../iIdHolder';
3
3
  import { GroupSettings } from './groupSettings';
4
4
  export declare class HeatGroupSettings extends GroupSettings {
5
5
  automaticPoints: TemperatureSettings[];
6
+ /**
7
+ * Whether the temperature should be calculated automatically, or the manualTemperature should be used
8
+ * @type {boolean}
9
+ */
6
10
  automaticMode: boolean;
7
11
  automaticFallBackTemperatur: number;
8
12
  /**
@@ -7,6 +7,10 @@ class HeatGroupSettings extends groupSettings_1.GroupSettings {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.automaticPoints = [];
10
+ /**
11
+ * Whether the temperature should be calculated automatically, or the manualTemperature should be used
12
+ * @type {boolean}
13
+ */
10
14
  this.automaticMode = true;
11
15
  this.automaticFallBackTemperatur = 20;
12
16
  /**
@@ -85,7 +85,8 @@ class AcDevice {
85
85
  this.automaticCheck();
86
86
  }
87
87
  isAvailableForExcessEnergy() {
88
- if (this.settings.useOwnTemperatureAndAutomatic) {
88
+ var _a, _b;
89
+ if (this.settings.useAutomatic || (((_b = (_a = this.room) === null || _a === void 0 ? void 0 : _a.HeatGroup) === null || _b === void 0 ? void 0 : _b.settings.automaticMode) && this.settings.heatingAllowed)) {
89
90
  return false;
90
91
  }
91
92
  if (this.blockAutomationHandler.automaticBlockActive) {
@@ -114,9 +115,9 @@ class AcDevice {
114
115
  acOn && this.log(models_1.LogLevel.Info, `We should turn off now, to respect night settings.`);
115
116
  return ac_mode_1.AcMode.Off;
116
117
  }
117
- if (this.settings.useOwnTemperatureAndAutomatic) {
118
+ if (this.settings.useOwnTemperature) {
118
119
  // Device is in automatic mode so ignore energy and room temperature
119
- if (heatGroup === null || heatGroup === void 0 ? void 0 : heatGroup.settings.automaticMode) {
120
+ if (this.settings.useAutomatic) {
120
121
  return ac_mode_1.AcMode.Auto;
121
122
  }
122
123
  if (settings_service_1.SettingsService.heatMode !== config_1.HeatingMode.Sommer && this.settings.heatingAllowed) {
@@ -97,10 +97,10 @@ class OwnDaikinDevice extends ac_device_1.AcDevice {
97
97
  }
98
98
  let targetTemp = this._desiredTemperatur;
99
99
  if (this.desiredMode == daikin_controller_1.Mode.HOT) {
100
- targetTemp = this.settings.useOwnTemperatureAndAutomatic ? targetTemp + 1 : 29;
100
+ targetTemp = this.settings.useOwnTemperature ? targetTemp : 29;
101
101
  }
102
102
  else if (this.desiredMode == daikin_controller_1.Mode.COLD) {
103
- targetTemp = this.settings.useOwnTemperatureAndAutomatic ? targetTemp - 1 : 16;
103
+ targetTemp = this.settings.useOwnTemperature ? targetTemp : 16;
104
104
  }
105
105
  const changeObject = {
106
106
  power: this.desiredState,