diff --git a/src/base.ts b/src/base.ts index c267a04..a982a58 100644 --- a/src/base.ts +++ b/src/base.ts @@ -1,6 +1,5 @@ import type { AddEnergiIQMeterReadingResponse, - AirComfort, AirComfortDetailed, BoilerSystemInformation, Country, @@ -579,16 +578,6 @@ export class BaseTado { } } - /** - * Retrieves the air comfort details for a given home. - * - * @param home_id - The ID of the home for which to get the air comfort details. - * @returns A promise that resolves to an AirComfort object containing the air comfort details. - */ - getAirComfort(home_id: number): Promise { - return this.apiCall(`/api/v2/homes/${home_id}/airComfort`); - } - /** * Fetches detailed air comfort information for a specific home. * diff --git a/src/tado.ts b/src/tado.ts index 4078e20..8018ac3 100644 --- a/src/tado.ts +++ b/src/tado.ts @@ -1,5 +1,6 @@ import type { ACMode, + AirComfort, AwayConfiguration, DeepPartial, DefaultOverlay, @@ -714,4 +715,14 @@ export class Tado extends BaseTado { childLockEnabled: child_lock, }); } + + /** + * Retrieves the air comfort details for a given home. + * + * @param home_id - The ID of the home for which to get the air comfort details. + * @returns A promise that resolves to an AirComfort object containing the air comfort details. + */ + getAirComfort(home_id: number): Promise { + return this.apiCall(`/api/v2/homes/${home_id}/airComfort`); + } } diff --git a/src/tadox.ts b/src/tadox.ts index e1bd4a0..f3073d4 100644 --- a/src/tadox.ts +++ b/src/tadox.ts @@ -1,5 +1,6 @@ import type { ActionableDevice, + AirComfort, FlowTemperatureOptimization, Power, XFeatures, @@ -309,4 +310,17 @@ export class TadoX extends BaseTado { maxFlowTemperature: temperature, }); } + + /** + * Retrieves the air comfort details for a given home. + * + * @param home_id - The ID of the home for which to get the air comfort details. + * @returns A promise that resolves to an AirComfort object containing the air comfort details. + */ + async getAirComfort(home_id: number): Promise { + const resp = (await this.apiCallX(`/api/v2/homes/${home_id}/airComfort`)) as { + data: AirComfort; + }; + return resp.data; + } }