Generate Temperature Control Template (High Temperature)

Last Updated on : 2023-06-21 07:12:53download

Generate a temperature control scene template. When the human presence sensor detects a person and the temperature sensor detects that the temperature is higher than the threshold, the air conditioner will be automatically powered on to achieve the specified temperature.

API address

POST: /v1.0/iot-03/scene-templates/10000

Request parameter

Description of body

Parameter name Type IN Required Description
env_temp Integer false The ambient temperature.
device_temp Integer false The specified temperature of the device.
prototype_name String false The name of the template.
prototype_desc String false The description of the template.
effect_days String false The days in a week when the template is effective. The 7-digit string represents Sunday to Saturday in sequence. Valid values: 0: ineffective. 1: effective.
begin_time String false The start time.
end_time String false The end time.

Return parameter

Parameter name Type Description
result Boolean Indicates whether the operation is successful.

Request example

POST: /v1.0/iot-03/scene-templates/10000
{ "prototype_name": "AC Under High Temperature", "prototype_desc": "The air conditioner is switched on under high temperature.", "effect_days": "1111111", "begin_time": "00:00", "end_time": "23:59", "env_temp": 30, "device_temp": 20 }

Return example

{ "result": true, "t": 1623837209807, "success": true }

Error code

For more information, see error code.