# HasCustomAppData

# HasCustomAppData


```
@HomeExperimentalApi
interface HasCustomAppData
```

<br />

Known direct subclasses [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), [Room](https://developers.home.google.com/reference/kotlin/com/google/home/Room)

|---|---|
| `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/Room` | An object that represents a Room in a `https://developers.home.google.com/reference/kotlin/com/google/home/Structure`. |

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

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/MutableAutomation` | Mutable attributes for an `Automation`. |

*** ** * ** ***

Interface for a Key-Value Controller.

## Summary

| ### Public functions |
|---|---|
| `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#deleteValue(kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Deletes the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#deleteValue(kotlin.String)`. |
| `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#getValue(kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Retrieves the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#getValue(kotlin.String)`. |
| `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#updateValue(kotlin.String,kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Updates the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#updateValue(kotlin.String,kotlin.String)`. |

## Public functions

### deleteValue

```
suspend fun deleteValue(key: String): Unit
```

Deletes the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#deleteValue(kotlin.String)`.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The key to delete. |

### getValue

```
suspend fun getValue(key: String): String?
```

Retrieves the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#getValue(kotlin.String)`.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The key to retrieve the value for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | The value as a `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html`, or `null` if the key does not exist. |

### updateValue

```
suspend fun updateValue(key: String, value: String): Unit
```

Updates the value associated with the given `https://developers.home.google.com/reference/kotlin/com/google/home/HasCustomAppData#updateValue(kotlin.String,kotlin.String)`.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The key to update. |
| `value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The new value. |