Smart Home Modes RunCycle Trait Schema

action.devices.traits.RunCycle - This trait represents any device that has an ongoing duration for its operation which can be queried. This includes, but is not limited to, devices that operate cyclically, such as washing machines, dryers, and dishwashers. Devices like these will report their total number of cycles at the start of operation, and each cycle the device is currently in while running. This allows the user to make queries such as the following:

  • What cycle is my dryer on?
  • How many cycles does the dishwasher have left?
  • What is the dryer doing?
  • When will the wash be done?

Certain devices include a duration in a non-cyclical format, however. Any device that runs for a specific amount of time can report its time remaining, without cycles. This also handles cases where cycles may not be consistent (for example, dishwashers may not always use all cycles). For instance a user could ask, How much longer will my vacuum run? which will return the amount of time in units proportional to the time remaining. This also applies to the devices listed above; How much longer will my clothes be drying? will return a duration in minutes.

Devices can return what they know, and the Assistant TTS response will form the best answer with the data available (for example, The dishwasher is running and will complete in about 20 minutes.)

RunCycle is currently a read-only trait - it has no commands, only states to query. In the future, there may be mechanisms for rerunning cycles or skipping cycles (good for sprinklers, bad for washing machines).

Device ATTRIBUTES

None

Sample SYNC Request and Response

Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.SYNC",
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "agentUserId": "1836.15267389",
    "devices": [{
      "id": "123",
      "type": "action.devices.types.DRYER",
      "traits": [
        "action.devices.traits.RunCycle"
      ],
      "name": {
        "defaultNames": ["AAA Super Dryer"],
        "name": "Washer",
        "nicknames": ["clothes dryer"]
      },
      "willReportState": true,
      "deviceInfo": {
        "manufacturer": "AAA Corporation",
        "model": "492134",
        "hwVersion": "3.2",
        "swVersion": "11.4"
      },
      "customData": {
        "fooValue": 74,
        "barValue": true,
        "bazValue": "lambtwirl"
      }
    }]
  }
}
Validator

Device STATES

State Definition
currentCycle Current cycle being performed; object of strings, keyed by language.
nextCycle Optional. Next cycle to perform; object of strings, keyed by language.
lang Language code for the cycles above. Acceptable language codes are en (English), de (German), and fr (French).
currentTotalRemainingTime Integer representing time remaining on operation, in seconds.
currentCycleRemainingTime Integer representing time remaining on current cycle, in seconds.
Example:
"currentRunCycle":[
  {
    "currentCycle": "rinse",
    "nextCycle": "spin",
    "lang": "en"
  },
  {
    "currentCycle": "spülen",
    "nextCycle": "drehen",
    "lang": "de"
  }],
"currentTotalRemainingTime": 1212,
"currentCycleRemainingTime": 301

Sample QUERY Request and Response

What is the washing machine doing?

Answer: The washing machine is in rinse for about another 5 minutes, and will be done in about 20 minutes.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.QUERY",
    "payload": {
       "devices": [{
       "id": "123",
       "customData": {
         "fooValue": 74,
         "barValue": true,
         "bazValue": "lambtwirl"
       }
      }]
    }
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "devices": {
       "123": {
         "currentRunCycle":[
           {
             "currentCycle": "rinse",
             "nextCycle": "spin",
             "lang":"en"
           }],
         "currentTotalRemainingTime": 1212,
         "currentCycleRemainingTime": 301
      }
    }]
  }
}

Device COMMANDS

None