hoffmation-base 3.0.0-alpha.97 → 3.0.0-alpha.99
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.
|
@@ -12,6 +12,7 @@ const dachsSettings_1 = require("../../../models/deviceSettings/dachsSettings");
|
|
|
12
12
|
const lib_1 = require("./lib");
|
|
13
13
|
const dachsTemperatureSensor_1 = require("./dachsTemperatureSensor");
|
|
14
14
|
const blockAutomaticHandler_1 = require("../../services/blockAutomaticHandler");
|
|
15
|
+
const config_1 = require("../../config");
|
|
15
16
|
class Dachs {
|
|
16
17
|
/** @inheritDoc */
|
|
17
18
|
get customName() {
|
|
@@ -231,14 +232,14 @@ class Dachs {
|
|
|
231
232
|
desiredWwPumpState = false;
|
|
232
233
|
reason = 'Alternative heating source is on';
|
|
233
234
|
}
|
|
234
|
-
else if (this._dachsOn) {
|
|
235
|
-
desiredWwPumpState = true;
|
|
236
|
-
reason = 'Dachs is on anyways';
|
|
237
|
-
}
|
|
238
235
|
else if (wwTemp > heatStorageTemp) {
|
|
239
236
|
desiredWwPumpState = false;
|
|
240
237
|
reason = `Temperature of warm water pump ${wwTemp}°C is higher than temperature of heat storage ${heatStorageTemp}°C`;
|
|
241
238
|
}
|
|
239
|
+
else if (this._dachsOn) {
|
|
240
|
+
desiredWwPumpState = true;
|
|
241
|
+
reason = 'Dachs is on anyways';
|
|
242
|
+
}
|
|
242
243
|
else if (((_b = this.blockDachsStart) === null || _b === void 0 ? void 0 : _b.actuatorOn) === false) {
|
|
243
244
|
desiredWwPumpState = true;
|
|
244
245
|
reason = 'Dachs is not blocked --> lowering storage temp might trigger it.';
|
|
@@ -278,6 +279,7 @@ class Dachs {
|
|
|
278
279
|
this.heatingRod.setActuator(setAction);
|
|
279
280
|
}
|
|
280
281
|
shouldDachsBeStarted(action) {
|
|
282
|
+
var _a;
|
|
281
283
|
if (this.blockDachsStart !== undefined) {
|
|
282
284
|
if (action.newLevel > this.settings.batteryLevelPreventStartThreshold) {
|
|
283
285
|
const blockAction = new models_1.ActuatorSetStateCommand(action, true, `Battery reached ${action.newLevel}%, Dachs should not run any more`, null);
|
|
@@ -289,6 +291,12 @@ class Dachs {
|
|
|
289
291
|
const liftAction = new models_1.ActuatorSetStateCommand(action, false, `Battery reached ${action.newLevel}%, Dachs is now allowed to run if needed`, null);
|
|
290
292
|
this.blockDachsStart.setActuator(liftAction);
|
|
291
293
|
}
|
|
294
|
+
else if (((_a = services_1.SettingsService.settings.heaterSettings) === null || _a === void 0 ? void 0 : _a.mode) === config_1.HeatingMode.Winter &&
|
|
295
|
+
this.heatStorageTempSensor.temperatureSensor.temperature < 60 &&
|
|
296
|
+
services_1.Utils.dateByTimeSpan(21, 30) < new Date()) {
|
|
297
|
+
const liftWinterAction = new models_1.ActuatorSetStateCommand(action, false, `Battery at ${action.newLevel}% but it is winter, we are nearing night and heat storage is kinda cold: Dachs is now allowed to run if needed`, null);
|
|
298
|
+
this.blockDachsStart.setActuator(liftWinterAction);
|
|
299
|
+
}
|
|
292
300
|
else if (this.blockDachsStart.actuatorOn) {
|
|
293
301
|
// We haven't reached the lower threshold yet --> nothing to do
|
|
294
302
|
return false;
|