TuyaSmartHomeManager Class Reference

Inherits from NSObject
Declared in TuyaSmartHomeManager.h

  delegate

@property (nonatomic, weak) id<TuyaSmartHomeManagerDelegate> delegate

  homes

@property (nonatomic, copy, readonly) NSArray<TuyaSmartHomeModel*> *homes

– getHomeListWithSuccess:failure:

get homes list. if you want to get home deatails, need to initialize a home, call getHomeDetailWithSuccess: failure: 获取家庭列表,如果要获取具体家庭的详情,需要去初始化一个home,调用接口getHomeDetailWithSuccess:failure:

- (void)getHomeListWithSuccess:(void ( ^ ) ( NSArray<TuyaSmartHomeModel*> *homes ))success failure:(TYFailureError)failure

Parameters

success

Success block

failure

Failure block

Discussion

get homes list. if you want to get home deatails, need to initialize a home, call getHomeDetailWithSuccess: failure: 获取家庭列表,如果要获取具体家庭的详情,需要去初始化一个home,调用接口getHomeDetailWithSuccess:failure:

Declared In

TuyaSmartHomeManager.h

– addHomeWithName:geoName:rooms:latitude:longitude:success:failure:

Adds a new home 添加家庭

- (void)addHomeWithName:(NSString *)homeName geoName:(NSString *)geoName rooms:(NSArray<NSString*> *)rooms latitude:(double)latitude longitude:(double)longitude success:(TYSuccessLongLong)success failure:(TYFailureError)failure

Parameters

homeName

Home name

geoName

City name

rooms

Rooms list

latitude

Lat

longitude

Lon

success

Success block

failure

Failure block

Discussion

Adds a new home 添加家庭

Declared In

TuyaSmartHomeManager.h

– sortHomeList:success:failure:

Home sort 家庭排序

- (void)sortHomeList:(NSArray<TuyaSmartHomeModel*> *)homeList success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

homeList

Homes list

success

Success block

failure

Failure block

Discussion

Home sort 家庭排序

Declared In

TuyaSmartHomeManager.h

– joinFamilyWithHomeId:action:success:failure:

Accept or reject to shared home 接受或拒绝加⼊分享过来的家庭

- (void)joinFamilyWithHomeId:(long long)homeId action:(BOOL)isAccept success:(TYSuccessBOOL)success failure:(TYFailureError)failure

Parameters

homeId

Home Id

isAccept

Whether to accept the invitation

success

Success block

failure

Failure block

Discussion

Accept or reject to shared home 接受或拒绝加⼊分享过来的家庭

Declared In

TuyaSmartHomeManager.h