TuyaSmartSceneConditionFactory Class Reference

Inherits from NSObject
Declared in TuyaSmartSceneConditionFactory.h

+ createDeviceConditionWithDevice:dpModel:exprModel:

zh^ 创建一个设备条件。 zh$ en^ Create a device condition. en$

+ (TuyaSmartSceneConditionModel *)createDeviceConditionWithDevice:(TuyaSmartDeviceModel *)device dpModel:(TuyaSmartSceneDPModel *)dpModel exprModel:(TuyaSmartSceneExprModel *)exprModel

Parameters

device

The device model to create condition.

dpModel

The dpModel to create condition.

exprModel

Create with TYSmartSceneConditionExprBuilder.

Return Value

TuyaSmartSceneConditionModel object.

Discussion

zh^ 创建一个设备条件。 zh$ en^ Create a device condition. en$

Declared In

TuyaSmartSceneConditionFactory.h

+ createPirConditionWithDevice:dpModel:exprModel:

zh^ 创建一个人体传感器设备条件。 zh$ en^ Create a person ir device condition. en$

+ (TuyaSmartSceneConditionModel *)createPirConditionWithDevice:(TuyaSmartDeviceModel *)device dpModel:(TuyaSmartSceneDPModel *)dpModel exprModel:(TuyaSmartSceneExprModel *)exprModel

Parameters

device

The device model to create condition.

dpModel

The dpModel to create condition.

exprModel

Create with TYSmartSceneConditionExprBuilder.

Return Value

TuyaSmartSceneConditionModel object.

Discussion

zh^ 创建一个人体传感器设备条件。 zh$ en^ Create a person ir device condition. en$

Declared In

TuyaSmartSceneConditionFactory.h

+ createWhetherConditionWithCity:dpModel:exprModel:

zh^ 创建一个气象条件。 zh$ en^ Create an whether condition. en$

+ (TuyaSmartSceneConditionModel *)createWhetherConditionWithCity:(TuyaSmartCityModel *)city dpModel:(TuyaSmartSceneDPModel *)dpModel exprModel:(TuyaSmartSceneExprModel *)exprModel

Parameters

city

Whether condition need a city.

dpModel

The whether datapoint.

exprModel

Create with TYSmartSceneConditionExprBuilder.

Return Value

TuyaSmartSceneConditionModel object.

Discussion

zh^ 创建一个气象条件。 zh$ en^ Create an whether condition. en$

Declared In

TuyaSmartSceneConditionFactory.h

+ createTimerConditionWithExprModel:

zh^ 创建一个定时条件。 zh$ en^ Create a timer condition. en$

+ (TuyaSmartSceneConditionModel *)createTimerConditionWithExprModel:(TuyaSmartSceneExprModel *)exprModel

Parameters

exprModel

Create with TYSmartSceneConditionExprBuilder.

Return Value

TuyaSmartSceneConditionModel object.

Discussion

zh^ 创建一个定时条件。 zh$ en^ Create a timer condition. en$

Declared In

TuyaSmartSceneConditionFactory.h

+ createGeoFenceConditionWithGeoType:geoLati:geoLonti:geoRadius:geoTitle:

zh^ 创建地理围栏条件,保存之后返回的conditionModel会生成entityId,上报这个entityId代表触发了地理围栏。 zh$ en^ Create a GeoFence conditon,conditionModel’s entityId will be assigned after scene saved, the entityId represent the geoFence id, will should be upload to server by http API to trigger the automation. en$

+ (TuyaSmartSceneConditionModel *)createGeoFenceConditionWithGeoType:(GeoFenceType)type geoLati:(CGFloat)latitude geoLonti:(CGFloat)longitude geoRadius:(CGFloat)radius geoTitle:(NSString *)geoTitle

Parameters

type

zh^ 离开或者到达类型 zh$ en^ reach or leave the place en$

latitude

zh^ 纬度 zh$ en^ latitude en$

longitude

zh^ 经度 zh$ en^ longitude en$

radius

zh^ 以经纬度为圆心的半径 zh$ en^ consider latitude and longitude as the center of a circle, this property represent the radius. en$

geoTitle

zh^ 定位地点名称 zh$ en^ lacation name en$

Return Value

condition model

Discussion

zh^ 创建地理围栏条件,保存之后返回的conditionModel会生成entityId,上报这个entityId代表触发了地理围栏。 zh$ en^ Create a GeoFence conditon,conditionModel’s entityId will be assigned after scene saved, the entityId represent the geoFence id, will should be upload to server by http API to trigger the automation. en$

Declared In

TuyaSmartSceneConditionFactory.h

+ createManualExecuteCondition

zh^ 创建一个”手动执行“条件。这个条件不应该被保存到云端,在调用保存智能接口的时候,应该删除掉这个条件。 zh$ en^ Create an “manual execute” condition.This condition should not be saved to cloud server, when you call the API to save a smart, you should delete this type of condition first. en$

+ (TuyaSmartSceneConditionModel *)createManualExecuteCondition

Return Value

condition model

Discussion

zh^ 创建一个”手动执行“条件。这个条件不应该被保存到云端,在调用保存智能接口的时候,应该删除掉这个条件。 zh$ en^ Create an “manual execute” condition.This condition should not be saved to cloud server, when you call the API to save a smart, you should delete this type of condition first. en$

Declared In

TuyaSmartSceneConditionFactory.h