mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-11 06:13:09 +01:00
Merge pull request #242 from ethansinjin/patch-1
Simple fix for undefined Nest device names
This commit is contained in:
@@ -44,7 +44,11 @@ NestPlatform.prototype = {
|
|||||||
|
|
||||||
function NestThermostatAccessory(log, name, device, deviceId) {
|
function NestThermostatAccessory(log, name, device, deviceId) {
|
||||||
// device info
|
// device info
|
||||||
this.name = name;
|
if (name) {
|
||||||
|
this.name = name;
|
||||||
|
} else {
|
||||||
|
this.name = "Nest";
|
||||||
|
}
|
||||||
this.model = device.model_version;
|
this.model = device.model_version;
|
||||||
this.serial = device.serial_number;
|
this.serial = device.serial_number;
|
||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
@@ -390,4 +394,4 @@ NestThermostatAccessory.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports.accessory = NestThermostatAccessory;
|
module.exports.accessory = NestThermostatAccessory;
|
||||||
module.exports.platform = NestPlatform;
|
module.exports.platform = NestPlatform;
|
||||||
|
|||||||
Reference in New Issue
Block a user