🖋️
open-api
  • Introduction
  • Header data
  • Sync devices
    • RequestFormat
    • ResponseFormat
  • Query States
    • Request Format
    • ResponseFormat
  • Execute
    • Switch
      • Request Format
      • ResponseFormat
    • BrightnessAbsolute
      • Request Format
      • ResponseFormat
    • BrightnessIncrement
      • Request Format
      • ResponseFormat
    • BrightnessDecrement
      • Request Format
      • ResponseFormat
    • Color
      • Request Format
      • ResponseFormat
    • ColorTemperature
      • Request Format
      • ResponseFormat
    • Scene
      • Request Format
      • ResponseFormat
  • Unlink
    • Request Format
    • ResponseFormat
  • Error responses
  • Report State
    • Device property changed
      • Property details
    • Device status changed
    • Device bind/unbind
Powered by GitBook
On this page

Was this helpful?

  1. Execute
  2. Switch

Request Format

Params

Type

Value

Remarks

requestId

String

4180463424101195867

Required. Id of request for ease of tracing, random string.

locale_language

String

en

intent

String

action.devices.EXECUTE

Required.

id

String

Device ID

execution → command

String

action.devices.commands.OnOff

Required.

execution → params → on

Boolean

true / false

true: turn onfalse: turn off

{
    "inputs": [
        {
            "context": {
                "locale_language": "en"
            }, 
            "intent": "action.devices.EXECUTE", 
            "payload": {
                "commands": [
                    {
                        "devices": [
                            {
                                "customData": {
                                    "region": "CN",
                                    "model": "yeelink-mono1"
                                }, 
                                "id": "M1GAxtaW9A0LXNwZWMtdjIVgoAFGA15ZWVsaW5rLW1vbm8xFRQYCDQ1MTAyMzgwFWYA"
                            }
                        ], 
                        "execution": [
                            {
                                "command": "action.devices.commands.OnOff", 
                                "params": {
                                    "on": true
                                }
                            }
                        ]
                    }
                ]
            }
        }
    ], 
    "requestId": "6529877997918554205"
}
PreviousSwitchNextResponseFormat

Last updated 5 years ago

Was this helpful?

Optional. Language code

https://cloud.google.com/translate/docs/languages