Skip to content

Commit

Permalink
Fix for sendTemperatureOnlyWhenOff not working
Browse files Browse the repository at this point in the history
  • Loading branch information
lprhodes committed Mar 20, 2018
1 parent 18488c2 commit 0cf5146
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions accessories/aircon.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ class AirConAccessory extends BroadlinkRMAccessory {
}
}

if (state.currentHeatingCoolingState !== Characteristic.TargetHeatingCoolingState.OFF && sendTemperatureOnlyWhenOff) {
return;
}

state.firstTemperatureUpdate = false;

// Send the temperature hex
Expand All @@ -254,9 +258,7 @@ class AirConAccessory extends BroadlinkRMAccessory {


// Update the heating/cooling mode based on the temperature.
if (state.currentHeatingCoolingState !== Characteristic.TargetHeatingCoolingState.OFF && sendTemperatureOnlyWhenOff) {
return;
}


let mode = hexData['pseudo-mode'];

Expand Down

0 comments on commit 0cf5146

Please sign in to comment.