hoffmation-base 3.2.11 → 3.2.15

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.
@@ -225,7 +225,11 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
225
225
  const heatStorageTemp = this._tempHeatStorage;
226
226
  let desiredWwPumpState = false;
227
227
  let reason = '';
228
- if (((_a = this.warmWaterDachsAlternativeActuator) === null || _a === void 0 ? void 0 : _a.actuatorOn) === true) {
228
+ if (this.settings.disableDachsOwnWW) {
229
+ desiredWwPumpState = false;
230
+ reason = 'Dachs own WW is disabled';
231
+ }
232
+ else if (((_a = this.warmWaterDachsAlternativeActuator) === null || _a === void 0 ? void 0 : _a.actuatorOn) === true) {
229
233
  desiredWwPumpState = false;
230
234
  reason = 'Alternative heating source is on';
231
235
  }
@@ -346,7 +350,11 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
346
350
  }
347
351
  let desiredState = false;
348
352
  let reason = 'Dachs is allowed to run --> Block alternative heating source';
349
- if (shouldDachsBeStarted || this._dachsOn) {
353
+ if (this.settings.disableDachsOwnWW) {
354
+ reason = 'Dachs own WW is disabled';
355
+ desiredState = true;
356
+ }
357
+ else if (shouldDachsBeStarted || this._dachsOn) {
350
358
  reason = 'Dachs is running or should be started';
351
359
  desiredState = false;
352
360
  }
@@ -11,6 +11,10 @@ export interface iDachsDeviceSettings extends iActuatorSettings {
11
11
  * Whether the secondary water heating source should be disabled regardless of battery level.
12
12
  */
13
13
  disableHeatingRod: boolean;
14
+ /**
15
+ * Option to disable Warm-Water production from dachs completely.
16
+ */
17
+ disableDachsOwnWW: boolean;
14
18
  /**
15
19
  * Defines the battery level at which the dachs should be turned on,
16
20
  * to prevent a battery based island-system to be out of power.
@@ -86,9 +86,13 @@ class SonosService {
86
86
  logging_1.ServerLogService.writeLog(enums_1.LogLevel.Alert, 'SonosService noch nicht initialisiert.');
87
87
  }
88
88
  polly_service_1.PollyService.tts(pMessage, (networkPath, duration) => {
89
- const hours = new Date().getHours();
90
- const volume = hours < 10 || hours > 22 ? 40 : 80;
91
89
  for (const deviceName in this.ownDevices) {
90
+ const snDevice = this.ownDevices[deviceName];
91
+ const room = snDevice.room;
92
+ const timeOfDay = time_callback_service_1.TimeCallbackService.dayType(room.settings.rolloOffset);
93
+ const volume = timeOfDay == enums_1.TimeOfDay.Night
94
+ ? snDevice.settings.defaultNightAnounceVolume
95
+ : snDevice.settings.defaultDayAnounceVolume;
92
96
  this.ownDevices[deviceName].playOnDevice(networkPath, duration, volumeOverride > -1
93
97
  ? volumeOverride
94
98
  : Math.min(volume, this.ownDevices[deviceName].settings.maxPlayOnAllVolume));
@@ -6,6 +6,8 @@ export declare class DachsDeviceSettings extends ActuatorSettings implements iDa
6
6
  /** @inheritDoc */
7
7
  disableHeatingRod: boolean;
8
8
  /** @inheritDoc */
9
+ disableDachsOwnWW: boolean;
10
+ /** @inheritDoc */
9
11
  batteryLevelTurnOnThreshold: number;
10
12
  /** @inheritDoc */
11
13
  batteryLevelBeforeNightTurnOnThreshold: number;
@@ -11,6 +11,8 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
11
11
  /** @inheritDoc */
12
12
  this.disableHeatingRod = false;
13
13
  /** @inheritDoc */
14
+ this.disableDachsOwnWW = false;
15
+ /** @inheritDoc */
14
16
  this.batteryLevelTurnOnThreshold = -1;
15
17
  /** @inheritDoc */
16
18
  this.batteryLevelBeforeNightTurnOnThreshold = -1;
@@ -30,22 +32,23 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
30
32
  this.winterMinimumPreNightHeatStorageTemp = 65;
31
33
  }
32
34
  fromPartialObject(data) {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
35
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
34
36
  this.disableHeatingRod = (_a = data.disableHeatingRod) !== null && _a !== void 0 ? _a : this.disableHeatingRod;
35
- this.refreshIntervalTime = (_b = data.refreshIntervalTime) !== null && _b !== void 0 ? _b : this.refreshIntervalTime;
37
+ this.disableDachsOwnWW = (_b = data.disableDachsOwnWW) !== null && _b !== void 0 ? _b : this.disableDachsOwnWW;
38
+ this.refreshIntervalTime = (_c = data.refreshIntervalTime) !== null && _c !== void 0 ? _c : this.refreshIntervalTime;
36
39
  this.batteryLevelBeforeNightTurnOnThreshold =
37
- (_c = data.batteryLevelBeforeNightTurnOnThreshold) !== null && _c !== void 0 ? _c : this.batteryLevelBeforeNightTurnOnThreshold;
38
- this.batteryLevelTurnOnThreshold = (_d = data.batteryLevelTurnOnThreshold) !== null && _d !== void 0 ? _d : this.batteryLevelTurnOnThreshold;
39
- this.batteryLevelHeatingRodThreshold = (_e = data.batteryLevelHeatingRodThreshold) !== null && _e !== void 0 ? _e : this.batteryLevelHeatingRodThreshold;
40
+ (_d = data.batteryLevelBeforeNightTurnOnThreshold) !== null && _d !== void 0 ? _d : this.batteryLevelBeforeNightTurnOnThreshold;
41
+ this.batteryLevelTurnOnThreshold = (_e = data.batteryLevelTurnOnThreshold) !== null && _e !== void 0 ? _e : this.batteryLevelTurnOnThreshold;
42
+ this.batteryLevelHeatingRodThreshold = (_f = data.batteryLevelHeatingRodThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelHeatingRodThreshold;
40
43
  this.batteryLevelPreventStartThreshold =
41
- (_f = data.batteryLevelPreventStartThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelPreventStartThreshold;
44
+ (_g = data.batteryLevelPreventStartThreshold) !== null && _g !== void 0 ? _g : this.batteryLevelPreventStartThreshold;
42
45
  this.batteryLevelPreventStartAtNightThreshold =
43
- (_g = data.batteryLevelPreventStartAtNightThreshold) !== null && _g !== void 0 ? _g : this.batteryLevelPreventStartAtNightThreshold;
44
- this.batteryLevelAllowStartThreshold = (_h = data.batteryLevelAllowStartThreshold) !== null && _h !== void 0 ? _h : this.batteryLevelAllowStartThreshold;
45
- this.warmWaterDesiredMinTemp = (_j = data.warmWaterDesiredMinTemp) !== null && _j !== void 0 ? _j : this.warmWaterDesiredMinTemp;
46
- this.winterMinimumHeatStorageTemp = (_k = data.winterMinimumHeatStorageTemp) !== null && _k !== void 0 ? _k : this.winterMinimumHeatStorageTemp;
46
+ (_h = data.batteryLevelPreventStartAtNightThreshold) !== null && _h !== void 0 ? _h : this.batteryLevelPreventStartAtNightThreshold;
47
+ this.batteryLevelAllowStartThreshold = (_j = data.batteryLevelAllowStartThreshold) !== null && _j !== void 0 ? _j : this.batteryLevelAllowStartThreshold;
48
+ this.warmWaterDesiredMinTemp = (_k = data.warmWaterDesiredMinTemp) !== null && _k !== void 0 ? _k : this.warmWaterDesiredMinTemp;
49
+ this.winterMinimumHeatStorageTemp = (_l = data.winterMinimumHeatStorageTemp) !== null && _l !== void 0 ? _l : this.winterMinimumHeatStorageTemp;
47
50
  this.winterMinimumPreNightHeatStorageTemp =
48
- (_l = data.winterMinimumPreNightHeatStorageTemp) !== null && _l !== void 0 ? _l : this.winterMinimumPreNightHeatStorageTemp;
51
+ (_m = data.winterMinimumPreNightHeatStorageTemp) !== null && _m !== void 0 ? _m : this.winterMinimumPreNightHeatStorageTemp;
49
52
  super.fromPartialObject(data);
50
53
  }
51
54
  toJSON() {
@@ -5,6 +5,18 @@ export declare class SonosDeviceSettings extends DeviceSettings {
5
5
  * @default 80
6
6
  */
7
7
  maxPlayOnAllVolume: number;
8
+ /**
9
+ * The default volume to inform of non critical stuff during daytime
10
+ * @type {number}
11
+ * @default 80
12
+ */
13
+ defaultDayAnounceVolume: number;
14
+ /**
15
+ * The default volume to inform of non critical stuff during nighttime
16
+ * @type {number}
17
+ * @default 80
18
+ */
19
+ defaultNightAnounceVolume: number;
8
20
  fromPartialObject(data: Partial<SonosDeviceSettings>): void;
9
21
  toJSON(): Partial<SonosDeviceSettings>;
10
22
  }
@@ -11,10 +11,24 @@ class SonosDeviceSettings extends deviceSettings_1.DeviceSettings {
11
11
  * @default 80
12
12
  */
13
13
  this.maxPlayOnAllVolume = 80;
14
+ /**
15
+ * The default volume to inform of non critical stuff during daytime
16
+ * @type {number}
17
+ * @default 80
18
+ */
19
+ this.defaultDayAnounceVolume = 80;
20
+ /**
21
+ * The default volume to inform of non critical stuff during nighttime
22
+ * @type {number}
23
+ * @default 80
24
+ */
25
+ this.defaultNightAnounceVolume = 40;
14
26
  }
15
27
  fromPartialObject(data) {
16
- var _a;
28
+ var _a, _b, _c;
17
29
  this.maxPlayOnAllVolume = (_a = data.maxPlayOnAllVolume) !== null && _a !== void 0 ? _a : this.maxPlayOnAllVolume;
30
+ this.defaultDayAnounceVolume = (_b = data.defaultDayAnounceVolume) !== null && _b !== void 0 ? _b : this.defaultDayAnounceVolume;
31
+ this.defaultNightAnounceVolume = (_c = data.defaultNightAnounceVolume) !== null && _c !== void 0 ? _c : this.defaultNightAnounceVolume;
18
32
  super.fromPartialObject(data);
19
33
  }
20
34
  toJSON() {