mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-12 08:17:28 +00:00
fix: schedule device types (#441)
This commit is contained in:
@ -50,7 +50,7 @@ export class ScheduleService {
|
|||||||
|
|
||||||
// Corrected condition for supported device types
|
// Corrected condition for supported device types
|
||||||
this.ensureProductTypeSupportedForSchedule(
|
this.ensureProductTypeSupportedForSchedule(
|
||||||
ProductType[deviceDetails.productDevice.prodType],
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.enableScheduleDeviceInTuya(
|
return this.enableScheduleDeviceInTuya(
|
||||||
@ -74,7 +74,7 @@ export class ScheduleService {
|
|||||||
|
|
||||||
// Corrected condition for supported device types
|
// Corrected condition for supported device types
|
||||||
this.ensureProductTypeSupportedForSchedule(
|
this.ensureProductTypeSupportedForSchedule(
|
||||||
ProductType[deviceDetails.productDevice.prodType],
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
|
|
||||||
return await this.deleteScheduleDeviceInTuya(
|
return await this.deleteScheduleDeviceInTuya(
|
||||||
@ -97,7 +97,7 @@ export class ScheduleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.ensureProductTypeSupportedForSchedule(
|
this.ensureProductTypeSupportedForSchedule(
|
||||||
ProductType[deviceDetails.productDevice.prodType],
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.addScheduleDeviceInTuya(
|
await this.addScheduleDeviceInTuya(
|
||||||
@ -120,9 +120,8 @@ export class ScheduleService {
|
|||||||
}
|
}
|
||||||
// Corrected condition for supported device types
|
// Corrected condition for supported device types
|
||||||
this.ensureProductTypeSupportedForSchedule(
|
this.ensureProductTypeSupportedForSchedule(
|
||||||
ProductType[deviceDetails.productDevice.prodType],
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
|
|
||||||
const schedules = await this.getScheduleDeviceInTuya(
|
const schedules = await this.getScheduleDeviceInTuya(
|
||||||
deviceDetails.deviceTuyaUuid,
|
deviceDetails.deviceTuyaUuid,
|
||||||
category,
|
category,
|
||||||
@ -162,7 +161,7 @@ export class ScheduleService {
|
|||||||
|
|
||||||
// Corrected condition for supported device types
|
// Corrected condition for supported device types
|
||||||
this.ensureProductTypeSupportedForSchedule(
|
this.ensureProductTypeSupportedForSchedule(
|
||||||
ProductType[deviceDetails.productDevice.prodType],
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.updateScheduleDeviceInTuya(
|
await this.updateScheduleDeviceInTuya(
|
||||||
|
Reference in New Issue
Block a user