Mode

Modes can be thought of as behavior filters for your home. Users want to change how things act or behave in their home based on the Mode you’re in.

SmartThings developers cannot create a new Mode. The most common way to interact with a Mode instance is by using the Location to get Mode information:

// Get the current Mode
def curMode = location.currentMode

// Get a list of all Modes for this location
def allModesForLocation = location.modes

getId()

The unique internal system identifier of the Mode.

Signature:
String getId()
Returns:
String - the unique internal system identifier for the Mode.
def curMode = location.currentMode
log.debug "The current Mode ID is: ${curMode.id}"

getName()

The name of the Mode.

Signature:
String getName()
Returns:
String - the name of the Mode, usually assigned by the user.

Example:

def curMode = location.currentMode
log.debug "The current mode name is: ${curMode.name}"