Skip to content

Commit

Permalink
Fix possible race condition when automations change thermostat mode a…
Browse files Browse the repository at this point in the history
…nd temperature simultaneously.
  • Loading branch information
adriancable committed Feb 25, 2022
1 parent 9e57781 commit 957013e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
[![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=discord)](https://discord.gg/j5WwJTB)

Nest plug-in for [Homebridge](https://github.com/nfarina/homebridge) using the native Nest API. See what's new in [release 4.6.4](https://github.com/chrisjshull/homebridge-nest/releases/tag/v4.6.4).
Nest plug-in for [Homebridge](https://github.com/nfarina/homebridge) using the native Nest API. See what's new in [release 4.6.5](https://github.com/chrisjshull/homebridge-nest/releases/tag/v4.6.5).

Integrate your Nest Thermostat, Temperature Sensors, Nest Protect, and Nest x Yale Lock devices into your HomeKit system. Both Nest Accounts (pre-August 2019) and Google Accounts are supported.

Expand Down
2 changes: 1 addition & 1 deletion lib/nest-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ class Connection {
if (thisDevice.uses_heat_link) {
// EU/UK Heat Link thermostats use some slightly different fields, and support heat mode only
if (thisDevice.target_temperature_type === undefined) {
thisDevice.target_temperature_type = (thisDevice.maint_band_lower == 0) ? 'OFF' : 'HEAT';
thisDevice.target_temperature_type = (thisDevice.maint_band_lower == 0) ? 'off' : 'heat';
}
if (thisDevice.hvac_heater_state === undefined) {
thisDevice.hvac_heater_state = !thisDevice.leaf;
Expand Down
1 change: 1 addition & 0 deletions lib/nest-thermostat-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ class NestThermostatAccessory extends NestDeviceAccessory {
}

this.conn.verbose('setTargetHeatingCooling', val);
this.device.target_temperature_type = val;
this.setPropertyAsync('shared', 'hvac_mode', val, 'target heating cooling').asCallback(callback);
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
"prepublishOnly": "npm run lint",
"preversion": "npm run lint"
},
"version": "4.6.4",
"version": "4.6.5",
"warnings": [
{
"code": "ENOTSUP",
"required": {
"node": ">=7.0.0",
"homebridge": ">=0.2.5"
},
"pkgid": "[email protected].4"
"pkgid": "[email protected].5"
}
]
}

0 comments on commit 957013e

Please sign in to comment.