homebridge-melcloud-control 3.8.4-beta.0 → 3.8.4-beta.1

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": "3.8.4-beta.0",
4
+ "version": "3.8.4-beta.1",
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
@@ -252,8 +252,12 @@ class DeviceAta extends EventEmitter {
252
252
  }
253
253
 
254
254
  //prepare accessory
255
- async prepareAccessory(deviceData, deviceId, deviceTypeText, deviceName, accountName) {
255
+ async prepareAccessory(deviceData) {
256
256
  try {
257
+ const deviceId = this.deviceId;
258
+ const deviceTypeText = this.deviceTypeText;
259
+ const deviceName = this.deviceName;
260
+ const accountName = this.accountName;
257
261
  const presetsOnServer = this.accessory.presets;
258
262
  const modelSupportsHeat = this.accessory.modelSupportsHeat;
259
263
  const modelSupportsDry = this.accessory.modelSupportsDry;
@@ -1039,7 +1043,7 @@ class DeviceAta extends EventEmitter {
1039
1043
  this.accessory.swingMode = swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0;
1040
1044
  this.accessory.lockPhysicalControl = prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0;
1041
1045
  this.accessory.temperatureIncrement = temperatureIncrement;
1042
- this.accessory.temperatureUnit = TemperatureDisplayUnits[this.accessory.useFahrenheit];
1046
+ this.accessory.temperatureUnit = TemperatureDisplayUnits[this.accessory.useFahrenheit];
1043
1047
 
1044
1048
  //operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
1045
1049
  switch (this.displayMode) {
@@ -1358,7 +1362,7 @@ class DeviceAta extends EventEmitter {
1358
1362
 
1359
1363
  //prepare accessory
1360
1364
  if (this.startPrepareAccessory) {
1361
- const accessory = await this.prepareAccessory(deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
1365
+ const accessory = await this.prepareAccessory(deviceData);
1362
1366
  this.emit('publishAccessory', accessory);
1363
1367
  this.startPrepareAccessory = false;
1364
1368
  }
package/src/deviceatw.js CHANGED
@@ -282,8 +282,12 @@ class DeviceAtw extends EventEmitter {
282
282
  }
283
283
 
284
284
  //prepare accessory
285
- async prepareAccessory(deviceData, deviceId, deviceTypeText, deviceName, accountName) {
285
+ async prepareAccessory(deviceData) {
286
286
  try {
287
+ const deviceId = this.deviceId;
288
+ const deviceTypeText = this.deviceTypeText;
289
+ const deviceName = this.deviceName;
290
+ const accountName = this.accountName;
287
291
  const presetsOnServer = this.accessory.presets;
288
292
  const zonesCount = this.accessory.zonesCount;
289
293
  const caseHeatPump = this.accessory.caseHeatPump;
@@ -1967,7 +1971,7 @@ class DeviceAtw extends EventEmitter {
1967
1971
 
1968
1972
  //prepare accessory
1969
1973
  if (this.startPrepareAccessory) {
1970
- const accessory = await this.prepareAccessory(deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
1974
+ const accessory = await this.prepareAccessory(deviceData);
1971
1975
  this.emit('publishAccessory', accessory);
1972
1976
  this.startPrepareAccessory = false;
1973
1977
  }
package/src/deviceerv.js CHANGED
@@ -241,8 +241,12 @@ class DeviceErv extends EventEmitter {
241
241
  }
242
242
 
243
243
  //prepare accessory
244
- async prepareAccessory(deviceData, deviceId, deviceTypeText, deviceName, accountName) {
244
+ async prepareAccessory(deviceData) {
245
245
  try {
246
+ const deviceId = this.deviceId;
247
+ const deviceTypeText = this.deviceTypeText;
248
+ const deviceName = this.deviceName;
249
+ const accountName = this.accountName;
246
250
  const presetsOnServer = this.accessory.presets;
247
251
  const hasRoomTemperature = this.accessory.hasRoomTemperature;
248
252
  const hasSupplyTemperature = this.accessory.hasSupplyTemperature;
@@ -1227,7 +1231,7 @@ class DeviceErv extends EventEmitter {
1227
1231
 
1228
1232
  //prepare accessory
1229
1233
  if (this.startPrepareAccessory) {
1230
- const accessory = await this.prepareAccessory(deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
1234
+ const accessory = await this.prepareAccessory(deviceData);
1231
1235
  this.emit('publishAccessory', accessory);
1232
1236
  this.startPrepareAccessory = false;
1233
1237
  }