homebridge-tasmota-control 1.6.15-beta.19 → 1.6.15-beta.20

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.
@@ -537,7 +537,7 @@
537
537
  "title": "Mode",
538
538
  "type": "integer",
539
539
  "minimum": 0,
540
- "maximum": 60,
540
+ "maximum": 63,
541
541
  "default": 0,
542
542
  "description": "Here select function.",
543
543
  "oneOf": [
@@ -756,6 +756,24 @@
756
756
  "enum": [
757
757
  60
758
758
  ]
759
+ },
760
+ {
761
+ "title": "ECONO COOL",
762
+ "enum": [
763
+ 61
764
+ ]
765
+ },
766
+ {
767
+ "title": "POWER FULL",
768
+ "enum": [
769
+ 62
770
+ ]
771
+ },
772
+ {
773
+ "title": "NIGHT MODE",
774
+ "enum": [
775
+ 63
776
+ ]
759
777
  }
760
778
  ],
761
779
  "required": false
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.6.15-beta.19",
4
+ "version": "1.6.15-beta.20",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/constants.js CHANGED
@@ -58,9 +58,9 @@ export const MiElHVAC = {
58
58
  "left_middle": "HVACSetSwingH%20left_middle",
59
59
  "left_center": "HVACSetSwingH%20left_center",
60
60
  "center": "HVACSetSwingH%20center",
61
- "right": "HVACSetSwingH%20right",
62
- "right_middle": "HVACSetSwingH%20right_middle",
63
61
  "right_center": "HVACSetSwingH%20right_center",
62
+ "right_middle": "HVACSetSwingH%20right_middle",
63
+ "right": "HVACSetSwingH%20right",
64
64
  "split": "HVACSetSwingH%20split",
65
65
  "swing": "HVACSetSwingH%20swing",
66
66
  },
@@ -84,7 +84,16 @@ export const MiElHVAC = {
84
84
  "f": "HVACSetDisplayUnit%20f"
85
85
  },
86
86
  "SetPurify": {
87
- "purify": "HVACSetPurify%20purify"
87
+ "purify": "HVACSetPurify%20on"
88
+ },
89
+ "SetEconoCool": {
90
+ "econocool": "HVACSetPurify%20on"
91
+ },
92
+ "SetPowerFull": {
93
+ "powerfull": "HVACSetPurify%20on"
94
+ },
95
+ "SetNightMode": {
96
+ "nightmode": "HVACSetPurify%20on"
88
97
  },
89
98
  "RemoteTemp": "HVACRemoteTemp%20",
90
99
  "RemoteTempClearTime": "HVACRemoteTempClearTime%20",
@@ -110,7 +119,7 @@ export const MiElHVAC = {
110
119
  "1": "WEAK",
111
120
  "2": "NORMAL",
112
121
  "3": "STRONG",
113
- "4": "ERY STRONG",
122
+ "4": "VERY STRONG",
114
123
  "6": "OFF"
115
124
  },
116
125
  "VerticalVane": {
@@ -123,10 +132,12 @@ export const MiElHVAC = {
123
132
  "swing": "SWING"
124
133
  },
125
134
  "HorizontalVane": {
126
- "auto": "AUTO",
135
+ "airdirection": "AIR DIRECTION",
127
136
  "left_middle": "LEFT",
128
137
  "left": "LEFT MIDDLE",
138
+ "left_center": "LEFT CENTER",
129
139
  "center": "CENTER",
140
+ "right_center": "RIGHT CENTER",
130
141
  "right_middle": "RIGHT MIDDLE",
131
142
  "right": "RIGHT",
132
143
  "split": "SPLIT",
package/src/mielhvac.js CHANGED
@@ -524,8 +524,11 @@ class MiElHvac extends EventEmitter {
524
524
  53: 'temp',
525
525
  };
526
526
 
527
- const purifyMap = {
528
- 60: 'on',
527
+ const stateMap = {
528
+ 60: 'on', //purify
529
+ 61: 'on', //econocool
530
+ 62: 'on', //powerfull
531
+ 63: 'on', //nightmode
529
532
  };
530
533
 
531
534
  this.buttonsConfigured.forEach((button, index) => {
@@ -544,8 +547,8 @@ class MiElHvac extends EventEmitter {
544
547
  state = power && airDirection === airDirMap[mode];
545
548
  } else if (prohibitMap[mode]) {
546
549
  state = power && prohibit === prohibitMap[mode];
547
- } else if (purifyMap[mode]) {
548
- state = power && purify === purifyMap[mode];
550
+ } else if (stateMap[mode]) {
551
+ state = power && purify === stateMap[mode];
549
552
  } else {
550
553
  this.emit('warn', `Unknown button mode: ${mode} detected`);
551
554
  }
@@ -1110,6 +1113,9 @@ class MiElHvac extends EventEmitter {
1110
1113
 
1111
1114
  // Purify
1112
1115
  60: () => getCommand('SetPurify', 'purify'),
1116
+ 61: () => getCommand('SetEconoCool', 'econocool'),
1117
+ 62: () => getCommand('SetPowerFull', 'powerfull'),
1118
+ 63: () => getCommand('SetNightMode', 'nightmode'),
1113
1119
  };
1114
1120
 
1115
1121
  const getCommand = (type, target) => {
@@ -1127,6 +1133,9 @@ class MiElHvac extends EventEmitter {
1127
1133
  case 'SetAirDirection': return 'airDirection';
1128
1134
  case 'SetProhibit': return 'prohibit';
1129
1135
  case 'SetPurify': return 'purify';
1136
+ case 'SetEconoCool': return 'econoCool';
1137
+ case 'SetPowerFull': return 'powerFull';
1138
+ case 'SetNightMode': return 'nightMode';
1130
1139
  default: return '';
1131
1140
  }
1132
1141
  };
@@ -1137,7 +1146,7 @@ class MiElHvac extends EventEmitter {
1137
1146
  }
1138
1147
 
1139
1148
  data = mappings[mode]();
1140
- if (!this.mielHvac.power && state && mode > 0 && mode <= 60) {
1149
+ if (!this.mielHvac.power && state && mode > 0 && mode <= 63) {
1141
1150
  await this.axiosInstance(MiElHVAC.PowerOn);
1142
1151
  }
1143
1152