Skip to content

Commit 1c30675

Browse files
committedDec 4, 2024
fix: incorrect TadoX base class
1 parent dedb230 commit 1c30675

File tree

3 files changed

+824
-795
lines changed

3 files changed

+824
-795
lines changed
 

‎src/tadox.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { Method } from "axios";
2-
import { Tado } from "./tado";
3-
import {
1+
import type {
42
ActionableDevice,
53
Power,
64
XFeatures,
@@ -13,9 +11,12 @@ import {
1311
XTermination,
1412
} from "./types";
1513

14+
import { Method } from "axios";
15+
import { BaseTado } from "./base";
16+
1617
const tado_x_url = "https://hops.tado.com";
1718

18-
export class TadoX extends Tado {
19+
export class TadoX extends BaseTado {
1920
/**
2021
* Makes an API call to the provided TadoX URL with the specified method and data.
2122
*
@@ -174,7 +175,6 @@ export class TadoX extends Tado {
174175
* @param child_lock - Boolean value to enable or disable the child lock.
175176
* @returns A promise that resolves when the operation is complete.
176177
*/
177-
// @ts-expect-error TS2416
178178
async setChildlock(home_id: number, serial_no: string, child_lock: boolean): Promise<void> {
179179
return this.apiCallX(`/homes/${home_id}/roomsAndDevices/devices/${serial_no}`, "patch", {
180180
childLockEnabled: child_lock,
@@ -189,7 +189,6 @@ export class TadoX extends Tado {
189189
* @param temperatureOffset - The temperature offset to be set, in degrees Celsius.
190190
* @returns A promise that resolves when the operation is complete.
191191
*/
192-
// @ts-expect-error TS2416
193192
async setDeviceTemperatureOffset(
194193
home_id: number,
195194
serial_no: string,
@@ -207,7 +206,6 @@ export class TadoX extends Tado {
207206
* @param room_id - The unique identifier of the zone within the home.
208207
* @returns A promise that resolves to the away configuration object.
209208
*/
210-
// @ts-expect-error TS2416
211209
async getAwayConfiguration(
212210
home_id: number,
213211
room_id: number,
@@ -223,7 +221,6 @@ export class TadoX extends Tado {
223221
* @param config - The configuration settings for away mode.
224222
* @returns A promise that resolves when the configuration has been successfully set.
225223
*/
226-
// @ts-expect-error TS2416
227224
async setAwayConfiguration(
228225
home_id: number,
229226
room_id: number,

0 commit comments

Comments
 (0)