TuyaSmartSceneActionFactory Class Reference

Inherits from NSObject
Declared in TuyaSmartSceneActionFactory.h

+ createDeviceDpActionWithDevId:devName:executerProperty:extraProperty:

zh^ 创建一个设备dp动作 zh$ en^ Create a device action with device’s datapoint. en$

+ (TuyaSmartSceneActionModel *)createDeviceDpActionWithDevId:(NSString *)devId devName:(NSString *)devName executerProperty:(NSDictionary *)executerProperty extraProperty:(NSDictionary *)extraProperty

Parameters

devId

zh^ 设备Id zh$ en^ device’s Id en$

devName

zh^ 设备名称 zh$ en^ device’s name en$

executerProperty

zh^ 要执行的任务 格式: { dpId: dp点值 } 例:{“1”:@(YES)} zh$ en^ action to execute, format:{dpId: <dpId’s value>} eg: {“1”:true}en$

extraProperty

zh^ 额外信息如百分比类型,非必传 zh$ en^ action’s extraProperty,if needed en$

Return Value

action model

Discussion

zh^ 创建一个设备dp动作 zh$ en^ Create a device action with device’s datapoint. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty:

zh^ 创建一个群组dp动作 zh$ en^ Create a group action with group’s datapoint. en$

+ (TuyaSmartSceneActionModel *)createGroupDpActionWithGroupId:(NSString *)groupId groupName:(NSString *)groupName executerProperty:(NSDictionary *)executerProperty extraProperty:(NSDictionary *)extraProperty

Parameters

groupId

zh^ 群组Id zh$ en^ group’s Id en$

groupName

zh^ 群组名称 zh$ en^ group’s name en$

executerProperty

zh^ 要执行的群组任务 格式: { dpId: dp点值 } 例:{“1”:@(YES)} zh$ en^ action to execute, format:{dpId: <dpId’s value>} eg: {“1”:true}en$

extraProperty

zh^ 额外信息如百分比类型,非必传 zh$ en^ action’s extraProperty,if needed en$

Return Value

action model

Discussion

zh^ 创建一个群组dp动作 zh$ en^ Create a group action with group’s datapoint. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createTriggerSceneActionWithSceneId:sceneName:

zh^ 创建一个执行某场景的动作 zh$ en^ Create a action to trigger a scene. en$

+ (TuyaSmartSceneActionModel *)createTriggerSceneActionWithSceneId:(NSString *)sceneId sceneName:(NSString *)sceneName

Parameters

sceneId

zh^ 场景Id zh$ en^ scene Id en$

sceneName

zh^ 场景名称 zh$ en^ scene name en$

Return Value

action model

Discussion

zh^ 创建一个执行某场景的动作 zh$ en^ Create a action to trigger a scene. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createSwitchAutoActionWithSceneId:sceneName:type:

zh^ 创建一个开关某个自动化的动作 zh$ en^ Create a action to enable/disable a automation. en$

+ (TuyaSmartSceneActionModel *)createSwitchAutoActionWithSceneId:(NSString *)sceneId sceneName:(NSString *)sceneName type:(AutoSwitchType)type

Parameters

sceneId

zh^ 场景Id zh$ en^ scene Id en$

sceneName

zh^ 场景名称 zh$ en^ scene name en$

type

zh^ 操作类型 zh$ en^ operation type en$

Return Value

action model

Discussion

zh^ 创建一个开关某个自动化的动作 zh$ en^ Create a action to enable/disable a automation. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createDelayActionWithHours:minutes:seconds:

zh^ 创建一个延时动作 zh$ en^ Create a delay action. en$

+ (TuyaSmartSceneActionModel *)createDelayActionWithHours:(NSString *)hours minutes:(NSString *)minutes seconds:(NSString *)seconds

Parameters

hours

zh^ 小时数0-5 zh$ en^ hours,range 0-5 en$

minutes

zh^ 分钟数0-59 zh$ en^ minutes,range 0-59 en$

seconds

zh^ 秒数 0-59 zh$ en^ seconds,range 0-59 en$

Return Value

action model

Discussion

zh^ 创建一个延时动作 zh$ en^ Create a delay action. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createSendNotificationAction

zh^ 创建一个推送通知动作 zh$ en^ Create a push notification action. en$

+ (TuyaSmartSceneActionModel *)createSendNotificationAction

Return Value

action model

Discussion

zh^ 创建一个推送通知动作 zh$ en^ Create a push notification action. en$

Declared In

TuyaSmartSceneActionFactory.h

+ createCallAction

zh^ 创建一个电话通知动作(内部使用,不开放)。 zh$ en^ Create a call notification action(internal use, not open). en$

+ (TuyaSmartSceneActionModel *)createCallAction

Return Value

action model

Discussion

zh^ 创建一个电话通知动作(内部使用,不开放)。 zh$ en^ Create a call notification action(internal use, not open). en$

Declared In

TuyaSmartSceneActionFactory.h

+ createSmsAction

zh^ 创建一个短信通知动作(内部使用,不开放)。 zh$ en^ Create a send sms action(internal use, not open). en$

+ (TuyaSmartSceneActionModel *)createSmsAction

Return Value

action model

Discussion

zh^ 创建一个短信通知动作(内部使用,不开放)。 zh$ en^ Create a send sms action(internal use, not open). en$

Declared In

TuyaSmartSceneActionFactory.h