1
- import { Method } from "axios" ;
2
- import { Tado } from "./tado" ;
3
- import {
1
+ import type {
4
2
ActionableDevice ,
5
3
Power ,
6
4
XFeatures ,
@@ -13,9 +11,12 @@ import {
13
11
XTermination ,
14
12
} from "./types" ;
15
13
14
+ import { Method } from "axios" ;
15
+ import { BaseTado } from "./base" ;
16
+
16
17
const tado_x_url = "https://hops.tado.com" ;
17
18
18
- export class TadoX extends Tado {
19
+ export class TadoX extends BaseTado {
19
20
/**
20
21
* Makes an API call to the provided TadoX URL with the specified method and data.
21
22
*
@@ -174,7 +175,6 @@ export class TadoX extends Tado {
174
175
* @param child_lock - Boolean value to enable or disable the child lock.
175
176
* @returns A promise that resolves when the operation is complete.
176
177
*/
177
- // @ts -expect-error TS2416
178
178
async setChildlock ( home_id : number , serial_no : string , child_lock : boolean ) : Promise < void > {
179
179
return this . apiCallX ( `/homes/${ home_id } /roomsAndDevices/devices/${ serial_no } ` , "patch" , {
180
180
childLockEnabled : child_lock ,
@@ -189,7 +189,6 @@ export class TadoX extends Tado {
189
189
* @param temperatureOffset - The temperature offset to be set, in degrees Celsius.
190
190
* @returns A promise that resolves when the operation is complete.
191
191
*/
192
- // @ts -expect-error TS2416
193
192
async setDeviceTemperatureOffset (
194
193
home_id : number ,
195
194
serial_no : string ,
@@ -207,7 +206,6 @@ export class TadoX extends Tado {
207
206
* @param room_id - The unique identifier of the zone within the home.
208
207
* @returns A promise that resolves to the away configuration object.
209
208
*/
210
- // @ts -expect-error TS2416
211
209
async getAwayConfiguration (
212
210
home_id : number ,
213
211
room_id : number ,
@@ -223,7 +221,6 @@ export class TadoX extends Tado {
223
221
* @param config - The configuration settings for away mode.
224
222
* @returns A promise that resolves when the configuration has been successfully set.
225
223
*/
226
- // @ts -expect-error TS2416
227
224
async setAwayConfiguration (
228
225
home_id : number ,
229
226
room_id : number ,
0 commit comments