homebridge-melcloud-control 2.3.0-beta.4 → 2.3.0-beta.6
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/index.js +16 -0
- package/package.json +1 -1
- package/src/deviceata.js +4 -2
package/index.js
CHANGED
|
@@ -210,5 +210,21 @@ class MelCloudPlatform {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
module.exports = (api) => {
|
|
213
|
+
class CustomTargetHeaterCoolerState extends Characteristic {
|
|
214
|
+
constructor() {
|
|
215
|
+
super('Mode', '00000033-0000-1000-8000-0026BB765291');
|
|
216
|
+
this.setProps({
|
|
217
|
+
format: Formats.UINT8,
|
|
218
|
+
minValue: 0,
|
|
219
|
+
maxValue: 3,
|
|
220
|
+
minStep: 1,
|
|
221
|
+
validValues: [0, 1, 2, 3],
|
|
222
|
+
perms: [Perms.NOTIFY, Perms.PAIRED_READ, Perms.PAIRED_WRITE]
|
|
223
|
+
});
|
|
224
|
+
this.value = this.getDefaultValue();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
Characteristic.CustomTargetHeaterCoolerState = CustomTargetHeaterCoolerState;
|
|
228
|
+
|
|
213
229
|
api.registerPlatform(CONSTANTS.PluginName, CONSTANTS.PlatformName, MelCloudPlatform, true);
|
|
214
230
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "2.3.0-beta.
|
|
4
|
+
"version": "2.3.0-beta.6",
|
|
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
|
@@ -632,6 +632,8 @@ class DeviceAta extends EventEmitter {
|
|
|
632
632
|
case 0: //Heater Cooler
|
|
633
633
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare heather/cooler service`) : false;
|
|
634
634
|
this.melCloudService = accessory.addService(Service.HeaterCooler, serviceName, `HeaterCooler ${deviceId}`);
|
|
635
|
+
this.melCloudService.removeCharacteristic(Characteristic.CustomTargetHeaterCoolerState);
|
|
636
|
+
this.melCloudService.addCharacteristic(Characteristic.CustomTargetHeaterCoolerState);
|
|
635
637
|
this.melCloudService.getCharacteristic(Characteristic.Active)
|
|
636
638
|
.onGet(async () => {
|
|
637
639
|
const state = this.power;
|
|
@@ -653,11 +655,11 @@ class DeviceAta extends EventEmitter {
|
|
|
653
655
|
const value = this.currentOperationMode;
|
|
654
656
|
return value;
|
|
655
657
|
});
|
|
656
|
-
this.melCloudService.getCharacteristic(Characteristic.
|
|
658
|
+
this.melCloudService.getCharacteristic(Characteristic.CustomTargetHeaterCoolerState)
|
|
657
659
|
.setProps({
|
|
658
660
|
minValue: this.operationModeSetPropsMinValue,
|
|
659
661
|
maxValue: this.operationModeSetPropsMaxValue,
|
|
660
|
-
validValues:
|
|
662
|
+
validValues: this.operationModeSetPropsValidValues
|
|
661
663
|
})
|
|
662
664
|
.onGet(async () => {
|
|
663
665
|
const value = this.targetOperationMode; //1 = HEAT, 2 = DRY 3 = COOL, 7 = FAN, 8 = AUTO
|