Skip to content

Commit

Permalink
Fixed Temperature Divisor not applying
Browse files Browse the repository at this point in the history
Temperature divisor was not being applied on updates to SimpleHeaterAccessory, this caused bug #233 (comment)
  • Loading branch information
xortuna authored and iRayanKhan committed Mar 25, 2021
1 parent ede074d commit c07e1ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SimpleHeaterAccessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class SimpleHeaterAccessory extends BaseAccessory {
characteristicHeatingThresholdTemperature.updateValue(changes[this.dpDesiredTemperature * this.temperatureDivisor]);
}

if (changes.hasOwnProperty(this.dpCurrentTemperature) && characteristicCurrentTemperature.value !== changes[this.dpCurrentTemperature]) characteristicCurrentTemperature.updateValue(changes[this.dpCurrentTemperature]);
if (changes.hasOwnProperty(this.dpCurrentTemperature) && characteristicCurrentTemperature.value !== changes[this.dpCurrentTemperature]) characteristicCurrentTemperature.updateValue(this._getDividedState(changes[this.dpCurrentTemperature], this.temperatureDivisor));

console.log('[Tuya] SimpleHeater changed: ' + JSON.stringify(state));
});
Expand Down

0 comments on commit c07e1ab

Please sign in to comment.