TuyaSmartRoom Class Reference

Inherits from NSObject
Declared in TuyaSmartRoom.h

  roomModel

@property (nonatomic, strong, readonly) TuyaSmartRoomModel *roomModel

  deviceList

@property (nonatomic, strong, readonly) NSArray<TuyaSmartDeviceModel*> *deviceList

  groupList

@property (nonatomic, strong, readonly) NSArray<TuyaSmartGroupModel*> *groupList

+ roomWithRoomId:homeId:

Get room instance 获取 room 对象

+ (instancetype)roomWithRoomId:(long long)roomId homeId:(long long)homeId

Parameters

roomId

Room ID

homeId

Home ID

Return Value

instance

Discussion

Get room instance 获取 room 对象

Declared In

TuyaSmartRoom.h

– initWithRoomId:homeId:

Get room instance 获取 room 对象

- (instancetype)initWithRoomId:(long long)roomId homeId:(long long)homeId

Parameters

roomId

Room ID

homeId

Home ID

Return Value

instance

Discussion

Get room instance 获取 room 对象

Declared In

TuyaSmartRoom.h

– init

- (instancetype)init

– updateRoomName:success:failure:

Rename the room 更新房间名字

- (void)updateRoomName:(NSString *)roomName success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

roomName

Room name

success

Success block

failure

Failure block

Discussion

Rename the room 更新房间名字

Declared In

TuyaSmartRoom.h

– addDeviceWithDeviceId:success:failure:

Add device to the room 添加设备到房间

- (void)addDeviceWithDeviceId:(NSString *)deviceId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

deviceId

Device ID

success

Success block

failure

Failure block

Discussion

Add device to the room 添加设备到房间

Declared In

TuyaSmartRoom.h

– removeDeviceWithDeviceId:success:failure:

Remove device from the room 从房间中移除设备

- (void)removeDeviceWithDeviceId:(NSString *)deviceId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

deviceId

Device ID

success

Success block

failure

Failure block

Discussion

Remove device from the room 从房间中移除设备

Declared In

TuyaSmartRoom.h

– addGroupWithGroupId:success:failure:

Add group to the room 添加群组到房间

- (void)addGroupWithGroupId:(NSString *)groupId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

groupId

Group ID

success

Success block

failure

Failure block

Discussion

Add group to the room 添加群组到房间

Declared In

TuyaSmartRoom.h

– removeGroupWithGroupId:success:failure:

Remove group from the room 从房间中移除群组

- (void)removeGroupWithGroupId:(NSString *)groupId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

groupId

Group ID

success

Success block

failure

Failure block

Discussion

Remove group from the room 从房间中移除群组

Declared In

TuyaSmartRoom.h

– saveBatchRoomRelationWithDeviceGroupList:success:failure:

Batch modification of the relationship between rooms, groups and devices 批量修改房间与群组、设备的关系

- (void)saveBatchRoomRelationWithDeviceGroupList:(NSArray<NSString*> *)deviceGroupList success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

deviceGroupList

List of devices or groups

success

Success block

failure

Failure block

Discussion

Batch modification of the relationship between rooms, groups and devices 批量修改房间与群组、设备的关系

Declared In

TuyaSmartRoom.h