About Automations
Enterprise Automations provide additional features not available in the base Automations API. To learn the basics of Automations in SmartThings, see the Getting Started With Automations page.
Reference documentation for the Enterprise version of Rules and Scenes can be found in the links below:
Key differences for Automations in Enterprise API
Scenes
In the base Automations API, scenes are only able to be viewed and run. The Enterprise API provides full CRUD support for scenes. The structure of Scenes is the same as Rules, the difference being that Scenes cannot contain programmatic actions such as IfAction or EveryAction.
Rules
Additional actions are available for Rules in the enterprise API - below is a list of the available actions.
Scene
Run a scene
- Allows for the programmatic execution of a Scene via a Rule.
In the example below, an automation with this action will run the specific Scene.
{
"scene": {
"scenes": [
"cd00b496-8d06-4fd2-9ea5-3684agdf544b"
]
}
}
Notification
Send a notification
- Users with the SmartThings App installed can receive push notifications with this Action.
In the example below, all users with access to the location will receive a push notification.
{
"notification": {
"push": {
"title": "Push notification for Location.",
"message": "All members of the location will receive this message."
}
}
}
In the example below, only the specified user will receive a push notification.
{
"notification": {
"push": {
"title": "Push Notification for specific user.",
"message": "Only the specific user will receive this message.",
"target": {
"locationId": "852b3d7g-426a-b32g-1ba8-58af48efdbcb",
"userUuids": [
"2f344227-5114-8195-91f6-z08bfa3ga13g"
]
}
}
}
}
- Audio notifications can be sent to Smart Speakers and can be further customized by choice of voice.
In the example below, an audio notification using Bixby as the voice assistant will be sent to the specified device.
{
"notification": {
"audio": {
"message": "This text will be played as Audio.",
"devices": [
"e1146b33-d841-5445-baf2-204dbe188771"
],
"ttsProvider": {
"provider": "Bixby",
"locale": "en-us",
"profile": "M02",
"output": {
"format": "mp3"
}
}
}
}
}
Toggle
Toggle the switch state of a single or multiple device(s)
- Commonly used in conjunction with the Button capability to turn lights on & off.
In the example below, the specified device will toggle between on & off states when this action runs.
{
"toggle": {
"devices": [
"e1146b33-d841-5445-baf2-204dbe188771"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
}
Limit
Set a limit of how many times a particular automation or part of an automation should run.
- Flexible options allow for the limiting of automation executions per a selected time window.
- If selecting a period of 'Lifetime', the automation will be automatically deleted after the limit is reached.
In the example below, an automation with this action will be automatically deleted after it runs once.
{
"limit": {
"count": 1,
"period": "Lifetime",
"actions": [
{
"command": {
"devices": [
"e1146b33-d841-5445-baf2-204dbe188771"
],
"commands": [
{
"component": "main",
"capability": "switch",
"command": "off"
}
]
}
}
]
}
}
Batch Automation Management
To enable large deployments of automations, convenience APIs are provided to manage the creation of large numbers of automations at a single time. See the Batch API page for more information.