Skip to content

Commit

Permalink
Fixed issue current temperature issue introduced with 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lprhodes committed Apr 29, 2017
1 parent e2932d1 commit 1d2b1f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions accessories/aircon.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,10 @@ class AirConAccessory extends BroadlinkRMAccessory {
let onTemperature;

onTemperature = (temperature) => {
if (temperature > this.config.maxTemperature) temperature = this.config.maxTemperature
if (temperature < this.config.minTemperature) temperature = this.config.minTemperature
state.currentTemperature = temperature;

if (state.currentTemperature > this.config.maxTemperature) state.currentTemperature = this.config.minTemperature;
if (state.currentTemperature < this.config.minTemperature) state.currentTemperature = this.config.minTemperature;

if (this.removeTemperatureListenerTimer) clearTimeout(this.removeTemperatureListenerTimer)
device.removeListener('temperature', onTemperature);
this.processQueuedCallbacks();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-broadlink-rm",
"version": "2.3.1",
"version": "2.3.2",
"description": "Broadlink RM plugin (including the mini and pro) for homebridge: https://github.com/nfarina/homebridge",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit 1d2b1f7

Please sign in to comment.