hoffmation-base 3.2.1-alpha.1 → 3.2.1-alpha.10
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.
- package/lib/action/actuatorChangeAction.js +1 -1
- package/lib/action/baseAction.d.ts +2 -1
- package/lib/action/baseAction.js +1 -2
- package/lib/action/batteryLevelChangeAction.js +1 -1
- package/lib/action/handleChangeAction.js +1 -1
- package/lib/action/humiditySensorChangeAction.js +1 -1
- package/lib/action/motionSensorAction.js +1 -1
- package/lib/action/presenceGroupAnyMovementAction.d.ts +2 -2
- package/lib/action/presenceGroupFirstEnterAction.d.ts +2 -2
- package/lib/action/presenceGroupLastLeftAction.d.ts +2 -2
- package/lib/action/shutterPositionChangedAction.js +1 -1
- package/lib/action/temperatureSensorChangeAction.js +1 -1
- package/lib/command/baseCommand.d.ts +7 -1
- package/lib/command/baseCommand.js +17 -8
- package/lib/devices/BaseDevice.js +8 -1
- package/lib/devices/CameraDevice.d.ts +1 -2
- package/lib/devices/CameraDevice.js +1 -10
- package/lib/devices/dachs/dachs.d.ts +0 -2
- package/lib/devices/dachs/dachs.js +11 -15
- package/lib/devices/dachs/dachsTemperatureSensor.js +1 -1
- package/lib/devices/espresense/detectedBluetoothDevice.d.ts +1 -2
- package/lib/devices/espresense/detectedBluetoothDevice.js +0 -3
- package/lib/devices/espresense/espresenseDevice.d.ts +1 -3
- package/lib/devices/espresense/espresenseDevice.js +0 -5
- package/lib/devices/govee/own-govee-device.js +0 -1
- package/lib/devices/hmIPDevices/hmIpRoll.d.ts +0 -2
- package/lib/devices/hmIPDevices/hmIpRoll.js +1 -7
- package/lib/devices/sharedFunctions/lampUtils.js +0 -1
- package/lib/devices/tv/tvDevice.js +2 -6
- package/lib/devices/velux/veluxShutter.d.ts +0 -2
- package/lib/devices/velux/veluxShutter.js +1 -7
- package/lib/devices/victron/victron-device.js +1 -1
- package/lib/interfaces/iJsonCustomPrepend.d.ts +9 -0
- package/lib/interfaces/iJsonCustomPrepend.js +2 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/index.js +1 -0
- package/lib/services/ac/ac-device.js +2 -6
- package/lib/services/ac/own-daikin-device.d.ts +0 -2
- package/lib/services/ac/own-daikin-device.js +1 -11
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/ringStorage.d.ts +1 -0
- package/lib/utils/ringStorage.js +3 -0
- package/lib/utils/utils.js +7 -1
- package/package.json +1 -1
package/lib/utils/ringStorage.js
CHANGED
package/lib/utils/utils.js
CHANGED
|
@@ -201,6 +201,12 @@ class Utils {
|
|
|
201
201
|
logging_1.ServerLogService.writeLog(enums_1.LogLevel.Warn, `DeepOmit Loop Level ${level} reached for ${currentKey}`);
|
|
202
202
|
}
|
|
203
203
|
const combinedOmmitKeys = [...keysToOmit, ...((_a = obj === null || obj === void 0 ? void 0 : obj.jsonOmitKeys) !== null && _a !== void 0 ? _a : [])];
|
|
204
|
+
if (obj === null || obj === void 0 ? void 0 : obj.customPrepend) {
|
|
205
|
+
obj = {
|
|
206
|
+
...obj,
|
|
207
|
+
...obj.customPrepend(),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
204
210
|
// the inner function which will be called recursivley
|
|
205
211
|
return lodash_1.default.transform(obj, (result, value, key) => {
|
|
206
212
|
if (value === undefined || value === null) {
|
|
@@ -214,10 +220,10 @@ class Utils {
|
|
|
214
220
|
return;
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
|
-
// transform to a new object
|
|
218
223
|
if (level === 1 && topLevelOmitKeys.includes(lowerKey)) {
|
|
219
224
|
return;
|
|
220
225
|
}
|
|
226
|
+
// transform to a new object
|
|
221
227
|
if (lowerKey.endsWith('map')) {
|
|
222
228
|
const newKey = lowerKey.replace('map', 'dict');
|
|
223
229
|
const dict = {};
|