hoffmation-base 3.0.0-alpha.2 → 3.0.0-alpha.21

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.
Files changed (185) hide show
  1. package/lib/liquid-pid.d.ts +2 -5
  2. package/lib/liquid-pid.js +2 -5
  3. package/lib/models/command/ShutterSetLevelCommand.d.ts +7 -0
  4. package/lib/models/command/ShutterSetLevelCommand.js +8 -1
  5. package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +5 -0
  6. package/lib/models/command/WindowRestoreDesiredPositionCommand.js +5 -0
  7. package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +6 -0
  8. package/lib/models/command/WindowSetDesiredPositionCommand.js +6 -0
  9. package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +5 -0
  10. package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +5 -0
  11. package/lib/models/command/actuatorSetStateCommand.d.ts +7 -0
  12. package/lib/models/command/actuatorSetStateCommand.js +9 -2
  13. package/lib/models/command/actuatorToggleCommand.d.ts +5 -0
  14. package/lib/models/command/actuatorToggleCommand.js +6 -1
  15. package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +7 -1
  16. package/lib/models/command/actuatorWriteStateToDeviceCommand.js +12 -2
  17. package/lib/models/command/baseCommand.d.ts +14 -1
  18. package/lib/models/command/baseCommand.js +40 -6
  19. package/lib/models/command/blockAutomaticCommand.d.ts +17 -0
  20. package/lib/models/command/blockAutomaticCommand.js +22 -0
  21. package/lib/models/command/blockAutomaticLiftBlockCommand.d.ts +12 -0
  22. package/lib/models/command/blockAutomaticLiftBlockCommand.js +17 -0
  23. package/lib/models/command/blockAutomaticUntilCommand.d.ts +17 -0
  24. package/lib/models/command/blockAutomaticUntilCommand.js +22 -0
  25. package/lib/models/command/commandSource.d.ts +19 -0
  26. package/lib/models/command/commandSource.js +20 -0
  27. package/lib/models/command/commandType.d.ts +3 -0
  28. package/lib/models/command/commandType.js +3 -0
  29. package/lib/models/command/dimmerSetLightCommand.d.ts +7 -6
  30. package/lib/models/command/dimmerSetLightCommand.js +13 -11
  31. package/lib/models/command/floorSetAllShuttersCommand.d.ts +4 -4
  32. package/lib/models/command/floorSetAllShuttersCommand.js +4 -4
  33. package/lib/models/command/index.d.ts +3 -0
  34. package/lib/models/command/index.js +7 -1
  35. package/lib/models/command/lampSetLightCommand.d.ts +7 -0
  36. package/lib/models/command/lampSetLightCommand.js +8 -1
  37. package/lib/models/command/lampSetTimeBasedCommand.d.ts +4 -4
  38. package/lib/models/command/lampSetTimeBasedCommand.js +5 -5
  39. package/lib/models/command/lampToggleLightCommand.d.ts +5 -5
  40. package/lib/models/command/lampToggleLightCommand.js +6 -6
  41. package/lib/models/command/ledSetLightCommand.d.ts +15 -9
  42. package/lib/models/command/ledSetLightCommand.js +16 -10
  43. package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +6 -0
  44. package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +6 -0
  45. package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +5 -0
  46. package/lib/models/command/restoreTargetAutomaticValueCommand.js +6 -1
  47. package/lib/models/command/roomRestoreLightCommand.d.ts +5 -0
  48. package/lib/models/command/roomRestoreLightCommand.js +5 -0
  49. package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +6 -0
  50. package/lib/models/command/roomRestoreShutterPositionCommand.js +6 -0
  51. package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +3 -3
  52. package/lib/models/command/roomSetLightTimeBasedCommand.js +3 -3
  53. package/lib/models/command/shutterSunriseUpCommand.d.ts +5 -0
  54. package/lib/models/command/shutterSunriseUpCommand.js +5 -0
  55. package/lib/models/command/shutterSunsetDownCommand.d.ts +5 -0
  56. package/lib/models/command/shutterSunsetDownCommand.js +5 -0
  57. package/lib/models/command/wledSetLightCommand.d.ts +11 -0
  58. package/lib/models/command/wledSetLightCommand.js +13 -0
  59. package/lib/models/connectionCallbacks.d.ts +4 -4
  60. package/lib/models/deviceConfig.d.ts +2 -2
  61. package/lib/models/deviceSettings/acSettings.d.ts +6 -5
  62. package/lib/models/deviceSettings/acSettings.js +10 -8
  63. package/lib/models/deviceSettings/actuatorSettings.d.ts +13 -4
  64. package/lib/models/deviceSettings/actuatorSettings.js +19 -9
  65. package/lib/models/deviceSettings/garageDoorOpenerSettings.d.ts +0 -1
  66. package/lib/models/deviceSettings/garageDoorOpenerSettings.js +0 -1
  67. package/lib/models/deviceSettings/heaterSettings.d.ts +0 -6
  68. package/lib/models/deviceSettings/heaterSettings.js +0 -6
  69. package/lib/models/deviceSettings/ledSettings.js +10 -18
  70. package/lib/models/deviceSettings/motionSensorSettings.d.ts +0 -1
  71. package/lib/models/deviceSettings/motionSensorSettings.js +0 -1
  72. package/lib/models/deviceSettings/shutterSettings.d.ts +0 -3
  73. package/lib/models/deviceSettings/shutterSettings.js +0 -3
  74. package/lib/models/deviceSettings/wledSettings.js +5 -13
  75. package/lib/models/groupSettings/heatGroupSettings.d.ts +3 -1
  76. package/lib/models/groupSettings/heatGroupSettings.js +3 -1
  77. package/lib/models/iIdHolder.d.ts +6 -0
  78. package/lib/models/objectSettings.d.ts +2 -2
  79. package/lib/models/objectSettings.js +2 -2
  80. package/lib/models/rooms/RoomBase.d.ts +2 -1
  81. package/lib/models/rooms/RoomBase.js +4 -3
  82. package/lib/models/rooms/iRoomBase.d.ts +17 -0
  83. package/lib/models/rooms/iRoomImportEnforcer.d.ts +4 -0
  84. package/lib/server/devices/Griffe.js +0 -1
  85. package/lib/server/devices/IoBrokerBaseDevice.d.ts +11 -16
  86. package/lib/server/devices/IoBrokerBaseDevice.js +21 -17
  87. package/lib/server/devices/IoBrokerDeviceInfo.d.ts +2 -2
  88. package/lib/server/devices/IoBrokerDeviceInfo.js +6 -4
  89. package/lib/server/devices/baseDeviceInterfaces/iAcDevice.d.ts +30 -3
  90. package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +16 -0
  91. package/lib/server/devices/baseDeviceInterfaces/iBaseDevice.d.ts +25 -0
  92. package/lib/server/devices/baseDeviceInterfaces/iBatteryDevice.d.ts +10 -1
  93. package/lib/server/devices/baseDeviceInterfaces/iBluetoothDetector.d.ts +5 -5
  94. package/lib/server/devices/baseDeviceInterfaces/iButtonSwitch.d.ts +13 -0
  95. package/lib/server/devices/baseDeviceInterfaces/iCameraDevice.d.ts +10 -0
  96. package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +9 -2
  97. package/lib/server/devices/baseDeviceInterfaces/iEnergyManager.d.ts +13 -2
  98. package/lib/server/devices/baseDeviceInterfaces/iExcessEnergyConsumer.d.ts +16 -2
  99. package/lib/server/devices/baseDeviceInterfaces/iGarageDoorOpener.d.ts +10 -0
  100. package/lib/server/devices/baseDeviceInterfaces/iHandleSensor.d.ts +12 -0
  101. package/lib/server/devices/baseDeviceInterfaces/iHeater.d.ts +12 -2
  102. package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +7 -0
  103. package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +4 -0
  104. package/lib/server/devices/baseDeviceInterfaces/iLedRgbCct.d.ts +5 -0
  105. package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +7 -1
  106. package/lib/server/devices/baseDeviceInterfaces/iScene.d.ts +7 -0
  107. package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +7 -0
  108. package/lib/server/devices/baseDeviceInterfaces/iSmokeDetectorDevice.d.ts +7 -0
  109. package/lib/server/devices/baseDeviceInterfaces/iSpeaker.d.ts +25 -0
  110. package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +11 -0
  111. package/lib/server/devices/baseDeviceInterfaces/iTemporaryDisableAutomatic.d.ts +7 -0
  112. package/lib/server/devices/baseDeviceInterfaces/iTvDevice.d.ts +12 -0
  113. package/lib/server/devices/baseDeviceInterfaces/iVibrationSensor.d.ts +0 -1
  114. package/lib/server/devices/blueIris/cameraDevice.d.ts +2 -3
  115. package/lib/server/devices/blueIris/cameraDevice.js +2 -3
  116. package/lib/server/devices/dachs/interfaces/KeyListEntity.d.ts +0 -8
  117. package/lib/server/devices/dachs/interfaces/KeyListEntity.js +0 -8
  118. package/lib/server/devices/dachs/lib/dachsHttpClient.d.ts +1 -1
  119. package/lib/server/devices/groups/Window.d.ts +1 -0
  120. package/lib/server/devices/groups/Window.js +1 -0
  121. package/lib/server/devices/groups/heatGroup.d.ts +7 -6
  122. package/lib/server/devices/groups/heatGroup.js +8 -9
  123. package/lib/server/devices/groups/lightGroup.d.ts +2 -2
  124. package/lib/server/devices/groups/lightGroup.js +11 -10
  125. package/lib/server/devices/groups/presenceGroup.d.ts +0 -1
  126. package/lib/server/devices/groups/presenceGroup.js +0 -1
  127. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +0 -1
  128. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +0 -6
  129. package/lib/server/devices/hmIPDevices/hmIpLampe.js +1 -2
  130. package/lib/server/devices/hmIPDevices/hmIpRoll.js +2 -2
  131. package/lib/server/devices/iDeviceUpdater.d.ts +11 -0
  132. package/lib/server/devices/jsObject/jsObjectEnergyManager.d.ts +1 -1
  133. package/lib/server/devices/jsObject/jsObjectEnergyManager.js +1 -1
  134. package/lib/server/devices/sharedFunctions/lampUtils.d.ts +1 -0
  135. package/lib/server/devices/sharedFunctions/lampUtils.js +32 -15
  136. package/lib/server/devices/wledDevice.d.ts +1 -0
  137. package/lib/server/devices/wledDevice.js +13 -8
  138. package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.js +1 -2
  139. package/lib/server/devices/zigbee/BaseDevices/zigbeeDevice.d.ts +0 -2
  140. package/lib/server/devices/zigbee/BaseDevices/zigbeeDevice.js +9 -18
  141. package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +8 -8
  142. package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.d.ts +2 -1
  143. package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +6 -4
  144. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.d.ts +1 -1
  145. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.js +1 -1
  146. package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +3 -3
  147. package/lib/server/devices/zigbee/BaseDevices/zigbeeSwitch.d.ts +1 -1
  148. package/lib/server/devices/zigbee/zigbeeAquaraVibra.d.ts +1 -1
  149. package/lib/server/devices/zigbee/zigbeeEuroHeater.d.ts +2 -3
  150. package/lib/server/devices/zigbee/zigbeeEuroHeater.js +2 -3
  151. package/lib/server/ioBroker/connection.d.ts +20 -20
  152. package/lib/server/ioBroker/connection.js +29 -21
  153. package/lib/server/ioBroker/socketIOConnectOptions.d.ts +2 -2
  154. package/lib/server/ioBroker/socketIOVisCommand.d.ts +5 -1
  155. package/lib/server/services/Sonos/polly-service.js +1 -2
  156. package/lib/server/services/Translation/res.d.ts +34 -19
  157. package/lib/server/services/Translation/res.js +34 -19
  158. package/lib/server/services/ac/ac-device.d.ts +0 -5
  159. package/lib/server/services/ac/ac-device.js +17 -18
  160. package/lib/server/services/ac/daikin-service.js +2 -1
  161. package/lib/server/services/ac/own-daikin-device.js +12 -4
  162. package/lib/server/services/api/api-service.d.ts +117 -52
  163. package/lib/server/services/api/api-service.js +160 -68
  164. package/lib/server/services/blockAutomaticHandler.d.ts +6 -8
  165. package/lib/server/services/blockAutomaticHandler.js +15 -13
  166. package/lib/server/services/dbo/iPersist.d.ts +96 -0
  167. package/lib/server/services/govee/own-govee-device.js +4 -7
  168. package/lib/server/services/https-service.d.ts +3 -2
  169. package/lib/server/services/https-service.js +3 -2
  170. package/lib/server/services/log-service/log-service.d.ts +2 -2
  171. package/lib/server/services/log-service/log-service.js +2 -2
  172. package/lib/server/services/news-service.d.ts +5 -6
  173. package/lib/server/services/news-service.js +5 -6
  174. package/lib/server/services/room-service/room-service.d.ts +3 -2
  175. package/lib/server/services/room-service/room-service.js +4 -3
  176. package/lib/server/services/settings-service.d.ts +3 -2
  177. package/lib/server/services/settings-service.js +3 -2
  178. package/lib/server/services/utils/iDisposeable.d.ts +3 -0
  179. package/lib/server/services/victron/victron-device.d.ts +2 -2
  180. package/lib/server/services/victron/victron-device.js +2 -2
  181. package/lib/server/services/weather/weather-current.d.ts +0 -2
  182. package/lib/server/services/weather/weather-service.d.ts +4 -1
  183. package/lib/server/services/weather/weather-service.js +4 -0
  184. package/lib/tsconfig.tsbuildinfo +1 -1
  185. package/package.json +6 -5
@@ -77,7 +77,7 @@ class OwnGoveeDevice {
77
77
  }
78
78
  log(level, message, debugType = log_service_1.LogDebugType.None) {
79
79
  var _a, _b;
80
- log_service_1.ServerLogService.writeLog(level, `${this.name}: ${message}`, {
80
+ log_service_1.ServerLogService.writeLog(level, message, {
81
81
  debugType: debugType,
82
82
  room: (_b = (_a = this._room) === null || _a === void 0 ? void 0 : _a.roomName) !== null && _b !== void 0 ? _b : '',
83
83
  deviceId: this.name,
@@ -109,7 +109,7 @@ class OwnGoveeDevice {
109
109
  if (c.on && c.brightness === -1 && this.brightness < 10) {
110
110
  c.brightness = 10;
111
111
  }
112
- this.log(models_1.LogLevel.Debug, c.logMessage);
112
+ this.log(models_1.LogLevel.Debug, c.logMessage, log_service_1.LogDebugType.SetActuator);
113
113
  const formattedColor = utils_1.Utils.formatHex(c.color);
114
114
  if (formattedColor !== null) {
115
115
  this.setColor(c.color);
@@ -118,10 +118,8 @@ class OwnGoveeDevice {
118
118
  if (devices_1.LampUtils.checkBlockActive(this, c)) {
119
119
  return;
120
120
  }
121
- this.log(models_1.LogLevel.Debug, `Set Light Acutator to "${c.on}" with brightness ${c.brightness}`, log_service_1.LogDebugType.SetActuator);
122
121
  if (c.brightness > -1 && c.on) {
123
122
  this.setBrightness(c.brightness, () => {
124
- this.log(models_1.LogLevel.Debug, `Brightness set to ${c.brightness}`);
125
123
  this.turnOn();
126
124
  });
127
125
  }
@@ -132,15 +130,14 @@ class OwnGoveeDevice {
132
130
  this.turnOff();
133
131
  }
134
132
  if (c.timeout > -1 && !dontBlock) {
135
- this.blockAutomationHandler.disableAutomatic(c.timeout, models_1.CollisionSolving.overrideIfGreater);
133
+ this.blockAutomationHandler.disableAutomatic(new models_1.BlockAutomaticCommand(c, c.timeout));
136
134
  }
137
135
  }
138
136
  setActuator(c) {
139
137
  this.setLight(new models_1.LedSetLightCommand(c, c.on, c.reason));
140
138
  }
141
139
  restoreTargetAutomaticValue(c) {
142
- this.log(models_1.LogLevel.Debug, `Restore Target Automatic value`);
143
- this.setActuator(new models_1.ActuatorSetStateCommand(c, this.targetAutomaticState, 'Restore Target Automatic value'));
140
+ this.setActuator(new models_1.ActuatorSetStateCommand(c, this.targetAutomaticState));
144
141
  }
145
142
  persist() {
146
143
  var _a;
@@ -4,8 +4,9 @@ export declare class HTTPSService {
4
4
  /**
5
5
  * Downloads a file from a given url to the given location.
6
6
  * If the location doesn't exist, it will be created quietly.
7
- * @param url URL to download file from
8
- * @param filePath Path to save file to
7
+ * @param url - URL to download file from
8
+ * @param filePath - Path to save file to
9
+ * @returns A promise that resolves to true if the file was downloaded successfully, false otherwise
9
10
  */
10
11
  static downloadFile(url: string, filePath: string): Promise<boolean>;
11
12
  private static defaultCallback;
@@ -65,8 +65,9 @@ class HTTPSService {
65
65
  /**
66
66
  * Downloads a file from a given url to the given location.
67
67
  * If the location doesn't exist, it will be created quietly.
68
- * @param url URL to download file from
69
- * @param filePath Path to save file to
68
+ * @param url - URL to download file from
69
+ * @param filePath - Path to save file to
70
+ * @returns A promise that resolves to true if the file was downloaded successfully, false otherwise
70
71
  */
71
72
  static async downloadFile(url, filePath) {
72
73
  return new Promise((resolve, reject) => {
@@ -17,8 +17,8 @@ export declare class ServerLogService {
17
17
  static missingRoomIndexHandling(pRoomName: string, pIndex: number, pDeviceType: DeviceType): void;
18
18
  /**
19
19
  * Checks if this message is of a debugtype which should be skipped according to settings
20
- * @param {LogDebugType} debugType
21
- * @returns {boolean} If the Message should be skipped
20
+ * @param debugType - {LogDebugType}
21
+ * @returns If the Message should be skipped
22
22
  */
23
23
  private static checkDebugLogSkip;
24
24
  }
@@ -60,8 +60,8 @@ class ServerLogService {
60
60
  }
61
61
  /**
62
62
  * Checks if this message is of a debugtype which should be skipped according to settings
63
- * @param {LogDebugType} debugType
64
- * @returns {boolean} If the Message should be skipped
63
+ * @param debugType - {LogDebugType}
64
+ * @returns If the Message should be skipped
65
65
  */
66
66
  static checkDebugLogSkip(debugType) {
67
67
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -25,17 +25,16 @@ export declare class NewsService {
25
25
  static getLatestNews(): void;
26
26
  /**
27
27
  * Plays the latest news on a sonos device
28
- * @param speaker Sonos device to play from
29
- * @param volume volume to play at
30
- * @param retries Number of times playing should be tried if there is currently no audio file available
28
+ * @param speaker - Sonos device to play from
29
+ * @param volume - volume to play at
30
+ * @param retries - Number of times playing should be tried if there is currently no audio file available
31
31
  */
32
32
  static playLastNews(speaker: iSpeaker, volume?: number, retries?: number): void;
33
33
  private static downloadLatestFileFromFeed;
34
34
  /**
35
35
  * Deletes all files in the given directory that are older than the given age.
36
- * @param rootDir Directory to search in
37
- * @param keepMaxAge Maximum age in minutes until a file gets deleted
38
- * @private
36
+ * @param rootDir - Directory to search in
37
+ * @param keepMaxAge - Maximum age in minutes until a file gets deleted
39
38
  */
40
39
  private static cleanOldFiles;
41
40
  }
@@ -96,9 +96,9 @@ class NewsService {
96
96
  }
97
97
  /**
98
98
  * Plays the latest news on a sonos device
99
- * @param speaker Sonos device to play from
100
- * @param volume volume to play at
101
- * @param retries Number of times playing should be tried if there is currently no audio file available
99
+ * @param speaker - Sonos device to play from
100
+ * @param volume - volume to play at
101
+ * @param retries - Number of times playing should be tried if there is currently no audio file available
102
102
  */
103
103
  static playLastNews(speaker, volume = 30, retries = 5) {
104
104
  if (!NewsService.lastNewsAudioFile) {
@@ -167,9 +167,8 @@ class NewsService {
167
167
  }
168
168
  /**
169
169
  * Deletes all files in the given directory that are older than the given age.
170
- * @param rootDir Directory to search in
171
- * @param keepMaxAge Maximum age in minutes until a file gets deleted
172
- * @private
170
+ * @param rootDir - Directory to search in
171
+ * @param keepMaxAge - Maximum age in minutes until a file gets deleted
173
172
  */
174
173
  static cleanOldFiles(rootDir, keepMaxAge) {
175
174
  let deleteCount = 0;
@@ -16,13 +16,14 @@ export declare class RoomService {
16
16
  static getAllRoomsOfFloor(floor: number): IterableIterator<[string, RoomBase]>;
17
17
  /**
18
18
  * Moves all shutters of the desired floor(s) to the desired position
19
+ * @param c - the command to be executed on all windows of the desired floor(s)
19
20
  */
20
21
  static setAllShutterOfFloor(c: FloorSetAllShuttersCommand): void;
21
22
  /**
22
23
  * Set ALl Lamps of a specific floor
23
24
  * !!floor -1 sets all lamps in house instead!!
24
- * @param floor the level on which all lamps shall be changed -1 equals all rooms
25
- * @param command the command to be executed
25
+ * @param floor - {number} the level on which all lamps shall be changed -1 equals all rooms
26
+ * @param command - {ActuatorSetStateCommand} the command to be executed
26
27
  */
27
28
  static setAllLampsOfFloor(floor: number, command: ActuatorSetStateCommand): void;
28
29
  static clearAllAlarms(): void;
@@ -16,6 +16,7 @@ class RoomService {
16
16
  }
17
17
  /**
18
18
  * Moves all shutters of the desired floor(s) to the desired position
19
+ * @param c - the command to be executed on all windows of the desired floor(s)
19
20
  */
20
21
  static setAllShutterOfFloor(c) {
21
22
  var _a;
@@ -27,8 +28,8 @@ class RoomService {
27
28
  /**
28
29
  * Set ALl Lamps of a specific floor
29
30
  * !!floor -1 sets all lamps in house instead!!
30
- * @param floor the level on which all lamps shall be changed -1 equals all rooms
31
- * @param command the command to be executed
31
+ * @param floor - {number} the level on which all lamps shall be changed -1 equals all rooms
32
+ * @param command - {ActuatorSetStateCommand} the command to be executed
32
33
  */
33
34
  static setAllLampsOfFloor(floor, command) {
34
35
  var _a, _b, _c, _d;
@@ -92,7 +93,7 @@ class RoomService {
92
93
  }
93
94
  static endAlarmModes() {
94
95
  if (this.awayModeActive) {
95
- Telegram_1.TelegramService.sendMessage(Telegram_1.TelegramService.subscribedIDs, `Alarmanalage entschärft`);
96
+ Telegram_1.TelegramService.sendMessage(Telegram_1.TelegramService.subscribedIDs, `Alarm Mode disarmed`);
96
97
  Sonos_1.SonosService.speakOnAll(Translation_1.Res.welcomeHome(), 35);
97
98
  }
98
99
  if (this.nightAlarmActive) {
@@ -8,8 +8,9 @@ export declare class SettingsService {
8
8
  static get latitude(): number;
9
9
  static get longitude(): number;
10
10
  /**
11
- * @deprecated Only use in unit tests
12
- * @returns {iConfig}
11
+ * Generates a fresh Test configuration.
12
+ * @returns The test configuration.
13
+ * @deprecated Only use in unit tests.
13
14
  */
14
15
  static get testConfig(): iConfig;
15
16
  }
@@ -37,8 +37,9 @@ class SettingsService {
37
37
  return 7.097266042276687;
38
38
  }
39
39
  /**
40
- * @deprecated Only use in unit tests
41
- * @returns {iConfig}
40
+ * Generates a fresh Test configuration.
41
+ * @returns The test configuration.
42
+ * @deprecated Only use in unit tests.
42
43
  */
43
44
  static get testConfig() {
44
45
  return {
@@ -1,3 +1,6 @@
1
1
  export interface iDisposable {
2
+ /**
3
+ * Dispose of the object --> free up resources, disable timeouts/intervals, etc.
4
+ */
2
5
  dispose(): void;
3
6
  }
@@ -29,7 +29,7 @@ export declare class VictronDevice implements iEnergyManager {
29
29
  get injectingWattage(): number;
30
30
  get drawingWattage(): number;
31
31
  get selfConsumingWattage(): number;
32
- cleanup(): void;
32
+ dispose(): void;
33
33
  getReport(): string;
34
34
  recalculatePowerSharing(): void;
35
35
  loadDeviceSettings(): void;
@@ -38,7 +38,7 @@ export declare class VictronDevice implements iEnergyManager {
38
38
  toJSON(): Partial<VictronDevice>;
39
39
  /**
40
40
  * Changes the grid set point of the Victron device, to the desired value.
41
- * @param {number} setPoint
41
+ * @param setPoint - The desired watt point the system should aim for.
42
42
  */
43
43
  setGridSetPoint(setPoint: number): void;
44
44
  private calculateExcessEnergy;
@@ -73,7 +73,7 @@ class VictronDevice {
73
73
  var _a;
74
74
  return Math.max((_a = this.victronConsumer.data.system.power) !== null && _a !== void 0 ? _a : 0, 0) - this.drawingWattage;
75
75
  }
76
- cleanup() {
76
+ dispose() {
77
77
  this._victronConsumer.disconnect();
78
78
  if (this._iDatabaseLoggerInterval !== null) {
79
79
  clearInterval(this._iDatabaseLoggerInterval);
@@ -122,7 +122,7 @@ class VictronDevice {
122
122
  }
123
123
  /**
124
124
  * Changes the grid set point of the Victron device, to the desired value.
125
- * @param {number} setPoint
125
+ * @param setPoint - The desired watt point the system should aim for.
126
126
  */
127
127
  setGridSetPoint(setPoint) {
128
128
  this._victronConsumer.setGridSetPoint(setPoint);
@@ -2,8 +2,6 @@ import { WeatherItem } from './weather-item';
2
2
  export interface WeatherCurrent {
3
3
  /**
4
4
  * Zeit der Anfrage
5
- * @type {number}
6
- * @memberof WeatherCurrent
7
5
  */
8
6
  dt: number;
9
7
  sunrise: number;
@@ -24,7 +24,6 @@ export declare class WeatherService {
24
24
  static lastResponse: WeatherResponse;
25
25
  /**
26
26
  * The sun horizontal degree (0 is North)
27
- * @type {number}
28
27
  */
29
28
  static sunDirection: number;
30
29
  private static _dataUpdateCbs;
@@ -46,5 +45,9 @@ export declare class WeatherService {
46
45
  private static getActiveAlerts;
47
46
  private static getWeatherData;
48
47
  private static recalcAzimuth;
48
+ /**
49
+ * Method to calculate the hours until sunset based on the current location
50
+ * @returns - The hours until sunset
51
+ */
49
52
  private static hoursTilSunset;
50
53
  }
@@ -218,6 +218,10 @@ class WeatherService {
218
218
  180 +
219
219
  (180 / Math.PI) * suncalc_1.default.getPosition(new Date(), parseFloat(this.latitude), parseFloat(this.longitude)).azimuth;
220
220
  }
221
+ /**
222
+ * Method to calculate the hours until sunset based on the current location
223
+ * @returns - The hours until sunset
224
+ */
221
225
  static hoursTilSunset() {
222
226
  const now = new Date();
223
227
  const sunset = time_callback_service_1.TimeCallbackService.getSunsetForDate(now, parseFloat(this.latitude), parseFloat(this.longitude));