diff --git a/src/automation/services/automation.service.ts b/src/automation/services/automation.service.ts index c9a790d..86831f6 100644 --- a/src/automation/services/automation.service.ts +++ b/src/automation/services/automation.service.ts @@ -260,6 +260,8 @@ export class AutomationService { name: automationDetails.result.name, status: automationDetails.result.status, type: AUTOMATION_TYPE, + spaceId: automation.space.uuid, + spaceName: automation.space.spaceName, }; } catch (error) { console.warn( diff --git a/src/scene/interface/scene.interface.ts b/src/scene/interface/scene.interface.ts index c08c204..e8573cb 100644 --- a/src/scene/interface/scene.interface.ts +++ b/src/scene/interface/scene.interface.ts @@ -42,4 +42,5 @@ export interface SceneDetails { type: string; actions: Action[]; spaceId: string; + spaceName: string; } diff --git a/src/scene/services/scene.service.ts b/src/scene/services/scene.service.ts index 1a9196e..c053385 100644 --- a/src/scene/services/scene.service.ts +++ b/src/scene/services/scene.service.ts @@ -231,6 +231,8 @@ export class SceneService { const safeFetch = async (scene: any) => { try { + console.log('scene', scene); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { actions, ...sceneDetails } = await this.getScene( scene, @@ -443,7 +445,7 @@ export class SceneService { } } - async getScene(scene: SceneEntity, sceneUuid: string): Promise { + async getScene(scene: SceneEntity, spaceUuid: string): Promise { try { const { actions, name, status } = await this.fetchSceneDetailsFromTuya( scene.sceneTuyaUuid, @@ -490,7 +492,8 @@ export class SceneService { showInHome: scene.showInHomePage, type: 'tap_to_run', actions, - spaceId: sceneUuid, + spaceId: spaceUuid, + spaceName: scene.space.spaceName, }; } catch (err) { if (err instanceof BadRequestException) {