Skip to content

Commit

Permalink
fix revert itself operating mode to auto
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Aug 29, 2024
1 parent 92a53cc commit a2af66c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "MELCloud Control",
"name": "homebridge-melcloud-control",
"version": "3.0.5",
"version": "3.0.6",
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
"license": "MIT",
"author": "grzegorz914",
Expand Down
10 changes: 5 additions & 5 deletions src/deviceata.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class DeviceAta extends EventEmitter {
//accessory
this.startPrepareAccessory = true;
this.accessory = {};
this.accessory.currentOperationMode = 0;
this.accessory.targetOperationMode = 0;
this.accessory.fanSpeed = 0;

//melcloud device
this.melCloudAta = new MelCloudAta({
Expand Down Expand Up @@ -189,7 +192,7 @@ class DeviceAta extends EventEmitter {
const vaneVertical = deviceState.VaneVertical;
const hideVaneControls = deviceState.HideVaneControls;
const hideDryModeControl = deviceState.HideDryModeControl;
const inStandbyMode = deviceData.Device.InStandbyMode;
const inStandbyMode = deviceState.InStandbyMode;
const prohibitSetTemperature = deviceState.ProhibitSetTemperature;
const prohibitOperationMode = deviceState.ProhibitOperationMode;
const prohibitPower = deviceState.ProhibitPower;
Expand All @@ -205,10 +208,7 @@ class DeviceAta extends EventEmitter {
this.accessory.roomTemperature = roomTemperature;
this.accessory.outdoorTemperature = outdoorTemperature;
this.accessory.setTemperature = setTemperature;
this.accessory.fanSpeed = 0;
this.accessory.setFanSpeed = setFanSpeed;
this.accessory.currentOperationMode = 0;
this.accessory.targetOperationMode = 0;
this.accessory.vaneHorizontal = vaneHorizontal;
this.accessory.vaneVertical = vaneVertical;
this.accessory.swingMode = swingFunction && vaneHorizontal === 12 && vaneVertical === 7 ? 1 : 0;
Expand Down Expand Up @@ -336,7 +336,7 @@ class DeviceAta extends EventEmitter {
case true:
switch (operationMode) {
case 1: //HEAT
this.accessory.currentOperationMode = 1; //OFF, HEAT, COOL
this.accessory.currentOperationMode = 1; //OFF, HEAT, COOL
this.accessory.targetOperationMode = 1; //OFF, HEAT, COOL, AUTO
break;
case 2: //DRY
Expand Down
8 changes: 4 additions & 4 deletions src/deviceerv.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ class DeviceErv extends EventEmitter {
//accessory
this.startPrepareAccessory = true;
this.accessory = {};
this.accessory.currentOperationMode = 0;
this.accessory.targetOperationMode = 0;
this.accessory.fanSpeed = 0;
this.accessory.lockPhysicalControl = 0;

//melcloud device
this.melCloudErv = new MelCloudErv({
Expand Down Expand Up @@ -216,14 +220,10 @@ class DeviceErv extends EventEmitter {
this.accessory.outdoorTemperature = outdoorTemperature;
this.accessory.supplyTemperature = supplyTemperature;
this.accessory.setTemperature = targetTemperature;
this.accessory.fanSpeed = 0;
this.accessory.setFanSpeed = setFanSpeed;
this.accessory.currentOperationMode = 0;
this.accessory.targetOperationMode = 0;
this.accessory.temperatureIncrement = temperatureIncrement;
this.accessory.useFahrenheit = useFahrenheit;
this.accessory.temperatureUnit = temperatureUnit;
this.accessory.lockPhysicalControl = 0;
this.accessory.hasAutomaticFanSpeed = hasAutomaticFanSpeed;
this.accessory.hasOutdoorTemperature = hasOutdoorTemperature;
this.accessory.numberOfFanSpeeds = numberOfFanSpeeds;
Expand Down

0 comments on commit a2af66c

Please sign in to comment.