hoffmation-base 3.2.1-alpha.10 → 3.2.1-alpha.11
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.
|
@@ -14,7 +14,7 @@ const DeviceInfo_1 = require("../DeviceInfo");
|
|
|
14
14
|
const devices_1 = require("../devices");
|
|
15
15
|
const utils_1 = require("../../utils");
|
|
16
16
|
const sharedFunctions_1 = require("../sharedFunctions");
|
|
17
|
-
const
|
|
17
|
+
const models_1 = require("../../models");
|
|
18
18
|
const command_1 = require("../../command");
|
|
19
19
|
const services_1 = require("../../services");
|
|
20
20
|
const settings_service_1 = require("../../settings-service");
|
|
@@ -61,6 +61,7 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
61
61
|
]);
|
|
62
62
|
devices_1.Devices.alLDevices[allDevicesKey] = this;
|
|
63
63
|
this.deviceCapabilities.push(enums_1.DeviceCapability.actuator);
|
|
64
|
+
this.deviceCapabilities.push(enums_1.DeviceCapability.blockAutomatic);
|
|
64
65
|
if (options.influxDb) {
|
|
65
66
|
this._influxClient = new lib_1.DachsInfluxClient(options.influxDb);
|
|
66
67
|
}
|
|
@@ -189,6 +190,9 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
189
190
|
this.checkAllDesiredStates(action, action.newLevel);
|
|
190
191
|
}
|
|
191
192
|
checkAllDesiredStates(action, batteryLevel) {
|
|
193
|
+
if (this.blockAutomationHandler.automaticBlockActive) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
192
196
|
const shouldDachsBeStarted = this.shouldDachsBeStarted(action, batteryLevel);
|
|
193
197
|
this.checkHeatingRod(action, batteryLevel);
|
|
194
198
|
this.checkAlternativeActuator(shouldDachsBeStarted, action);
|
|
@@ -301,7 +305,7 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
|
|
|
301
305
|
// It is winter and heat storage is kinda cold --> Start
|
|
302
306
|
return true;
|
|
303
307
|
}
|
|
304
|
-
const dayType = services_1.TimeCallbackService.dayType(new
|
|
308
|
+
const dayType = services_1.TimeCallbackService.dayType(new models_1.SunTimeOffsets());
|
|
305
309
|
if ((dayType === enums_1.TimeOfDay.Daylight || dayType === enums_1.TimeOfDay.BeforeSunrise) &&
|
|
306
310
|
batteryLevel > this.settings.batteryLevelTurnOnThreshold) {
|
|
307
311
|
// It is daytime (maybe solar power) and it is no critical battery level
|