hoffmation-base 3.0.0-alpha.20 → 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 (159) 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 +7 -1
  5. package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +5 -0
  6. package/lib/models/command/WindowRestoreDesiredPositionCommand.js +5 -1
  7. package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +6 -0
  8. package/lib/models/command/WindowSetDesiredPositionCommand.js +6 -1
  9. package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +5 -0
  10. package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +5 -1
  11. package/lib/models/command/actuatorSetStateCommand.d.ts +7 -0
  12. package/lib/models/command/actuatorSetStateCommand.js +7 -1
  13. package/lib/models/command/actuatorToggleCommand.d.ts +5 -0
  14. package/lib/models/command/actuatorToggleCommand.js +5 -1
  15. package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +6 -0
  16. package/lib/models/command/actuatorWriteStateToDeviceCommand.js +6 -1
  17. package/lib/models/command/baseCommand.d.ts +10 -0
  18. package/lib/models/command/baseCommand.js +16 -1
  19. package/lib/models/command/blockAutomaticCommand.d.ts +4 -4
  20. package/lib/models/command/blockAutomaticCommand.js +4 -4
  21. package/lib/models/command/blockAutomaticLiftBlockCommand.d.ts +2 -2
  22. package/lib/models/command/blockAutomaticLiftBlockCommand.js +2 -2
  23. package/lib/models/command/blockAutomaticUntilCommand.d.ts +4 -4
  24. package/lib/models/command/blockAutomaticUntilCommand.js +4 -4
  25. package/lib/models/command/commandSource.d.ts +19 -0
  26. package/lib/models/command/commandSource.js +20 -1
  27. package/lib/models/command/dimmerSetLightCommand.d.ts +7 -6
  28. package/lib/models/command/dimmerSetLightCommand.js +7 -6
  29. package/lib/models/command/floorSetAllShuttersCommand.d.ts +4 -4
  30. package/lib/models/command/floorSetAllShuttersCommand.js +4 -4
  31. package/lib/models/command/lampSetLightCommand.d.ts +7 -0
  32. package/lib/models/command/lampSetLightCommand.js +7 -1
  33. package/lib/models/command/lampSetTimeBasedCommand.d.ts +4 -4
  34. package/lib/models/command/lampSetTimeBasedCommand.js +4 -4
  35. package/lib/models/command/lampToggleLightCommand.d.ts +5 -5
  36. package/lib/models/command/lampToggleLightCommand.js +5 -5
  37. package/lib/models/command/ledSetLightCommand.d.ts +15 -9
  38. package/lib/models/command/ledSetLightCommand.js +15 -10
  39. package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +6 -0
  40. package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +6 -1
  41. package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +5 -0
  42. package/lib/models/command/restoreTargetAutomaticValueCommand.js +5 -1
  43. package/lib/models/command/roomRestoreLightCommand.d.ts +5 -0
  44. package/lib/models/command/roomRestoreLightCommand.js +5 -1
  45. package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +6 -0
  46. package/lib/models/command/roomRestoreShutterPositionCommand.js +6 -1
  47. package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +3 -3
  48. package/lib/models/command/roomSetLightTimeBasedCommand.js +3 -3
  49. package/lib/models/command/shutterSunriseUpCommand.d.ts +5 -0
  50. package/lib/models/command/shutterSunriseUpCommand.js +5 -1
  51. package/lib/models/command/shutterSunsetDownCommand.d.ts +5 -0
  52. package/lib/models/command/shutterSunsetDownCommand.js +5 -1
  53. package/lib/models/command/wledSetLightCommand.d.ts +10 -0
  54. package/lib/models/command/wledSetLightCommand.js +10 -1
  55. package/lib/models/connectionCallbacks.d.ts +4 -4
  56. package/lib/models/deviceConfig.d.ts +2 -2
  57. package/lib/models/deviceSettings/acSettings.d.ts +0 -5
  58. package/lib/models/deviceSettings/acSettings.js +0 -5
  59. package/lib/models/deviceSettings/actuatorSettings.d.ts +0 -8
  60. package/lib/models/deviceSettings/actuatorSettings.js +0 -8
  61. package/lib/models/deviceSettings/garageDoorOpenerSettings.d.ts +0 -1
  62. package/lib/models/deviceSettings/garageDoorOpenerSettings.js +0 -1
  63. package/lib/models/deviceSettings/heaterSettings.d.ts +0 -6
  64. package/lib/models/deviceSettings/heaterSettings.js +0 -6
  65. package/lib/models/deviceSettings/motionSensorSettings.d.ts +0 -1
  66. package/lib/models/deviceSettings/motionSensorSettings.js +0 -1
  67. package/lib/models/deviceSettings/shutterSettings.d.ts +0 -3
  68. package/lib/models/deviceSettings/shutterSettings.js +0 -3
  69. package/lib/models/groupSettings/heatGroupSettings.d.ts +0 -2
  70. package/lib/models/groupSettings/heatGroupSettings.js +0 -2
  71. package/lib/models/iIdHolder.d.ts +6 -0
  72. package/lib/models/objectSettings.d.ts +2 -2
  73. package/lib/models/objectSettings.js +2 -2
  74. package/lib/models/rooms/RoomBase.d.ts +2 -1
  75. package/lib/models/rooms/RoomBase.js +2 -1
  76. package/lib/models/rooms/iRoomBase.d.ts +17 -0
  77. package/lib/models/rooms/iRoomImportEnforcer.d.ts +4 -0
  78. package/lib/server/devices/Griffe.js +0 -1
  79. package/lib/server/devices/IoBrokerBaseDevice.d.ts +9 -16
  80. package/lib/server/devices/IoBrokerBaseDevice.js +9 -16
  81. package/lib/server/devices/IoBrokerDeviceInfo.d.ts +2 -2
  82. package/lib/server/devices/IoBrokerDeviceInfo.js +6 -4
  83. package/lib/server/devices/baseDeviceInterfaces/iAcDevice.d.ts +32 -0
  84. package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +16 -0
  85. package/lib/server/devices/baseDeviceInterfaces/iBaseDevice.d.ts +25 -0
  86. package/lib/server/devices/baseDeviceInterfaces/iBatteryDevice.d.ts +10 -1
  87. package/lib/server/devices/baseDeviceInterfaces/iBluetoothDetector.d.ts +5 -5
  88. package/lib/server/devices/baseDeviceInterfaces/iButtonSwitch.d.ts +13 -0
  89. package/lib/server/devices/baseDeviceInterfaces/iCameraDevice.d.ts +10 -0
  90. package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +9 -2
  91. package/lib/server/devices/baseDeviceInterfaces/iEnergyManager.d.ts +13 -2
  92. package/lib/server/devices/baseDeviceInterfaces/iExcessEnergyConsumer.d.ts +16 -2
  93. package/lib/server/devices/baseDeviceInterfaces/iGarageDoorOpener.d.ts +10 -0
  94. package/lib/server/devices/baseDeviceInterfaces/iHandleSensor.d.ts +12 -0
  95. package/lib/server/devices/baseDeviceInterfaces/iHeater.d.ts +12 -2
  96. package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +7 -0
  97. package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +4 -0
  98. package/lib/server/devices/baseDeviceInterfaces/iLedRgbCct.d.ts +5 -0
  99. package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +7 -1
  100. package/lib/server/devices/baseDeviceInterfaces/iScene.d.ts +7 -0
  101. package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +7 -0
  102. package/lib/server/devices/baseDeviceInterfaces/iSmokeDetectorDevice.d.ts +7 -0
  103. package/lib/server/devices/baseDeviceInterfaces/iSpeaker.d.ts +25 -0
  104. package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +11 -0
  105. package/lib/server/devices/baseDeviceInterfaces/iTemporaryDisableAutomatic.d.ts +7 -0
  106. package/lib/server/devices/baseDeviceInterfaces/iTvDevice.d.ts +12 -0
  107. package/lib/server/devices/baseDeviceInterfaces/iVibrationSensor.d.ts +0 -1
  108. package/lib/server/devices/blueIris/cameraDevice.d.ts +2 -3
  109. package/lib/server/devices/blueIris/cameraDevice.js +2 -3
  110. package/lib/server/devices/dachs/interfaces/KeyListEntity.d.ts +0 -8
  111. package/lib/server/devices/dachs/interfaces/KeyListEntity.js +0 -8
  112. package/lib/server/devices/dachs/lib/dachsHttpClient.d.ts +1 -1
  113. package/lib/server/devices/groups/Window.d.ts +1 -0
  114. package/lib/server/devices/groups/Window.js +1 -0
  115. package/lib/server/devices/groups/heatGroup.d.ts +6 -6
  116. package/lib/server/devices/groups/heatGroup.js +6 -6
  117. package/lib/server/devices/groups/presenceGroup.d.ts +0 -1
  118. package/lib/server/devices/groups/presenceGroup.js +0 -1
  119. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +0 -1
  120. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +0 -6
  121. package/lib/server/devices/iDeviceUpdater.d.ts +11 -0
  122. package/lib/server/devices/jsObject/jsObjectEnergyManager.d.ts +1 -1
  123. package/lib/server/devices/jsObject/jsObjectEnergyManager.js +1 -1
  124. package/lib/server/devices/sharedFunctions/lampUtils.js +3 -1
  125. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.d.ts +1 -1
  126. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.js +1 -1
  127. package/lib/server/devices/zigbee/BaseDevices/zigbeeSwitch.d.ts +1 -1
  128. package/lib/server/devices/zigbee/zigbeeAquaraVibra.d.ts +1 -1
  129. package/lib/server/devices/zigbee/zigbeeEuroHeater.d.ts +2 -3
  130. package/lib/server/devices/zigbee/zigbeeEuroHeater.js +2 -3
  131. package/lib/server/ioBroker/connection.d.ts +20 -20
  132. package/lib/server/ioBroker/connection.js +29 -21
  133. package/lib/server/ioBroker/socketIOConnectOptions.d.ts +2 -2
  134. package/lib/server/ioBroker/socketIOVisCommand.d.ts +5 -1
  135. package/lib/server/services/Sonos/polly-service.js +1 -2
  136. package/lib/server/services/Translation/res.d.ts +34 -19
  137. package/lib/server/services/Translation/res.js +34 -19
  138. package/lib/server/services/api/api-service.d.ts +72 -70
  139. package/lib/server/services/api/api-service.js +72 -70
  140. package/lib/server/services/blockAutomaticHandler.js +5 -0
  141. package/lib/server/services/dbo/iPersist.d.ts +96 -0
  142. package/lib/server/services/https-service.d.ts +3 -2
  143. package/lib/server/services/https-service.js +3 -2
  144. package/lib/server/services/log-service/log-service.d.ts +2 -2
  145. package/lib/server/services/log-service/log-service.js +2 -2
  146. package/lib/server/services/news-service.d.ts +5 -6
  147. package/lib/server/services/news-service.js +5 -6
  148. package/lib/server/services/room-service/room-service.d.ts +3 -2
  149. package/lib/server/services/room-service/room-service.js +4 -3
  150. package/lib/server/services/settings-service.d.ts +3 -2
  151. package/lib/server/services/settings-service.js +3 -2
  152. package/lib/server/services/utils/iDisposeable.d.ts +3 -0
  153. package/lib/server/services/victron/victron-device.d.ts +2 -2
  154. package/lib/server/services/victron/victron-device.js +2 -2
  155. package/lib/server/services/weather/weather-current.d.ts +0 -2
  156. package/lib/server/services/weather/weather-service.d.ts +4 -1
  157. package/lib/server/services/weather/weather-service.js +4 -0
  158. package/lib/tsconfig.tsbuildinfo +1 -1
  159. package/package.json +6 -5
@@ -2,26 +2,122 @@ import { ButtonPressType, iAcDevice, iActuator, iBaseDevice, iBatteryDevice, iBu
2
2
  import { CountToday, DesiredShutterPosition, EnergyCalculation, RoomBase, ShutterCalibration } from '../../../models';
3
3
  export interface iPersist {
4
4
  initialized: boolean;
5
+ /**
6
+ * Adds a room to the database
7
+ * @param {RoomBase} room - The room to add
8
+ */
5
9
  addRoom(room: RoomBase): void;
10
+ /**
11
+ * Adds a device to the database
12
+ * @param {iBaseDevice} device - The device to add
13
+ */
6
14
  addDevice(device: iBaseDevice): void;
15
+ /**
16
+ * Gets the count of the motion sensor today
17
+ * @param {iMotionSensor} device - The device to get the count for
18
+ * @returns {Promise<CountToday>} - The count of the motion sensor today
19
+ */
7
20
  motionSensorTodayCount(device: iMotionSensor): Promise<CountToday>;
21
+ /**
22
+ * Gets the last desired position of the shutter
23
+ * @param {iShutter} device - The device to get the last desired position for
24
+ * @returns {Promise<DesiredShutterPosition>} - The last desired position of the shutter
25
+ */
8
26
  getLastDesiredPosition(device: iShutter): Promise<DesiredShutterPosition>;
27
+ /**
28
+ * Gets the shutter calibration
29
+ * @param {iShutter} device - The device to get the shutter calibration for
30
+ * @returns {Promise<ShutterCalibration>} - The shutter calibration
31
+ */
9
32
  getShutterCalibration(device: iShutter): Promise<ShutterCalibration>;
33
+ /**
34
+ * Initializes the database-connection and prepares the database
35
+ * @returns {Promise<void>} - The promise that resolves when the database is initialized
36
+ */
10
37
  initialize(): Promise<void>;
38
+ /**
39
+ * Persists the shutter calibration
40
+ * @param {ShutterCalibration} data - The shutter calibration data to persist
41
+ */
11
42
  persistShutterCalibration(data: ShutterCalibration): void;
43
+ /**
44
+ * Persists data for an illumination sensor
45
+ * @param {iIlluminationSensor} device - The device to persist data for
46
+ */
12
47
  persistIlluminationSensor(device: iIlluminationSensor): void;
48
+ /**
49
+ * Persists data for an energy manager
50
+ * @param {EnergyCalculation} energyData - The energy data to persist
51
+ */
13
52
  persistEnergyManager(energyData: EnergyCalculation): void;
53
+ /**
54
+ * Persists data of an AC device
55
+ * @param {iAcDevice} device - The device to persist data for
56
+ */
14
57
  persistAC(device: iAcDevice): void;
58
+ /**
59
+ * Persists data of an actuator
60
+ * @param {iActuator} device - The device to persist data for
61
+ */
15
62
  persistActuator(device: iActuator): void;
63
+ /**
64
+ * Persists data of a heater
65
+ * @param {iHeater} device - The device to persist data for
66
+ */
16
67
  persistHeater(device: iHeater): void;
68
+ /**
69
+ * Persists data of a motion sensor
70
+ * @param {iMotionSensor} device - The device to persist data for
71
+ */
17
72
  persistMotionSensor(device: iMotionSensor): void;
73
+ /**
74
+ * Persists data of a button switch action
75
+ * @param {iButtonSwitch} device - The device to persist data for
76
+ * @param {ButtonPressType} pressType - The type of button press
77
+ * @param {string} buttonName - The name of the button
78
+ */
18
79
  persistSwitchInput(device: iButtonSwitch, pressType: ButtonPressType, buttonName: string): void;
80
+ /**
81
+ * Persists data of a shutter
82
+ * @param {iShutter} device - The device to persist data for
83
+ */
19
84
  persistShutter(device: iShutter): void;
85
+ /**
86
+ * Persists data of a temperature sensor
87
+ * @param {iTemperatureSensor} device - The device to persist data for
88
+ */
20
89
  persistTemperatureSensor(device: iTemperatureSensor): void;
90
+ /**
91
+ * Persists data of a humidity sensor
92
+ * @param {iHumiditySensor} device - The device to persist data for
93
+ */
21
94
  persistHumiditySensor(device: iHumiditySensor): void;
95
+ /**
96
+ * Persists data of a handle sensor
97
+ * @param {iHandleSensor} device - The device to persist data for
98
+ */
22
99
  persistHandleSensor(device: iHandleSensor): void;
100
+ /**
101
+ * Persists data of a battery device
102
+ * @param {iBatteryDevice} device - The device to persist data for
103
+ */
23
104
  persistBatteryDevice(device: iBatteryDevice): void;
105
+ /**
106
+ * Persists data of a Zigbee device
107
+ * @param {ZigbeeDevice} device - The device to persist data for
108
+ */
24
109
  persistZigbeeDevice(device: ZigbeeDevice): void;
110
+ /**
111
+ * Persists settings for the given id
112
+ * @param {string} id - The id to persist settings for
113
+ * @param {string} settings - The settings to persist (as JSON string)
114
+ * @param {string} customname - The custom name of the device/object
115
+ */
25
116
  persistSettings(id: string, settings: string, customname: string): void;
117
+ /**
118
+ * Loads settings for the given id
119
+ * @param {string} id - The id of the object/device to load settings for
120
+ * @returns {Promise<string | undefined>} - The settings as JSON string or undefined if not found
121
+ */
26
122
  loadSettings(id: string): Promise<string | undefined>;
27
123
  }
@@ -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));