homebridge-melcloud-control 4.1.2-beta.83 → 4.1.2-beta.85
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/homebridge-ui/public/index.html +0 -11
- package/package.json +1 -1
- package/src/deviceata.js +2 -4
- package/src/melcloudata.js +3 -2
|
@@ -276,17 +276,6 @@
|
|
|
276
276
|
const deviceId = String(device.DeviceID);
|
|
277
277
|
let deviceInConfig = configDevicesMap.get(deviceId);
|
|
278
278
|
|
|
279
|
-
// === Remove placeholder devices with id '0' before adding new ===
|
|
280
|
-
const beforeDevicesCount = devicesInConfig.length;
|
|
281
|
-
devicesInConfig = devicesInConfig.filter(d => String(d.id) !== '0');
|
|
282
|
-
if (devicesInConfig.length !== beforeDevicesCount) {
|
|
283
|
-
updateInfo('info2', `Removed placeholder devices with id '0'`, 'yellow');
|
|
284
|
-
|
|
285
|
-
// Rebuild map after filtering
|
|
286
|
-
configDevicesMap.clear();
|
|
287
|
-
devicesInConfig.forEach(dev => configDevicesMap.set(String(dev.id), dev));
|
|
288
|
-
}
|
|
289
|
-
|
|
290
279
|
// === Create device if missing ===
|
|
291
280
|
if (!deviceInConfig) {
|
|
292
281
|
deviceInConfig = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.1.2-beta.
|
|
4
|
+
"version": "4.1.2-beta.85",
|
|
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/deviceata.js
CHANGED
|
@@ -751,8 +751,6 @@ class DeviceAta extends EventEmitter {
|
|
|
751
751
|
if (this.logDebug) this.emit('debug', `Prepare schedules services`);
|
|
752
752
|
this.schedulesServices = [];
|
|
753
753
|
this.schedules.forEach((schedule, i) => {
|
|
754
|
-
const scheduleData = schedulesOnServer.find(p => p.Id === schedule.id);
|
|
755
|
-
|
|
756
754
|
//get preset name
|
|
757
755
|
const name = schedule.name;
|
|
758
756
|
|
|
@@ -772,8 +770,8 @@ class DeviceAta extends EventEmitter {
|
|
|
772
770
|
})
|
|
773
771
|
.onSet(async (state) => {
|
|
774
772
|
try {
|
|
775
|
-
deviceData.
|
|
776
|
-
await this.melCloudAta.send(this.accountType, this.displayType, deviceData);
|
|
773
|
+
deviceData.ScheduleEnabled = state;
|
|
774
|
+
await this.melCloudAta.send(this.accountType, this.displayType, deviceData, payload);
|
|
777
775
|
if (this.logInfo) this.emit('info', `${state ? 'Set:' : 'Unset:'} ${name}`);
|
|
778
776
|
} catch (error) {
|
|
779
777
|
if (this.logWarn) this.emit('warn', `Set schedule error: ${error}`);
|
package/src/melcloudata.js
CHANGED
|
@@ -59,7 +59,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
if (this.accountType === 'melcloudhome') {
|
|
64
64
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
65
65
|
deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
|
|
@@ -210,7 +210,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
210
210
|
SetFanSpeed: String(deviceData.Device.SetFanSpeed),
|
|
211
211
|
OperationMode: AirConditioner.OperationModeMapEnumToString[deviceData.Device.OperationMode],
|
|
212
212
|
VaneHorizontalDirection: AirConditioner.VaneHorizontalDirectionMapEnumToString[deviceData.Device.VaneHorizontalDirection],
|
|
213
|
-
VaneVerticalDirection: AirConditioner.VaneVerticalDirectionMapEnumToString[deviceData.Device.VaneVerticalDirection]
|
|
213
|
+
VaneVerticalDirection: AirConditioner.VaneVerticalDirectionMapEnumToString[deviceData.Device.VaneVerticalDirection],
|
|
214
|
+
ScheduleEnabled: deviceData.ScheduleEnabled
|
|
214
215
|
}
|
|
215
216
|
};
|
|
216
217
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(settings.data, null, 2)}`);
|