homebridge-melcloud-control 4.3.0-beta.41 → 4.3.0-beta.42

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.0-beta.41",
4
+ "version": "4.3.0-beta.42",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -330,6 +330,8 @@ class MelCloudAta extends EventEmitter {
330
330
  this.headers.Referer = ApiUrlsHome.Referers.GetPutScenes;
331
331
  break;
332
332
  default:
333
+ if (!this.socket || this.socket.readyState !== WebSocket.OPEN) return;
334
+
333
335
  if (displayType === 1 && deviceData.Device.OperationMode === 8) {
334
336
  deviceData.Device.SetTemperature = (deviceData.Device.DefaultCoolingSetTemperature + deviceData.Device.DefaultHeatingSetTemperature) / 2;
335
337
 
@@ -367,7 +369,7 @@ class MelCloudAta extends EventEmitter {
367
369
  ]
368
370
  const payload1 = [
369
371
  {
370
- messageType: "unitStateChanged",
372
+ messageType: "SetUnitState",
371
373
  Data: {
372
374
  id: deviceData.DeviceID, // Twój ID jednostki
373
375
  unitType: "ata", // tak jak incoming