[self.home getHomeDataWithSuccess:^(ThingSmartHomeModel *homeModel) {// Get scene data in advance[self loadSceneList];} failure:^(NSError *error) { }];- (void)loadSceneList {// If the one-touch execution and automation list are empty, call the following method in advance in your code:// If the following code is not written, when using the scene business package, there may be a situation where create scene-->add task-->choose existing smart scene-->data is emptyid<ThingSmartSceneBizProtocol> impl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingSmartSceneBizProtocol)];[impl getSceneListWithHomeId:[SRHome getCurrentHome].homeId withSuccess:^(NSArray<ThingSmartSceneModel *> * _Nonnull scenes) { } failure:^(NSError * _Nonnull error) { }];}
Is this page helpful?
YesFeedbackClick for services and help
Consult
(001)844-672-5646
Submit Question