homebridge-melcloud-control 4.0.0-beta.54 → 4.0.0-beta.55
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/package.json +1 -1
- package/src/melcloud.js +5 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.55",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/melcloud.js
CHANGED
|
@@ -219,7 +219,7 @@ class MelCloud extends EventEmitter {
|
|
|
219
219
|
const devices = allDevices.map(device => {
|
|
220
220
|
const settingsArray = device.Settings || device.settings || [];
|
|
221
221
|
|
|
222
|
-
// Konwersja tablicy [{ name, value }] → { Name: Value } z
|
|
222
|
+
// Konwersja tablicy [{ name, value }] → { Name: Value } z poprawnym typem
|
|
223
223
|
const settingsObject = Object.fromEntries(
|
|
224
224
|
settingsArray.map(({ name, value }) => {
|
|
225
225
|
let parsedValue = value;
|
|
@@ -233,7 +233,7 @@ class MelCloud extends EventEmitter {
|
|
|
233
233
|
})
|
|
234
234
|
);
|
|
235
235
|
|
|
236
|
-
// Scal Capabilities + Settings w Device
|
|
236
|
+
// Scal Capabilities + Settings w Device + dodaj DeviceType
|
|
237
237
|
const deviceObject = {
|
|
238
238
|
...Object.fromEntries(
|
|
239
239
|
Object.entries(device.Capabilities || {}).map(([key, value]) => [
|
|
@@ -241,7 +241,8 @@ class MelCloud extends EventEmitter {
|
|
|
241
241
|
value
|
|
242
242
|
])
|
|
243
243
|
),
|
|
244
|
-
...settingsObject
|
|
244
|
+
...settingsObject,
|
|
245
|
+
DeviceType: device.Type
|
|
245
246
|
};
|
|
246
247
|
|
|
247
248
|
// Usuń stare pola Settings i Capabilities
|
|
@@ -255,6 +256,7 @@ class MelCloud extends EventEmitter {
|
|
|
255
256
|
};
|
|
256
257
|
});
|
|
257
258
|
|
|
259
|
+
|
|
258
260
|
await this.functions.saveData(this.devicesFile, devices);
|
|
259
261
|
if (this.logDebug) this.emit('debug', `${devicesCount} devices saved`);
|
|
260
262
|
|