Merge pull request #242 from ethansinjin/patch-1

Simple fix for undefined Nest device names
This commit is contained in:
Nick Farina
2015-10-08 10:57:24 -07:00

View File

@@ -44,7 +44,11 @@ NestPlatform.prototype = {
function NestThermostatAccessory(log, name, device, deviceId) {
// device info
this.name = name;
if (name) {
this.name = name;
} else {
this.name = "Nest";
}
this.model = device.model_version;
this.serial = device.serial_number;
this.deviceId = deviceId;
@@ -390,4 +394,4 @@ NestThermostatAccessory.prototype = {
}
module.exports.accessory = NestThermostatAccessory;
module.exports.platform = NestPlatform;
module.exports.platform = NestPlatform;