Skip to content

Commit

Permalink
Fixed ignoreTemperatureWhenOff not sending temperature when turning…
Browse files Browse the repository at this point in the history
… the air-conditioner back on.
  • Loading branch information
lprhodes committed Mar 23, 2018
1 parent 778dfb9 commit 6d49695
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions accessories/aircon.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ class AirConAccessory extends BroadlinkRMAccessory {
}
}

if (!state.currentHeatingCoolingState && ignoreTemperatureWhenOff) {
if (!state.currentHeatingCoolingState && !state.targetHeatingCoolingState && ignoreTemperatureWhenOff) {
log(`${name} Ignoring sendTemperature due to "ignoreTemperatureWhenOff": true`);

return;
}

Expand All @@ -256,7 +258,7 @@ class AirConAccessory extends BroadlinkRMAccessory {
this.log(`${name} sendTemperature (${state.targetTemperature}`);
await this.performSend(hexData.data);

if (!state.currentHeatingCoolingState && sendTemperatureOnlyWhenOff) {
if (!state.currentHeatingCoolingState && !state.targetHeatingCoolingState && sendTemperatureOnlyWhenOff) {
return;
}

Expand Down

0 comments on commit 6d49695

Please sign in to comment.