Smart Home OnOff Trait Schema

action.devices.traits.OnOff - The basic on and off functionality for any device that has binary on and off, including plugs and switches as well as many future devices.

Device ATTRIBUTES

Devices with this trait may report the following attributes as part of the SYNC operation. To learn more about handling SYNC intents, see Intent fulfillment.

Attributes Type Description
commandOnlyOnOff Boolean

(Default: false)

Indicates if the device can only controlled through commands, and cannot be queried for state information.

queryOnlyOnOff Boolean

(Default: false)

Indicates if the device can only be queried for state information, and cannot be controlled through commands.

Examples

Device that supports on/off command and reporting states.

{
  "commandOnlyOnOff": false,
  "queryOnlyOnOff": false
}

Device that only supports on/off commands.

{
  "commandOnlyOnOff": true,
  "queryOnlyOnOff": false
}

Device (typically sensor) that only supports reporting on/off state.

{
  "queryOnlyOnOff": true,
  "commandOnlyOnOff": false
}

Device STATES

Entities with this trait may report the following states as part of the QUERY operation. To learn more about handling QUERY intents, see Intent fulfillment.

States Type Description
on Boolean

Whether a device with an on/off switch is on or off.

Examples

Is the device on?

{
  "on": true
}

Is the device off?

{
  "on": false
}

Device COMMANDS

Devices with this trait may respond to the following commands as part of the EXECUTE operation. To learn more about handling EXECUTE intents, see Intent fulfillment.

action.devices.commands.OnOff

Turn the device on or off.

Parameters

Parameters Type Description
on Boolean

Required.

Whether to turn the device on or off.

Examples

Turn the device on.

{
  "command": "action.devices.commands.OnOff",
  "params": {
    "on": true
  }
}

Turn the device off.

{
  "command": "action.devices.commands.OnOff",
  "params": {
    "on": false
  }
}

Sample utterances

de-DE

  • Bitte Licht aus
  • Bitte das Wohnzimmer einschalten
  • Bitte die Küche ausstellen
  • Ist der Staubsauger an
  • Ist in der Küche noch was an
  • Lampen an

en-US

  • are the lights off
  • turn off the AC
  • turn on my lights
  • what is on in the kitchen ?

es-ES

  • enciende el robot de limpieza
  • enciéndeme el salón

fr-FR

  • Tu peux éteindre le salon ?
  • allume la chambre
  • allume les lumières
  • est-ce que la lumière de la cuisine est éteinte
  • qu'est-ce qui est allumé dans la cuisine
  • éteins les lumières

hi-IN

  • किचन को ऑन करो
  • किचन में कुछ ऑन है?
  • बत्तियाँ जला दें
  • बालकनी ऑफ कर दो
  • लाइट आन है क्या
  • लाइट ऑफ करो

it-IT

  • Accendimi la luce in cucina
  • Ho spento la luce in bagno ?
  • accendere in cucina
  • ho lasciato il bagno acceso?
  • spegni la luce della camera
  • spengi camera bimbi

ja-JP

  • エアコン はついてる
  • キッチン で何がオンになっていますか
  • ベッドルーム をつけて
  • リビング をオフにして
  • 照明 をオンにして
  • 照明 を消して

ko-KR

  • 거실 꺼 줘
  • 거실 에어컨 전원 켜
  • 거실 켜 줘
  • 켜져 있어
  • 에어컨 전원 꺼 줘
  • 주방 에 뭐 켜져 있어

nl-NL

  • babykamer aandoen
  • doe het licht aan
  • doe het licht uit
  • staat de droger aan
  • staat er iets aan in de keuken

pt-BR

  • Acender a luz .
  • Apagar a luz .
  • a sala está apagada?
  • acender a sala
  • eu apaguei luz do quarto ?
  • quero desligar o quarto

sv-SE

  • stäng av lampan
  • sätt på ljuset
  • vad är på i badrummet
  • Är badrumslampan på?

Device ERRORS

See the full list of errors and exceptions.