Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tado X - getAirComfort is going to the wrong endpoint #106

Closed
dudz40 opened this issue Jan 5, 2025 · 3 comments · Fixed by #107
Closed

Tado X - getAirComfort is going to the wrong endpoint #106

dudz40 opened this issue Jan 5, 2025 · 3 comments · Fixed by #107

Comments

@dudz40
Copy link

dudz40 commented Jan 5, 2025

should be the hops endpoint for Tado X

@mattdavis90
Copy link
Owner

Hops has so far only been used for TadoX. Have they moved the Tado v3 endpoint to hops or just TadoX? Have you got the details, maybe from network inspector in Chrome?

@dudz40
Copy link
Author

dudz40 commented Jan 5, 2025

Just Tado X

` async getAirComfort({ homeId } = {}) {
homeId = homeId || this.homeId;

	if (this.prelineX()) {
		return super.getAirComfort(homeId)
			.then((response) => {
				this.airComfort = response;
				return response;
			})
			.catch((error) => {
				this.homey.error('getAirComfort()', error.message);
				return null;
			});
	}

	if (this.lineX()) {
		const uri = `${lineXEndpoint}/${homeId}/airComfort`;
		return axios.get(uri, { headers: { Authorization: `Bearer ${this._accessToken.token.access_token}` } })
			.then((response) => {
				this.airComfort = response.data;
				return response.data;
			})
			.catch((error) => {
				this.homey.error('getAirComfortX()', error.message);
				return null;
			});
	}
	return null;
}`

@mattdavis90
Copy link
Owner

If you see the linked PR I've updated the code. It should work for both v3 and X systems now. If you're able to test, that would be appreciated. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants