Skip to content

Commit

Permalink
Add a detailed air quality call
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdavis90 committed Mar 7, 2021
1 parent 9be9653 commit afd0255
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ class Tado {
async getAirComfort(home_id) {
return this.apiCall(`/api/v2/homes/${home_id}/airComfort`);
}

async getAirComfortDetailed(home_id) {
const home = await this.getHome(home_id);
const location = `latitude=${home.geolocation.latitude}&longitude=${home.geolocation.longitude}`;
const login = `username=${this._username}&password=${this._password}`;
const resp = await axios(`https://acme.tado.com/v1/homes/${home_id}/airComfort?${location}&${login}`);
return resp.data;
}
}

module.exports = Tado;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-tado-client",
"version": "0.9.2",
"version": "0.9.3",
"description": "A Tado client for nodejs",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit afd0255

Please sign in to comment.