# Smart Home SoftwareUpdate Trait Schema

`action.devices.traits.SoftwareUpdate` - This trait belongs to devices that support software updates such as a router.

> [!NOTE]
> **Note:** You should use [secondary user verification](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification) for this trait with the `DOOR`, `GARAGE`, `GATE`, or `WINDOW` device type.

## Device ATTRIBUTES

None.

## Device STATES

Entities with this trait may report the following
states as part of the [`QUERY`](https://developers.home.google.com/cloud-to-cloud/intents/query) operation. To learn
more about handling `QUERY` intents, see
[Intent fulfillment](https://developers.home.google.com/cloud-to-cloud/integration/query-execute).

| States | Type | Description |
|---|---|---|
| `lastSoftwareUpdateUnixTimestampSec` | *Integer* | **Required.** The Unix timestamp (number of seconds since the Unix Epoch) of the last successful software update. The Unix Epoch is 00:00:00, 1 January 1970, UTC. |

#### Examples

*When was my device last updated? (2000/1/1)*

```
{
  "lastSoftwareUpdateUnixTimestampSec": 946652400
}
```

## Device COMMANDS

Devices with this trait may respond to the following
commands as part of the [`EXECUTE`](https://developers.home.google.com/cloud-to-cloud/intents/execute) operation. To learn
more about handling `EXECUTE` intents, see
[Intent fulfillment](https://developers.home.google.com/cloud-to-cloud/integration/query-execute#handle_execute_intents).

### `action.devices.commands.SoftwareUpdate`

Update the device.

#### Parameters

| Parameters | Type | Description |
|---|---|---|
| No properties |||

#### Examples

*Update the software on my device.*

```
{
  "command": "action.devices.commands.SoftwareUpdate",
  "params": {}
}
```

## Device ERRORS

See the full list of [errors and exceptions](https://developers.home.google.com/cloud-to-cloud/intents/errors-exceptions).