- (void)viewDidLoad {[super viewDidLoad];// Monitor whether the home has been switched[[NSNotificationCenter defaultCenter] addObserver:selfselector:@selector(homeIdDidChangedTest) name:@"kThingTPNotificationHomeIdDidChanged" object:nil];}- (void)homeIdDidChangedTest {NSLog(@"\n== The home has been switched");id<ThingFamilyProtocol> familyImpl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingFamilyProtocol)];ThingSmartHome *home = [ThingSmartHome homeWithHomeId:[familyImpl currentFamilyId]];NSLog(@"\n== The current home is: %@" , home.homeModel.name );}
Is this page helpful?
YesFeedbackClick for services and help
Consult
(001)844-672-5646
Submit Question