[self.home getHomeDataWithSuccess:^(ThingSmartHomeModel *homeModel) {// 提前获取场景数据[self loadSceneList];} failure:^(NSError *error) { }];- (void)loadSceneList {// 获取 一键执行、自动化列表为空时, 在您的代码中 提前调用以下方法:// 如果未写下面代码,在使用场景业务包时,可能存在 创建场景-->添加任务-->选择已有智能场景-->数据为空的情况id<ThingSmartSceneBizProtocol> impl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingSmartSceneBizProtocol)];[impl getSceneListWithHomeId:[SRHome getCurrentHome].homeId withSuccess:^(NSArray<ThingSmartSceneModel *> * _Nonnull scenes) { } failure:^(NSError * _Nonnull error) { }];}
该内容对您有帮助吗?
是意见反馈点击获取服务和帮助
智能客服
400-881-8611
提交工单