hoffmation-base 3.0.0-alpha.17 → 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.
- package/lib/models/deviceSettings/acSettings.d.ts +7 -1
- package/lib/models/deviceSettings/acSettings.js +11 -4
- package/lib/models/groupSettings/heatGroupSettings.d.ts +4 -0
- package/lib/models/groupSettings/heatGroupSettings.js +4 -0
- package/lib/server/devices/wledDevice.js +6 -3
- package/lib/server/services/ac/ac-device.js +4 -3
- package/lib/server/services/ac/own-daikin-device.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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.
|
|
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.
|
|
45
|
-
this.
|
|
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
|
/**
|
|
@@ -67,18 +67,21 @@ class WledDevice extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
|
|
|
67
67
|
c.brightness = 10;
|
|
68
68
|
}
|
|
69
69
|
this.queuedValue = c.on;
|
|
70
|
-
if (c.
|
|
71
|
-
|
|
70
|
+
if (!c.on) {
|
|
71
|
+
this.writeActuatorStateToDevice(new models_1.ActuatorWriteStateToDeviceCommand(c, c.on, 'WLED ausschalten'));
|
|
72
|
+
}
|
|
73
|
+
else if (c.preset !== undefined) {
|
|
74
|
+
// This also turns the device on
|
|
72
75
|
this.setState(this._presetID, c.preset, undefined, (err) => {
|
|
73
76
|
services_1.ServerLogService.writeLog(models_1.LogLevel.Error, `WLED schalten ergab Fehler: ${err}`);
|
|
74
77
|
});
|
|
75
78
|
}
|
|
76
79
|
else if (c.brightness > -1) {
|
|
80
|
+
// This also turns the device on
|
|
77
81
|
this.setState(this._brightnessID, c.brightness, undefined, (err) => {
|
|
78
82
|
services_1.ServerLogService.writeLog(models_1.LogLevel.Error, `Dimmer Helligkeit schalten ergab Fehler: ${err}`);
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
|
-
this.writeActuatorStateToDevice(new models_1.ActuatorWriteStateToDeviceCommand(c, c.on, 'WLED Schalten'));
|
|
82
85
|
if (c.timeout !== undefined && c.timeout > -1 && !dontBlock) {
|
|
83
86
|
this.blockAutomationHandler.disableAutomatic(c.timeout, models_1.CollisionSolving.overrideIfGreater);
|
|
84
87
|
}
|
|
@@ -85,7 +85,8 @@ class AcDevice {
|
|
|
85
85
|
this.automaticCheck();
|
|
86
86
|
}
|
|
87
87
|
isAvailableForExcessEnergy() {
|
|
88
|
-
|
|
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.
|
|
118
|
+
if (this.settings.useOwnTemperature) {
|
|
118
119
|
// Device is in automatic mode so ignore energy and room temperature
|
|
119
|
-
if (
|
|
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.
|
|
100
|
+
targetTemp = this.settings.useOwnTemperature ? targetTemp : 29;
|
|
101
101
|
}
|
|
102
102
|
else if (this.desiredMode == daikin_controller_1.Mode.COLD) {
|
|
103
|
-
targetTemp = this.settings.
|
|
103
|
+
targetTemp = this.settings.useOwnTemperature ? targetTemp : 16;
|
|
104
104
|
}
|
|
105
105
|
const changeObject = {
|
|
106
106
|
power: this.desiredState,
|