homebridge-melcloud-control 4.0.0-beta.172 → 4.0.0-beta.174

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.0.0-beta.172",
4
+ "version": "4.0.0-beta.174",
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/constants.js CHANGED
@@ -42,11 +42,11 @@ export const AirConditioner = {
42
42
  OperationModeMapStringToEnum: { "0": 0, "Heat": 1, "Dry": 2, "Cool": 3, "4": 4, "5": 5, "6": 6, "Fan": 7, "Auto": 8, "Isee Heat": 9, "Isee Dry": 10, "Isee Cool": 11 },
43
43
  OperationModeMapEnumToString: { 0: "0", 1: "Heat", 2: "Dry", 3: "Cool", 4: "4", 5: "5", 6: "6", 7: "Fan", 8: "Auto", 9: "Isee Heat", 10: "Isee Dry", 11: "Isee Cool" },
44
44
  FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5 },
45
- FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Auto"},
45
+ FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Auto" },
46
46
  VaneVerticalDirectionMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Swing": 7 },
47
47
  VaneVerticalDirectionMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Six", 7: "Swing" },
48
- VaneHorizontalDirectionMapStringToEnum: { "Auto": 0, "Left": 1, "LeftCenter": 2, "Center": 3, "RightCenter": 4, "Right": 5, "Six": 6, "Seven": 7, "Split": 8, "Nine": 9, "Ten": 10, "Eleven": 11, "Swing": 12 },
49
- VaneHorizontalDirectionMapEnumToString: { 0: "Auto", 1: "Left", 2: "LeftCenter", 3: "Center", 4: "RightCenter", 5: "Right", 6: "Six", 7: "Seven", 8: "Split", 9: "Nine", 10: "Ten", 11: "Eleven", 12: "Swing" },
48
+ VaneHorizontalDirectionMapStringToEnum: { "Auto": 0, "Left": 1, "LeftCentre": 2, "Centre": 3, "RightCentre": 4, "Right": 5, "Six": 6, "Seven": 7, "Split": 8, "Nine": 9, "Ten": 10, "Eleven": 11, "Swing": 12 },
49
+ VaneHorizontalDirectionMapEnumToString: { 0: "Auto", 1: "Left", 2: "LeftCentre", 3: "Centre", 4: "RightCentre", 5: "Right", 6: "Six", 7: "Seven", 8: "Split", 9: "Nine", 10: "Ten", 11: "Eleven", 12: "Swing" },
50
50
  EffectiveFlags: {
51
51
  Power: 1,
52
52
  OperationMode: 2,
@@ -176,6 +176,7 @@ class MelCloudAta extends EventEmitter {
176
176
  switch (accountType) {
177
177
  case "melcloud":
178
178
  const axiosInstancePost = axios.create({
179
+ method: 'POST',
179
180
  baseURL: ApiUrls.BaseURL,
180
181
  timeout: 25000,
181
182
  headers: {
@@ -237,11 +238,12 @@ class MelCloudAta extends EventEmitter {
237
238
  }
238
239
  };
239
240
 
240
- await axiosInstancePost.post(ApiUrls.SetAta, payload);
241
+ await axiosInstancePost(ApiUrls.SetAta, payload);
241
242
  this.emit('deviceState', deviceData);
242
243
  return true;
243
244
  case "melcloudhome":
244
245
  const axiosInstancePut = axios.create({
246
+ method: 'PUT',
245
247
  baseURL: ApiUrlsHome.BaseURL,
246
248
  timeout: 25000,
247
249
  headers: {
@@ -284,7 +286,7 @@ class MelCloudAta extends EventEmitter {
284
286
  this.emit('warn', JSON.stringify(data, null, 2));
285
287
 
286
288
  const path = ApiUrlsHome.SetAta.replace('deviceid', deviceData.DeviceID);
287
- await axiosInstancePut.put(path, data);
289
+ await axiosInstancePut(path, data);
288
290
  return true;
289
291
  default:
290
292
  return;