Smart Home Scene Trait Schema
action.devices.traits.Scene
- This trait is used to implement virtual devices together with the SCENE device type.
See the Scene type guide for more information.
For example, if a device allows users to configure one-touch grouping of
commands — setting lights to specific colors, or sequencing various security
features, or any other combination of activities — this configuration can
be exposed through SYNC
as a named scene, and the Assistant will make these
scenes available to users through simple activation grammar:
- Start Party Mode.
- Activate midnight scene.
As virtual objects, scenes can be placed in rooms (if relevant) for disambiguation:
- Start party time in the kitchen.
- Activate nightlight mode in the bedrooms.
One difference between scenes and physical targets is that the Assistant will automatically apply plural effects to Scene commands, allowing users to trigger scenes across multiple partners. For example, if a user has a "party mode" scene on two different partners, one for security and one for lights, Activate party mode will trigger both.
Scenes will interact well with upcoming Personal Actions for custom grammar (for example, Activate Party Mode -> Let's get the party started!).
Scenes should always have user-provided names versus default "BobCo Scene"
naming. Each scene is its own virtual device, with its own name(s).
User-provided names may come in from SYNC
.
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 |
---|---|---|
sceneReversible |
Boolean |
(Default: Indicates that this scene can be cancelled. This attribute is only relevant for scenes that modify state and remember previous state. The device supports the |
Examples
Device that supports a reversible scene.
{ "sceneReversible": true }
Device STATES
None.
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.ActivateScene
Activate or deactivate a scene.
Parameters
Parameters | Type | Description |
---|---|---|
deactivate |
Boolean |
Required. True to cancel a scene if it is reversible, false to activate a scene. |
Examples
Activate a scene by name.
{ "command": "action.devices.commands.ActivateScene", "params": { "deactivate": false } }
Deactivate a scene by name.
{ "command": "action.devices.commands.ActivateScene", "params": { "deactivate": true } }