Skip to content

Commit

Permalink
Cached accessories now report 'no response' if Nest auth fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancable committed Sep 6, 2020
1 parent 3b31b96 commit bddf19f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,15 @@ class NestPlatform {
} catch(err) {
this.log.error(err);
this.log.error('NOTE: Because we couldn\'t connect to the Nest service, your Nest devices in HomeKit will not be responsive.');
this.cachedAccessories.forEach(el => el.updateReachability(false));
this.cachedAccessories.forEach(accessory => {
accessory.services.forEach(service => {
service.characteristics.forEach(characteristic => {
characteristic.on('get', callback => callback('error'));
characteristic.on('set', (value, callback) => callback('error'));
characteristic.getValue();
});
});
});
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"prepublishOnly": "npm run lint",
"preversion": "npm run lint"
},
"version": "4.4.7",
"version": "4.4.8",
"warnings": [
{
"code": "ENOTSUP",
"required": {
"node": ">=7.0.0",
"homebridge": ">=0.2.5"
},
"pkgid": "[email protected].7"
"pkgid": "[email protected].8"
}
]
}

0 comments on commit bddf19f

Please sign in to comment.