# HasId


```
interface HasId
```

<br />

Known direct subclasses [AutomationPartPath](https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationPartPath), [AutomationSuggestion](https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationSuggestion), [Automation](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation), [HomeDevice](https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice), [HomeEntityType](https://developers.home.google.com/reference/kotlin/com/google/home/HomeEntityType), [Room](https://developers.home.google.com/reference/kotlin/com/google/home/Room), [Structure](https://developers.home.google.com/reference/kotlin/com/google/home/Structure), [UnknownEntity](https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationPartPath` | Represents a path to a specific part within a device. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationSuggestion` | The main representation of an automation suggestion. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation` | The main representation an automation, composed of various types of Automation nodes, including `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Starter` instances, `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Condition` instances, `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action` instances, and more. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/HomeDevice` | A device supporting traits, commands, and subscriptions. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/HomeEntityType` | Common base interface for all first-class hydrated entities in the Home Graph. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/Room` | An object that represents a Room in a `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/Structure` | The top-level organizing construct for the `https://developers.home.google.com/reference/kotlin/com/google/home/Home`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity` | An unrecognized entity. |

Known indirect subclasses [DeviceGroup](https://developers.home.google.com/reference/kotlin/com/google/home/DeviceGroup), [MutableAutomation](https://developers.home.google.com/reference/kotlin/com/google/home/automation/MutableAutomation)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/DeviceGroup` | Domain entity representing a device group in the Home Graph. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MutableAutomation` | Mutable attributes for an `Automation`. |

*** ** * ** ***

Entities in the SDK present a stable ID for comparing `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-collection/index.html`s and retrieving entities directly.

## Summary

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/Id` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasId#id()` Opaque ID for the object. |

## Public properties

### id

```
val id: Id
```

Opaque ID for the object. Used for comparison and `https://developers.home.google.com/reference/kotlin/com/google/home/HomeObjectsFlow#get(com.google.home.Id)`.