Tuya iOS Smart Life App SDK 5.15.0
ThingSmartSceneActionFactory Class Reference

A factory design mode for create ThingSmartSceneActionModel. More...

#import <ThingSmartSceneActionFactory.h>

Inheritance diagram for ThingSmartSceneActionFactory:

Class Methods

(ThingSmartSceneActionModel *) + createDeviceDpActionWithDevId:devName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createTriggerSceneActionWithSceneId:sceneName:
 
(ThingSmartSceneActionModel *) + createSwitchAutoActionWithSceneId:sceneName:type:
 
(ThingSmartSceneActionModel *) + createDelayActionWithHours:minutes:seconds:
 
(ThingSmartSceneActionModel *) + createSendNotificationAction
 
(ThingSmartSceneActionModel *) + createCallAction
 
(ThingSmartSceneActionModel *) + createSmsAction
 
(ThingSmartSceneActionModel *) + deviceActionWithFeature:devId:deviceName:
 
(ThingSmartSceneActionModel *) + groupActionWithFeature:groupId:groupName:
 
(ThingSmartSceneActionModel *) + createDeviceDpActionWithDevId:devName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createTriggerSceneActionWithSceneId:sceneName:
 
(ThingSmartSceneActionModel *) + createSwitchAutoActionWithSceneId:sceneName:type:
 
(ThingSmartSceneActionModel *) + createDelayActionWithHours:minutes:seconds:
 
(ThingSmartSceneActionModel *) + createSendNotificationAction
 
(ThingSmartSceneActionModel *) + createCallAction
 
(ThingSmartSceneActionModel *) + createSmsAction
 
(ThingSmartSceneActionModel *) + deviceActionWithFeature:devId:deviceName:
 
(ThingSmartSceneActionModel *) + groupActionWithFeature:groupId:groupName:
 
(ThingSmartSceneActionModel *) + createDeviceDpActionWithDevId:devName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createTriggerSceneActionWithSceneId:sceneName:
 
(ThingSmartSceneActionModel *) + createSwitchAutoActionWithSceneId:sceneName:type:
 
(ThingSmartSceneActionModel *) + createDelayActionWithHours:minutes:seconds:
 
(ThingSmartSceneActionModel *) + createSendNotificationAction
 
(ThingSmartSceneActionModel *) + createCallAction
 
(ThingSmartSceneActionModel *) + createSmsAction
 
(ThingSmartSceneActionModel *) + deviceActionWithFeature:devId:deviceName:
 
(ThingSmartSceneActionModel *) + groupActionWithFeature:groupId:groupName:
 
(ThingSmartSceneActionModel *) + createDeviceDpActionWithDevId:devName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty:
 
(ThingSmartSceneActionModel *) + createTriggerSceneActionWithSceneId:sceneName:
 
(ThingSmartSceneActionModel *) + createSwitchAutoActionWithSceneId:sceneName:type:
 
(ThingSmartSceneActionModel *) + createDelayActionWithHours:minutes:seconds:
 
(ThingSmartSceneActionModel *) + createSendNotificationAction
 
(ThingSmartSceneActionModel *) + createCallAction
 
(ThingSmartSceneActionModel *) + createSmsAction
 
(ThingSmartSceneActionModel *) + deviceActionWithFeature:devId:deviceName:
 
(ThingSmartSceneActionModel *) + groupActionWithFeature:groupId:groupName:
 

Detailed Description

A factory design mode for create ThingSmartSceneActionModel.

Note
In order to facilitate the handling of multiple languages, this class does not handle the actionDisplay and actionDisplayNew fields of the ThingSmartSceneActionModel. These two properties are spliced by the developer themselves when they are created. When saving, the server will generate them according to the executiveProperty and the language environment of the interface. The property saved by the developer will not be used.

Definition at line 23 of file ThingSmartSceneActionFactory.h.

Method Documentation

◆ createCallAction [1/4]

+ (ThingSmartSceneActionModel *) createCallAction

Create a call notification action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createCallAction [2/4]

+ (ThingSmartSceneActionModel *) createCallAction

Create a call notification action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createCallAction [3/4]

+ (ThingSmartSceneActionModel *) createCallAction

Create a call notification action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createCallAction [4/4]

+ (ThingSmartSceneActionModel *) createCallAction

Create a call notification action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createDelayActionWithHours:minutes:seconds: [1/4]

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

Create a delay action.

Parameters
hourshours,range 0-5.
minutesminutes,range 0-59.
secondsseconds,range 0-59.
Returns
The ThingSmartSceneActionModel class.

◆ createDelayActionWithHours:minutes:seconds: [2/4]

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

Create a delay action.

Parameters
hourshours,range 0-5.
minutesminutes,range 0-59.
secondsseconds,range 0-59.
Returns
The ThingSmartSceneActionModel class.

◆ createDelayActionWithHours:minutes:seconds: [3/4]

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

Create a delay action.

Parameters
hourshours,range 0-5.
minutesminutes,range 0-59.
secondsseconds,range 0-59.
Returns
The ThingSmartSceneActionModel class.

◆ createDelayActionWithHours:minutes:seconds: [4/4]

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

Create a delay action.

Parameters
hourshours,range 0-5.
minutesminutes,range 0-59.
secondsseconds,range 0-59.
Returns
The ThingSmartSceneActionModel class.

◆ createDeviceDpActionWithDevId:devName:executerProperty:extraProperty: [1/4]

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

Create a device action with all param.

Parameters
devIdThe device id.
devNameThe device name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createDeviceDpActionWithDevId:devName:executerProperty:extraProperty: [2/4]

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

Create a device action with all param.

Parameters
devIdThe device id.
devNameThe device name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createDeviceDpActionWithDevId:devName:executerProperty:extraProperty: [3/4]

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

Create a device action with all param.

Parameters
devIdThe device id.
devNameThe device name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createDeviceDpActionWithDevId:devName:executerProperty:extraProperty: [4/4]

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

Create a device action with all param.

Parameters
devIdThe device id.
devNameThe device name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty: [1/4]

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

Create a group action with group's params.

Parameters
groupIdThe group id.
groupNameThe group name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty: [2/4]

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

Create a group action with group's params.

Parameters
groupIdThe group id.
groupNameThe group name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty: [3/4]

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

Create a group action with group's params.

Parameters
groupIdThe group id.
groupNameThe group name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createGroupDpActionWithGroupId:groupName:executerProperty:extraProperty: [4/4]

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

Create a group action with group's params.

Parameters
groupIdThe group id.
groupNameThe group name.
executerPropertyAction to execute, format:{dpId: <dpId's value>} eg: {"1":true}.
extraPropertyThe optional parameters, extraProperty of action.
Returns
The ThingSmartSceneActionModel class.

◆ createSendNotificationAction [1/4]

+ (ThingSmartSceneActionModel *) createSendNotificationAction

Create a push notification action.

Returns
The ThingSmartSceneActionModel class.

◆ createSendNotificationAction [2/4]

+ (ThingSmartSceneActionModel *) createSendNotificationAction

Create a push notification action.

Returns
The ThingSmartSceneActionModel class.

◆ createSendNotificationAction [3/4]

+ (ThingSmartSceneActionModel *) createSendNotificationAction

Create a push notification action.

Returns
The ThingSmartSceneActionModel class.

◆ createSendNotificationAction [4/4]

+ (ThingSmartSceneActionModel *) createSendNotificationAction

Create a push notification action.

Returns
The ThingSmartSceneActionModel class.

◆ createSmsAction [1/4]

+ (ThingSmartSceneActionModel *) createSmsAction

Create a send sms action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createSmsAction [2/4]

+ (ThingSmartSceneActionModel *) createSmsAction

Create a send sms action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createSmsAction [3/4]

+ (ThingSmartSceneActionModel *) createSmsAction

Create a send sms action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createSmsAction [4/4]

+ (ThingSmartSceneActionModel *) createSmsAction

Create a send sms action(internal use, not open).

Returns
The ThingSmartSceneActionModel class.

◆ createSwitchAutoActionWithSceneId:sceneName:type: [1/4]

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

Create an action to enable/disable an automation.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
typeAutoSwitchType.
Returns
The ThingSmartSceneActionModel class.

◆ createSwitchAutoActionWithSceneId:sceneName:type: [2/4]

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

Create an action to enable/disable an automation.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
typeAutoSwitchType.
Returns
The ThingSmartSceneActionModel class.

◆ createSwitchAutoActionWithSceneId:sceneName:type: [3/4]

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

Create an action to enable/disable an automation.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
typeAutoSwitchType.
Returns
The ThingSmartSceneActionModel class.

◆ createSwitchAutoActionWithSceneId:sceneName:type: [4/4]

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

Create an action to enable/disable an automation.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
typeAutoSwitchType.
Returns
The ThingSmartSceneActionModel class.

◆ createTriggerSceneActionWithSceneId:sceneName: [1/4]

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

Create an action to trigger a scene.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
Returns
The ThingSmartSceneActionModel class.

◆ createTriggerSceneActionWithSceneId:sceneName: [2/4]

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

Create an action to trigger a scene.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
Returns
The ThingSmartSceneActionModel class.

◆ createTriggerSceneActionWithSceneId:sceneName: [3/4]

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

Create an action to trigger a scene.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
Returns
The ThingSmartSceneActionModel class.

◆ createTriggerSceneActionWithSceneId:sceneName: [4/4]

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

Create an action to trigger a scene.

Parameters
sceneIdThe sceneId id.
sceneNameThe sceneName name.
Returns
The ThingSmartSceneActionModel class.

◆ deviceActionWithFeature:devId:deviceName: [1/4]

+ (ThingSmartSceneActionModel *) deviceActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
devId: (NSString *)  devId
deviceName: (NSString *)  deviceName 

The new method for create device action with params.

Parameters
featureThe device feature model. Detail see ThingSmartSceneCoreFeatureModel.
devIdThe device ID.
deviceNameThe device name.
Returns
The ThingSmartSceneActionModel class.

◆ deviceActionWithFeature:devId:deviceName: [2/4]

+ (ThingSmartSceneActionModel *) deviceActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
devId: (NSString *)  devId
deviceName: (NSString *)  deviceName 

The new method for create device action with params.

Parameters
featureThe device feature model. Detail see ThingSmartSceneCoreFeatureModel.
devIdThe device ID.
deviceNameThe device name.
Returns
The ThingSmartSceneActionModel class.

◆ deviceActionWithFeature:devId:deviceName: [3/4]

+ (ThingSmartSceneActionModel *) deviceActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
devId: (NSString *)  devId
deviceName: (NSString *)  deviceName 

The new method for create device action with params.

Parameters
featureThe device feature model. Detail see ThingSmartSceneCoreFeatureModel.
devIdThe device ID.
deviceNameThe device name.
Returns
The ThingSmartSceneActionModel class.

◆ deviceActionWithFeature:devId:deviceName: [4/4]

+ (ThingSmartSceneActionModel *) deviceActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
devId: (NSString *)  devId
deviceName: (NSString *)  deviceName 

The new method for create device action with params.

Parameters
featureThe device feature model. Detail see ThingSmartSceneCoreFeatureModel.
devIdThe device ID.
deviceNameThe device name.
Returns
The ThingSmartSceneActionModel class.

◆ groupActionWithFeature:groupId:groupName: [1/4]

+ (ThingSmartSceneActionModel *) groupActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
groupId: (NSString *)  groupId
groupName: (NSString *)  groupName 

The new method for create group action with params.

Parameters
featureThe group feature model. Detail see ThingSmartSceneCoreFeatureModel.
groupIdThe group ID.
groupNameThe group name.
Returns
The ThingSmartSceneActionModel class.

◆ groupActionWithFeature:groupId:groupName: [2/4]

+ (ThingSmartSceneActionModel *) groupActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
groupId: (NSString *)  groupId
groupName: (NSString *)  groupName 

The new method for create group action with params.

Parameters
featureThe group feature model. Detail see ThingSmartSceneCoreFeatureModel.
groupIdThe group ID.
groupNameThe group name.
Returns
The ThingSmartSceneActionModel class.

◆ groupActionWithFeature:groupId:groupName: [3/4]

+ (ThingSmartSceneActionModel *) groupActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
groupId: (NSString *)  groupId
groupName: (NSString *)  groupName 

The new method for create group action with params.

Parameters
featureThe group feature model. Detail see ThingSmartSceneCoreFeatureModel.
groupIdThe group ID.
groupNameThe group name.
Returns
The ThingSmartSceneActionModel class.

◆ groupActionWithFeature:groupId:groupName: [4/4]

+ (ThingSmartSceneActionModel *) groupActionWithFeature: (ThingSmartSceneCoreFeatureModel *)  feature
groupId: (NSString *)  groupId
groupName: (NSString *)  groupName 

The new method for create group action with params.

Parameters
featureThe group feature model. Detail see ThingSmartSceneCoreFeatureModel.
groupIdThe group ID.
groupNameThe group name.
Returns
The ThingSmartSceneActionModel class.

The documentation for this class was generated from the following files: