Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoduj committed Dec 8, 2020
1 parent ac50787 commit 442ccfc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 1.1.4

- [FIX] unresponsive in case of negative temperature #46

## 1.1.3

- [NEW] funding link
Expand Down
23 changes: 15 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,21 @@ Gogogate2Platform.prototype = {
},

bindCurrentTemperatureLevelCharacteristic: function (service) {
service.getCharacteristic(Characteristic.CurrentTemperature).on(
'get',
function (callback) {
var temp = service.getCharacteristic(Characteristic.CurrentTemperature).value;
callback(undefined, temp);
this.gogogateAPI.refreshSensor(service.gateId);
}.bind(this)
);
service
.getCharacteristic(Characteristic.CurrentTemperature)
//to handle negative temps
.setProps({
minValue: -50,
maxValue: 50,
})
.on(
'get',
function (callback) {
var temp = service.getCharacteristic(Characteristic.CurrentTemperature).value;
callback(undefined, temp);
this.gogogateAPI.refreshSensor(service.gateId);
}.bind(this)
);
},

bindChargingStateCharacteristic: function (service) {
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-gogogate2",
"version": "1.1.3",
"version": "1.1.4",
"author": "Nicolas Dujardin",
"description": "Publish your gogogate 2 to homebridge",
"main": "index.js",
Expand Down

0 comments on commit 442ccfc

Please sign in to comment.