From 0cf514694e73cd68977b310cdd310cec711ad795 Mon Sep 17 00:00:00 2001 From: Luke Rhodes Date: Tue, 20 Mar 2018 17:00:29 +1100 Subject: [PATCH] Fix for `sendTemperatureOnlyWhenOff` not working --- accessories/aircon.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/accessories/aircon.js b/accessories/aircon.js index 858493dc..30c1754d 100644 --- a/accessories/aircon.js +++ b/accessories/aircon.js @@ -246,6 +246,10 @@ class AirConAccessory extends BroadlinkRMAccessory { } } + if (state.currentHeatingCoolingState !== Characteristic.TargetHeatingCoolingState.OFF && sendTemperatureOnlyWhenOff) { + return; + } + state.firstTemperatureUpdate = false; // Send the temperature hex @@ -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'];