# Source: https://developers.home.google.com/apis/android/sample-app/build This document outlines how to build and run the Google Home APIs for Android sample app. ### Prerequisites **To build and install:** * Android Studio 2024.2.1 ("Ladybug") or later. * Android debugger (`adb`). **To test the Home APIs:** * An Android device (Android 10+) with a developer Google Account. * A Wi-Fi network. * A [Google hub that supports the Home APIs](/apis/android/sdk#supported_hubs) is required to control Matter devices. * At least one supported device. If using Thread, the hub must be a Thread border router. The sample app supports: * Color Temperature Light (on/off, brightness) * Contact Sensor (boolean state) * Dimmable Light (on/off, brightness) * Extended Color Light (on/off, brightness) * Generic Switch * Occupancy Sensor (occupancy sensing) * On/Off Light (on/off, brightness) * On/Off Light Switch * On/Off Plug-in Unit (on/off) * On/Off Sensor ### Download the Source Code The [source code](https://github.com/google-home/google-home-api-sample-app-android) is available on GitHub. ```bash git clone https://github.com/google-home/google-home-api-sample-app-android.git ``` ### Set up the SDK The Home APIs for Android are in open beta and not yet in standard Google libraries. You must download and host the libraries locally. > **Note:** You must be [signed into Google Home Developers](/_d/signin?continue=https://developers.home.google.com/apis/android/sample-app/build&prompt=select_account) to download the SDK. ### Build and Configure the App 1. **Open Project**: In Android Studio, open the cloned `google-home-api-sample-app-android` project. The initial Gradle sync may take up to 10 minutes. If it fails, click **Try Again**. 2. **Connect Device**: Connect a physical Android phone with ADB enabled. > **Note:** A real Android phone is recommended over an emulator, as the Home APIs rely on Google Play services. 3. **Change Package Name**: 1. In the project hierarchy, right-click the `com.example` package and select **Refactor** > **Rename...**. 2. Enter your new package name. 3. In `build.gradle.kts`, update the `android namespace` and `applicationId` to match the new package name. 4. **Generate Debug Certificate**: Run the app from Android Studio to automatically generate a debug certificate. Stop the app after it builds and installs. 5. **Get SHA-1 Fingerprint**: Get your debug certificate's SHA-1 fingerprint by following the instructions for [Android native applications](https://support.google.com/cloud/answer/15549257#zippy=%2Cstep-create-a-new-client-secret%2Cstep-configure-your-app-to-use-the-new-secret%2Cnative-applications-android-ios-desktop-uwp-chrome-extensions-tv-and-limited-input%2Candroid:%7E:text=input%20device%20flow.-,Android,-Note%3A%20Currently%2C%20obtaining). > **Tip:** To find the `debug.keystore` location in Android Studio 2024.2.1+: > 1. In **Settings** > **Experimental**, enable **Configure all Gradle tasks during Gradle Sync**. > 2. In the Gradle Tool Window, run the `signingReport` task (`app` > `tasks` > `android` > `signingReport`). > 3. The keystore location is shown on the **Store** line in the report panel. ### Set up OAuth #### 1. Configure Consent Screen 1. In the [Google Cloud console](https://console.cloud.google.com/projectselector/home/dashboard), select your project. 2. Go to **APIs and Services** > **Credentials**. 3. If prompted, click **Configure consent screen**. 1. Select user type (**Internal** or **External**) and click **Create**. 2. Fill in the **App information**. 3. On the **Scopes** page, click **Save and continue** without adding scopes. 4. On the **Test users** page, click **+ ADD USERS** and add your test user's email address. 5. Review the summary and return to the dashboard. > For full details, see [Setting up your OAuth consent screen](https://support.google.com/cloud/answer/10311615#user-type&zippy=%2Ctesting%2Cexternal%2Cinternal). #### 2. Create OAuth Credentials 1. Follow the guide for [Setting up OAuth 2.0](https://support.google.com/cloud/answer/6158849). 2. Set the application type to **native/Android app**. 3. Add the SHA-1 fingerprint you obtained earlier to the OAuth client configuration. ### Run the App With your mobile device connected, click **Run project** in Android Studio. The app will install on your device as **Home API Sample App**. --- # Source: https://developers.home.google.com/apis/android/sample-app/authorization # Account Authorization on Android ## Prerequisites * The Google Home app (GHA) installed on your Android device, with at least one home (structure) set up on your Google Account. * At least one supported device type in the home: * Color Temperature Light * Contact Sensor * Dimmable Light * Extended Color Light * Generic Switch * Occupancy Sensor * On/Off Light * On/Off Light Switch * On/Off Plug-in Unit * On/Off Sensor * Two devices for testing the sample automation. **Note:** Devices must be controllable from GHA before they can be used through the Home APIs. ## Run the Android Sample App When you first run the sample app, it will request permission to access and control the structures and devices in a home on your Google Account. The permission behavior depends on the app's registration status. **Important:** The Google Home Developer Console is not yet available for registration. ### Unverified App (Not Registered) This is the default state and is recommended for testing. * **Permissions:** Only users registered as test users in the OAuth console (limit of 100) can grant permissions. * **Device Access:** Access is granted to all devices of any supported type within a structure. ### Verified App (Registered) This state is required for production launch after an app is registered, approved for device types, and has completed brand verification for OAuth. * **Permissions:** Any user can grant permission; test user limits do not apply. * **Device Access:** Users can only grant permission for the specific device types approved in the Developer Console. ### Authorization Flow 1. Tap **Allow access to a chosen home**. 2. **If you have homes connected to your account:** * Choose a home to grant permission to. * If no devices are found in the selected home, you can either: * Tap **Allow access to another home**. * Set up a supported device in that home using the GHA. 3. **If you have no homes connected to your account:** * You will see the message: "There are no structures for the selected account." * Return to the main app view, set up a home using GHA, and then try again. The permissions flow can be revisited at any time by selecting the profile icon (`account_circle`) in the app. After successfully granting permission, you will be taken to the devices view where you can control them and observe their state changes. --- # Source: https://developers.home.google.com/apis/android/sample-app/use # Android Sample App Overview The Android sample app demonstrates device access and control using Home APIs. After account authorization and structure selection, it loads all local devices, organizing them by room. ## Supported Device Types * **Color Temperature Light:** On/Off, brightness * **Contact Sensor:** Boolean state * **Dimmable Light:** On/Off, brightness * **Extended Color Light:** On/Off, brightness * **Generic Switch** * **Occupancy Sensor:** Occupancy sensing * **On/Off Light:** On/Off, brightness * **On/Off Light Switch** * **On/Off Plug-in Unit:** On/Off * **On/Off Sensor** ## App Features The app has two main tabs: **Devices** and **Automations**. ### Devices Tab * Displays rooms, devices, and their status. * Tap a device to access its control screen and edit its traits. * Tap **Add Device** to add a new device to the structure, with or without a QR code. * **Note:** The app subscribes to devices and automatically updates when a device state changes. ### Automations Tab * Lists all automations in the structure, showing their starters and actions. * Tap an automation to view its details, where you can: * Delete the automation. * Manually execute it (if supported). * Toggle the `isActive` switch to enable or disable it. * The `isValid` field (read-only, set by SDK) is `false` if there is an issue with the automation. ## Creating an Automation 1. Tap the **Create** button from the automations list. 2. Use the **+Add Starter** and **+Add Action** buttons to configure the automation. 3. After adding a starter or action, you can update or remove it before saving. 4. When finished, tap **Create Automation**. ## Troubleshooting * The app displays dialog messages for common events. * Refer to `adb` logs for information on how to resolve these events. * For further issues, see [Troubleshooting for Android](/apis/android/troubleshooting). --- # Source: https://developers.home.google.com/apis/android/sdk # Add the Home APIs to your Android app ## Prerequisites ### For Development * **Android Studio:** Version 2024.2.1 ("Ladybug") or later. Note that earlier versions may not work properly. [Download Android Studio](https://developer.android.com/studio). * **Android Debugger (`adb`):** Install [`adb`](https://developer.android.com/studio/command-line/adb) using the [SDK Manager](https://developer.android.com/studio/intro/update#sdk-manager). ### For Testing * **Android Device:** An Android device running Android 10 or later, set up with your development Google Account. * **Network:** A Wi-Fi network. * **Google Hub:** A [Google hub that supports the Home APIs](/apis/android/sdk#supported_hubs). The hub must be a Thread border router if you are testing Thread devices. See [Connectivity on Android](/apis/android/connectivity) for details. * **Supported Device:** At least one of the following device types supported by the Android sample app: * Color Temperature Light (on/off, brightness) * Contact Sensor (boolean state) * Dimmable Light (on/off, brightness) * Extended Color Light (on/off, brightness) * Generic Switch * Occupancy Sensor (occupancy sensing) * On/Off Light (on/off, brightness) * On/Off Light Switch * On/Off Plug-in Unit (on/off) * On/Off Sensor ### Supported Hubs The following Google Nest hubs have support for the Home APIs. | Device | Thread Border Router support | Google Store | | :--- | :--- | :--- | | Google Home | | | | Google Nest Audio | | [shopping_cart](https://store.google.com/us/product/nest_audio) | | Google Nest Hub | | | | Google Nest Hub (2nd gen) | | [shopping_cart](https://store.google.com/us/product/nest_hub_2nd_gen) | | Google Nest Hub Max | | [shopping_cart](https://store.google.com/us/product/google_nest_hub_max) | | Google Nest Mini | | [shopping_cart](https://store.google.com/us/product/google_nest_mini) | | Google TV Streamer (4k) | | [shopping_cart](https://store.google.com/product/google_tv_streamer) | | Nest WiFi Pro | | [shopping_cart](https://store.google.com/product/nest_wifi_pro) | ## Set up the SDK The Home APIs are in open beta and are not yet included in standard Google libraries. You must download and host the libraries locally. **Note:** You must be signed into Google Home Developers to download the Home APIs Android SDK. [Sign in now!](/_d/signin?continue=https://developers.home.google.com/apis/android/sdk&prompt=select_account) --- # Source: https://developers.home.google.com/apis/android/oauth # Set up OAuth for your Android app The Home APIs use OAuth 2.0 to grant app access to devices without exposing user login credentials. If you have an existing verified OAuth client, you can use it for testing. ## 1. Sign the App & Get SHA-1 Fingerprint First, generate a debug certificate by running your app in Android Studio. 1. Connect your mobile device and run the app from Android Studio to build and install it. 2. Stop the running app. 3. Get the debug certificate's SHA-1 fingerprint by following the instructions on the [Google Cloud Console Help site](https://support.google.com/cloud/answer/6158849#zippy=%2Cnative-applications%2Candroid:%7E:text=input%20device%20flow.-,Android,-Note%3A%20Currently%2C%20obtaining). > **Tip:** To find the `debug.keystore` location in Android Studio 2024.2.1 ('Ladybug') or later: > 1. In **Settings** > **Experimental**, enable **Configure all Gradle tasks during Gradle Sync**. > 2. Open the Gradle Tool Window. > 3. Run the **signingReport** task located under **app** > **tasks** > **android**. > 4. The report in the lower panel will show the keystore file location. ## 2. Set up the OAuth Consent Screen 1. In the [Google Cloud console](https://console.cloud.google.com/projectselector/home/dashboard), select your project. 2. Go to **APIs and Services** > **Credentials**. 3. If prompted, click **Configure consent screen**. 1. Select user type (**Internal** or **External**) and click **Create**. 2. Enter the required app information. 3. You do not need to add any scopes. 4. Under **Test users**, click **+ ADD USERS** and enter your test user's email address. 5. Review the summary and return to the dashboard. For full details, see [Setting up your OAuth consent screen](https://support.google.com/cloud/answer/10311615#user-type&zippy=%2Ctesting%2Cexternal%2Cinternal). ## 3. Register the App and Create Credentials Register your app for OAuth 2.0 by following the instructions in [Setting up OAuth 2.0](https://support.google.com/cloud/answer/6158849). * Select the app type as **native/Android app**. * Add the SHA-1 fingerprint you obtained earlier to the OAuth client configuration. ## Using an Existing OAuth Client You can use an existing, verified OAuth client from a published app to test the Home APIs. * **Developer Console Registration:** While not required for testing, you must complete Google Home Developer Console registration to publish your app. * **User Limit:** There is a 100-user limit when testing with an existing client. This limit is lifted upon completion of Developer Console registration. * **Device Grants:** Developer Console registration is necessary to restrict device-type grants via OAuth for your production app. **Important:** The Google Home Developer Console is not yet available for registration. Apps pending OAuth verification cannot complete the auth flow and will show an error: ``` Access blocked: has not completed the Google verification process. ``` --- # Source: https://developers.home.google.com/apis/android/initialize # Initialize the Home on Android Before using any Home APIs for Android, you must initialize a **singleton** instance of `Home`. This is the entry point to the APIs and requires declaring which traits and device types your app will use. **Important: Only one instance of `Home` should be active at a time.** ### Create a Home instance **1. Required Imports** ```kotlin import android.content.Context import com.google.home.FactoryRegistry import com.google.home.HomeConfig import com.google.home.Home ``` **2. Initialization Steps** 1. **Get Application Context** Get a reference to the `Application` context, which is not dependent on any activity lifecycle. ```kotlin val context = Context.getApplicationContext() ``` 2. **Create a `FactoryRegistry`** Create an instance with all the traits and device types your app will use. See [Registration of traits and device types](#registration-of-traits-and-device-types) for more details. *Example:* ```kotlin val registry = FactoryRegistry( traits = listOf( AirQuality, AreaAttendanceState, AreaPresenceState, AssistantBroadcast, AssistantFulfillment, BooleanState, ColorControl, ExtendedColorControl, FlowMeasurement, IlluminanceMeasurement, LevelControl, Notification, OccupancySensing, OnOff, RelativeHumidityMeasurement, Switch, TemperatureMeasurement, Thermostat), types = listOf( AirQualitySensorDevice, ColorDimmerSwitchDevice, ColorTemperatureLightDevice, ContactSensorDevice, DimmableLightDevice, DimmablePlugInUnitDevice, DimmerSwitchDevice, ExtendedColorLightDevice, FlowSensorDevice, GenericSwitchDevice, HumiditySensorDevice, LightSensorDevice, OccupancySensorDevice, OnOffLightDevice, OnOffLightSwitchDevice, OnOffPluginUnitDevice, OnOffSensorDevice, SpeakerDevice, TemperatureSensorDevice, ThermostatDevice)) ``` *Note: You must add import statements for each individual trait and device type registered here.* 3. **Instantiate `HomeConfig`** Use the [`Dispatchers.IO`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/#-978510185%2FProperties%2F-1316292404) coroutine context and your registry instance. ```kotlin val homeConfig = HomeConfig( coroutineContext = Dispatchers.IO, factoryRegistry = registry) ``` 4. **Create the `Home` Singleton** Create the singleton instance of `Home`, which is the entry point to the APIs. ```kotlin val homeManager: HomeClient = Home.getClient(context, homeConfig) ``` ### Singleton Implementation Example To avoid errors with invalid sessions, it is important to create only a **singleton** instance of `Home`, for example by wrapping it in an [object declaration](https://kotlinlang.org/docs/object-declarations.html). *Sample App Example:* ```kotlin internal object HomeClientModule { @Provides @Singleton fun provideHomeClient(@ApplicationContext context: Context): HomeClient { return Home.getClient( context, HomeConfig( coroutineContext = IODispatcherModule.provideIoDispatcher(), factoryRegistry = registry, ), ) } } ``` ### Registration of traits and device types * The `FactoryRegistry` class helps optimize your app's binary size by letting you explicitly declare which traits and device types are used. * Permissions and the factory registry are decoupled. * Traits and types that are available to your app via permissions but are **not** included in the factory registry will be inaccessible using the Automation API and will not be returned in bulk `traits()` or `types()` method calls. --- # Source: https://developers.home.google.com/apis/android/permissions # Permissions API on Android Before using Home APIs, an app needs permission to access devices in the user's home (the *structure*). The Permissions API handles this user consent flow. Permission grants are made on a structure-by-structure basis. ## Integrate the Permissions API **Prerequisite:** Initialize the `homeManager` instance as described in the Android initialization guide. First, register an `ActivityResultCaller` with the SDK. ```kotlin override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) homeManager.registerActivityResultCallerForPermissions(this) } ``` ### Check for Permissions Check if the user has already granted consent using `homeManager.hasPermissions()`. This returns a `Flow` of `PermissionsState` values. ```kotlin val permissionsReadyState = homeManager.hasPermissions().collect { state -> when (state) { PermissionsState.GRANTED -> println("Permissions granted.") PermissionsState.PERMISSIONS_STATE_UNAVAILABLE -> println("State unavailable, request permissions.") PermissionsState.NOT_GRANTED -> println("Not granted yet, request permissions.") else -> // Handle unexpected state } } ``` - If the state is `NOT_GRANTED` or `PERMISSIONS_STATE_UNAVAILABLE`, the app or user lacks access. - If the state is `GRANTED` but a call to `structures()` returns none, the user may have revoked access via the Google Home app (GHA) or lacks the required access. ### Request Permissions If permissions are not granted, use `homeManager.requestPermissions()` to launch the Permissions UI. An application can only be granted permission to one structure at a time. **Prerequisite:** OAuth must be set up for the Permissions UI to launch. ```kotlin fun requestPermissions(scope: CoroutineScope) { scope.launch { val result = try { homeManager.requestPermissions() } catch (e: HomeException) { // Handle exception } when (result.status) { PermissionsResultStatus.SUCCESS -> Log.i(TAG, "Permissions successfully granted.") PermissionsResultStatus.CANCELLED -> Log.i(TAG, "User cancelled Permissions flow.") else -> Log.e(TAG, "Failed to grant permissions: ${result.errorMessage}") } } } ``` ## Grant Permissions Flow The `requestPermissions()` call triggers a dialog flow: 1. User selects a Google Account. 2. User selects a structure to grant access to. The available devices depend on the app's registration status in the Google Home Developer Console. * **Unverified App (Not registered in Developer Console):** * Recommended for testing. * Only registered test users (limit 100) can grant permissions. * Access is granted to all devices of any type supported by the Home APIs within the selected structure. * **Verified App (Registered in Developer Console):** * Required for production. * Requires brand verification for OAuth. * Any user can grant permission. * Permission is limited to the device types approved in the Developer Console. * For sensitive device types (e.g., locks), the user can restrict access on a per-device basis. If a user denies permission for a device, the app cannot access, control, or automate it. ## Change Permissions To let a user grant access to a different structure, call `requestPermissions()` again with `forceLaunch=true`. This re-launches the account and structure picker, and the consent screen. ```kotlin homeManager.requestPermissions(forceLaunch=true) ``` ## Revoke Permissions Users can revoke access in two ways: 1. **Google MyAccounts Page:** Go to **Data & privacy > Third-party apps & services**. This revokes the OAuth token for all instances of the app. * Deep Link: `https://myaccount.google.com/connections/link?project_number=` 2. **Google Home App (GHA):** Go to **Settings > Linked Apps**. Users can remove app access entirely or change permissions for specific device types or sensitive devices. ## OkGoogle Permissions The `okGoogle` command is a device-level command for automations. Permission enforcement depends on the scope of the command. | Automation | Trait | Permissions Enforcement | | :--- | :--- | :--- | | Broadcast "Bedtime" on bedroom speaker. | `AssistantBroadcastTrait` on device. | **Creation & Execution:** App and user must have access to the specific broadcast device (must be an Assistant device). | | Broadcast "Bedtime" on all devices. | `AssistantBroadcastTrait` on structure. | **Creation & Execution:** App and user must have access to the structure and at least one Assistant device within it. | | "play some music" | `AssistantFulfillmentTrait.OkGoogleCommand` | **Creation & Execution:** App and user must have access to the devices the automation commands. | | When someone says "play some music" | `VoiceStarterTrait.OkGoogleEvent` | **Creation:** App and user need structure access. **Execution:** App doesn't need permission for the starting device, but needs permission for the device where the action occurs. | **Note:** If a user revokes full permissions, all existing automations will stop working without notice. If access to specific devices is revoked, starters, conditions, and actions for those devices will also stop working. --- # Source: https://developers.home.google.com/apis/android/overview # Home APIs for Android Overview The Google Home APIs for Android offer a unified API surface for developers to interact with entities in a user's home, including devices and non-device information. These concepts are similar to those in the [Google Home Graph](/cloud-to-cloud/primer/home-graph). ## Key Entities * **Structures**: A home containing rooms and devices. * **Rooms**: Part of a structure, containing devices. * **Devices**: Implement traits, conform to types, emit events, and respond to commands. Devices may be backed by [Matter](/matter), be a Cloud-to-cloud device, or a combination. See [Supported device types](/apis/android/supported-device-types). * **Automations**: Part of a structure, using home metadata and devices to automate tasks. ### Device Traits Device functionality is grouped by traits. For more details, see [Data model on Android](/apis/android/data-model). * **Matter**: Functionality is grouped by **clusters**, represented as **Matter standard traits**. * **Google Home Ecosystem**: Functionality is grouped by **smart home traits**, as defined in the [Cloud-to-cloud program](/cloud-to-cloud/traits). * Other available traits include **Manufacturer-specific clusters** and **Platform traits**. ## Ecosystem Components * **Google Automation Engine**: Stores and runs [automations](/apis/android/automation). * **OAuth 2.0**: Grants apps permission to access devices without exposing user credentials. * **Google Home Developer Console**: Manages all project stages, from development and testing to certification and launch. * **Important:** The console is not yet available for registration. ## Language: Kotlin & Flow The APIs are written in [Kotlin](https://kotlinlang.org/docs/android-overview.html) and use [Flow](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/) for state management and subscription. ### Recommended Learning Resources * [Develop Android apps with Kotlin](https://developer.android.com/kotlin) & [Learn Kotlin for Androids](https://developer.android.com/kotlin/campaign/learn) * [Kotlin coroutines on Android](https://developer.android.com/kotlin/coroutines) * Codelab: [Use Kotlin Coroutines in your Android App](https://developer.android.com/codelabs/kotlin-coroutines) * Codelab: [Advanced coroutines with Kotlin Flow and LiveData](https://developer.android.com/codelabs/advanced-kotlin-coroutines) * [Kotlin flows on Android](https://developer.android.com/kotlin/flow) (specifically [StateFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow)) * [State and Jetpack Compose](https://developer.android.com/jetpack/compose/state#use-other-types-of-state-in-jetpack-compose), especially `collectAsStateWithLifecycle()`. * Codelab: [State in Jetpack](https://developer.android.com/codelabs/jetpack-compose-state) * [Kotlin type-safe builders](https://kotlinlang.org/docs/type-safe-builders.html) (for the Automation API/DSL). ## Entity Identifiers Each entity has a unique and stable ID (see [`HasId`](/reference/kotlin/com/google/home/HasId)) that persists for its lifetime, suitable for caching or equality checks even if metadata changes. ## Terminology Mapping | Home APIs | Matter | Cloud-to-cloud | | --- | --- | --- | | Trait | Cluster | Trait | | Attribute | Attribute | Attribute, State | | Command | Command | Command | | Event | Event | Follow up response, Notification | --- # Source: https://developers.home.google.com/apis/android/data-model # Data model on Android The Home APIs for Android present all devices in the Google Home ecosystem (from Google Nest or 3rd party manufacturers) in a unified data model. This model supports technologies like Matter and Cloud-to-cloud, providing a common API surface for developers. ## Device types - Device types unify Matter and Cloud-to-cloud data models. They can be derived directly from Matter, be extensions of Matter types, or come from Cloud-to-cloud. - They contain **traits** for controlling and managing devices. - The model is **Matter-first**, meaning Matter device types and traits take precedence over their Cloud-to-cloud analogs. - See the list of [Supported device types on Android](/apis/android/supported-device-types). ## Traits - Traits are provided as Kotlin versions with Home API-specific features, such as methods to check if a device supports a specific attribute or command. - Each trait is in its own namespace and must be imported individually. **Example Imports:** - For a Matter `OnOffPluginUnitDevice`: ```kotlin import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOffPluginUnitDevice ``` - For a Google smart home `GarageDevice`: ```kotlin import com.google.home.google.LockUnlock import com.google.home.matter.standard.DoorLock import com.google.home.matter.standard.GoogleGarageDevice ``` - **Note:** Package names are not always consistent across all types and traits; verify them in the reference documentation. - **Tip:** Device types starting with `Google*` are from the Google smart home ecosystem, not Google-branded hardware. - Traits are also supported for Automations, though some may be limited or exclusive to that use case. See [Automation API trait support on Android](/apis/android/automation/supported-traits). ## Device type composition - The Home APIs expose most Matter application clusters as traits, excluding those not relevant to end-users (e.g., `Binding`, `Groups`). - Device types are composed of traits from both Matter and Cloud-to-cloud sources. - Cloud-to-cloud traits may retain their names (e.g., `OpenClose`) or be represented as extensions of Matter traits to bridge functionality gaps. `Google*` device types are examples of Cloud-to-cloud types that don't yet have a Matter equivalent. - This composition creates a flexible model that abstracts the underlying smart home technologies. **Example: `FanDevice`** The `FanDevice` type is composed of traits from both sources: - `Identify`: From Matter. - `FanControl`: From Matter. - `ExtendedFanControl`: A Google trait that adds functionality from the Google smart home `FanSpeed` trait not covered by the Matter `FanControl` trait. --- # Source: https://developers.home.google.com/apis/android/connectivity # Connectivity on Android Home API capabilities on Android vary depending on network connectivity and hub status. * **Local**: A controller (e.g., Google Home app) is on the same Wi-Fi network as the device. * **Remote**: A controller is on a separate Wi-Fi network or the user is on Google Home for web. ### Table 1: Home APIs Connectivity (Hub ONLINE) | Use Case | Matter (Local) | Matter (Remote) | Cloud (Local) | Cloud (Remote) | | :--- | :---: | :---: | :---: | :---: | | Commission and add device | ✅ | ✅ | n/a | n/a | | Add device | n/a | n/a | ✅ | ✅ | | View device state | ✅ | ✅ | ✅ | ✅ | | Control device | ✅ | ✅ | ✅ | ✅ | | Create automation with device | ✅ | ✅ | ✅ | ✅ | | Run automation with device | ✅ | ✅ | ✅ | ✅ | ### Table 2: Home APIs Connectivity (Hub OFFLINE) | Use Case | Matter (Local) | Matter (Remote) | Cloud (Local) | Cloud (Remote) | | :--- | :---: | :---: | :---: | :---: | | Commission and add device | ✅ | ✅ | n/a | n/a | | Add device | n/a | n/a | ✅ | ✅ | | View device state | ✅ | ✅ | ✅ | ✅ | | Control device | ✅ | ✅ | ✅ | ✅ | | Create automation with device | ✅ | ✅ | ✅ | ✅ | | Run automation with device | ✅ | ✅ | ✅ | ✅ | | Assign device to different room | ✅ | ✅ | ✅ | ✅ | | Remove device | ✅ | ✅ | ✅ | ✅ | --- # Source: https://developers.home.google.com/apis/android/interoperability # Interoperability on Android Devices in the Google Home ecosystem can be implemented using **Cloud-to-cloud**, **Matter**, or both. Complex device types, which can be composed of different combinations of traits, present a development challenge for ensuring smooth interoperability. The mapping between Cloud-to-cloud and Matter data models is not always a clear one-to-one relationship. This document provides guidance on data model mappings and recommended implementations for specific device types. ## Oven The `OvenDevice` type is not straightforward to implement. There are multiple ways to implement an Oven in Matter, but not all approaches guarantee seamless interoperation with the Google Home ecosystem. ### Trait Mapping > **Caution:** The following information is subject to change. Implementations based on this guidance may cease to operate as required in the future. Instead of using the `Oven Mode` and `On Off` clusters, we recommend using the **`Oven Cavity Operational State` cluster**. This cluster is represented in the Home APIs by the `OvenCavityOperationalState` trait and maps to the Cloud-to-cloud `RunCycle` trait. It defines phases like "pre-heating", "pre-heated", and "cooling down". | Home APIs | Cloud-to-cloud | | :--- | :--- | | `OvenCavityOperationalState` | `RunCycle` | **Limitations:** The Cloud-to-cloud Oven data model only allows for a single chamber and a single `RunCycle`. In contrast, Matter can model a multi-chamber Oven as a device endpoint with an `Oven Cavity Operational State` cluster for each chamber. For some Ovens, the phase list may need to change at runtime (e.g., different entries during preheating vs. heating phases). ### Recommended Implementation * A Matter Oven implementation should use the `Oven Cavity Operational State` cluster, which is modeled in the Home APIs as the `OvenCavityOperationalState` trait. * For best results, ensure your Cloud-to-cloud Oven device implements the `RunCycle` trait and publishes the current state by setting the `currentRunCycle` attribute. This is observable by the Home APIs through `OvenCavityOperationalState.phaseList` and `OvenCavityOperationalState.currentPhase`. * The Oven should also publish a run cycle device notification by updating the `priority`, `status`, and `currentCycleRemainingTime` attributes of `RunCycle`. The following example results in an `OperationalState.OperationCompletion` event, indicating the oven has transitioned from 'pre-heating' to 'pre-heated': ```json { "currentRunCycle": [ { "currentCycle": "pre-heating", "nextCycle": "pre-heated", "lang": "en" } ], "currentTotalRemainingTime": 1200, "currentCycleRemainingTime": 300 } ``` > **Important:** The event publication should occur simultaneously with the actual device state change, or **immediately after**. Do not send the event before the state change. ### Use an Oven in an Automation When building an automation for an Oven, reference the `currentPhase` attribute to know which cycle the oven is in: ```kotlin sequential { val starterNode = starter<_>(oven, OvenDevice, OvenCavityOperationalState /* Or OperationalState */) condition { expression = starterNode.phaseList[operationalState.currentPhase.toUInt()] equals "pre-heated" } action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("Oven Cycle Complete")) } // Additional actions here as needed } ``` For a complete example, see [Blink the lights and announce when the oven reaches the chosen temperature](/apis/android/automation/examples#blink-lights). --- # Source: https://developers.home.google.com/apis/android/error-handling # Error Handling on Android Kotlin's lack of [checked exceptions](https://kotlinlang.org/docs/exceptions.html#checked-exceptions) simplifies error handling. You only need to handle potentially recoverable exceptions, which keeps your code less cluttered and more focused on its primary purpose. ## Handling `HomeException` All methods in the Home APIs can throw a `HomeException`. It is recommended to wrap all API calls in a `try-catch` block to handle these recoverable failures. Any unhandled exceptions will cause your app to crash. When catching a `HomeException`, inspect its `code` and `message` fields to understand the error. For example, if an invalid ID causes a `HomeException`, you could remove that ID from your cache or show the user a "Structure not found" message. ```kotlin val result = try { homeManager.requestPermissions() } catch (e: HomeException) { PermissionsResult( PermissionsResultStatus.ERROR, "Got HomeException with error: ${e.message}", ) } ``` ### `HomeException` Codes The following table explains the meaning of each `HomeException` code. | Code | Meaning | | --- | --- | | `ABORTED` | The operation was aborted due to a concurrency issue (e.g., a sequencer check failure). | | `ALREADY_EXISTS` | The entity a client attempted to create already exists. | | `API_NOT_CONNECTED` | The API call failed to connect, possibly because the device is offline or doesn't support the API. | | `CANCELLED` | The operation was cancelled, typically by the caller. | | `DATA_LOSS` | Unrecoverable data loss or corruption has occurred. | | `DEADLINE_EXCEEDED` | The deadline expired before the operation could complete. For state-changing operations, this error may be returned even if the operation succeeded. | | `FAILED_PRECONDITION` | The system is not in a state required for the operation's execution (e.g., calling `stop` on an already stopped oven). | | `INTERNAL` | Internal errors, indicating that some system invariants have been broken. This code is reserved for serious errors. | | `INVALID_ARGUMENT` | The client provided an argument outside the expected range of values. | | `NOT_FOUND` | A requested entity was not found. May also be used if a request is denied for an entire class of users (e.g., a feature rollout). For user-based access control, `PERMISSION_DENIED` must be used. | | `OUT_OF_RANGE` | The operation was attempted past the valid range (e.g., seeking past end-of-file). Unlike `INVALID_ARGUMENT`, this may be fixable if the system state changes. | | `PERMISSION_DENIED` | The caller does not have permission for the operation. Do not use for resource exhaustion (`RESOURCE_EXHAUSTED`) or if the caller is unidentified (`UNAUTHENTICATED`). | | `RESOURCE_EXHAUSTED` | A resource has been exhausted (e.g., a per-user quota is reached or a pet feeder is out of food). | | `SDK_INITIALIZATION_MISSING_INFO` | The SDK was initialized without required information (e.g., a trait was not included). See [Initialize the home on Android](/apis/initialization). | | `UNAUTHENTICATED` | The request lacks valid authentication credentials or the caller cannot be identified. | | `UNAVAILABLE` | The service is unavailable, likely a transient condition. Retrying with a backoff may help, but retrying non-idempotent operations is not always safe. | | `UNIMPLEMENTED` | The requested operation is not implemented, supported, or enabled in this service. | | `UNKNOWN` | An unknown error occurred, often when an external API returns a status with insufficient detail. | **Note:** In logs, error codes may appear as numeric values (e.g., `13` instead of `INTERNAL`). For the full list of numeric mappings, see the [`HomeException.Codes` reference](/reference/kotlin/com/google/home/HomeException.Codes). --- # Source: https://developers.home.google.com/apis/android/commissioning # Commissioning API on Android **Note:** If the Commissioning API on Android is not used, users can still commission Matter devices using the Google Home app (GHA). See [Set up and manage Matter-enabled devices](https://support.google.com/googlenest/answer/13127223). The Commissioning API allows an app to commission a device to either: * Your fabric and the Google fabric. * Only the Google fabric. ## Ways to commission Matter devices The commissioning process can be initiated: * [Directly in your app](#request-commissioning-directly-in-your-app) * [Through Fast Pair or QR-code scanning on Android](#matter-commissioning-entry-point-for-fast-pair-or-qr-code-scanning-android-only) ### Request commissioning directly in your app This can be triggered by an in-app action for single or multiple fabrics. #### For single fabrics 1. Initialize an `ActivityResultLauncher` in your activity to handle the commissioning result. If the device is commissioned on the Google fabric, the result may include the user-assigned device name. ```kotlin private val commissioningLauncher = registerForActivityResult(StartIntentSenderForResult()) { result -> val resultCode = result.resultCode if (resultCode == RESULT_OK) { Log.i("CommissioningActivity", "Commissioning success") val deviceName = CommissioningResult.fromIntentSenderResult(result.resultCode, result.data).deviceName } else { Log.i("CommissioningActivity", "Commissioning failed") } } ``` 2. Construct a `CommissioningRequest`, including the payload data, and set the option to commission to the Google fabric using `setStoreToGoogleFabric`. * **Warning:** If you don't set the payload, the QR code scanner will reappear, creating a poor user experience. * To commission to your own fabric as well, use `setCommissioningService()` in the `CommissioningRequest`. ```kotlin val commissioningRequest = CommissioningRequest.builder() .setOnboardingPayload(payload) .setStoreToGoogleFabric(true) // set all other options that you care about .build() ``` 3. Use the `CommissioningClient` instance to start commissioning. ```kotlin commissioningClient .commissionDevice(commissioningRequest) .addOnSuccessListener { result -> Log.i("CommissioningActivity", "Commissioning success") _commissioningIntentSender.postValue(result) } .addOnFailureListener { error -> Log.i("CommissioningActivity", "Commissioning failed") } ``` 4. Once the `CommissioningClient` returns the `IntentSender`, launch it. ```kotlin commissioningIntentSender.observe(this) { sender -> if (sender != null) { commissioningLauncher.launch(IntentSenderRequest.Builder(sender).build()) } } ``` #### For multiple fabrics (multi-admin) Refer to [Multi-admin for Commissioning API on Android](/apis/android/commissioning/multi-admin). ### Matter commissioning entry point for Fast Pair or QR-code scanning (Android only) This can be done for single or multiple fabrics. #### For single fabrics Use the `ACTION_START_COMMISSIONING` intent filter to provide full commissioning capability without needing the GHA. This allows the user to assign a name to the device when commissioning to the Google fabric. * **Note:** If you are not operating your own Matter fabric and user permissions have not been granted, the device won't be accessible in the app. You must [request permission from the user](/apis/initialization#request_permissions) after commissioning. To indicate support for Google fabric commissioning, add the following `intent-filter` to **one** activity declaration in your `AndroidManifest.xml` file: ```xml ``` * **Important:** Adding the filter to more than one activity results in undefined behavior. This filter includes your app in the list of suggested Matter apps. #### For multiple fabrics (multi-admin) The Fast Pair flow can also be used in multi-admin scenarios. For more information, refer to [Multi-admin for Commissioning API on Android](/apis/android/commissioning/multi-admin). ## Handle the incoming intent Once your activity is launched, check for the `ACTION_START_COMMISSIONING` intent and retrieve the payload: ```kotlin override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val payload = if (Matter.ACTION_START_COMMISSIONING.equals(intent.getAction())) { intent.getStringExtra(Matter.EXTRA_ONBOARDING_PAYLOAD) } else { null } CommissioningRequest.builder() .setOnboardingPayload(payload) .setStoreToGoogleFabric(true) // set all other options that you care about startCommissioning(commissioningRequest) } ``` A non-`null` payload indicates the user has already scanned the device QR code or entered the pairing key. A `null` payload does **not** mean that commissioning should be aborted. ## Suppress commissionable discovery notifications By default, Google Play services on Android uses "halfsheet" notifications to indicate nearby commissionable Matter devices. To prevent these interruptions while your app is in the foreground, call the `suppressHalfSheetNotification()` method. This suppression times out if your app is in the foreground for more than 15 minutes. To re-enable suppression after a timeout, call `suppressHalfSheetNotification()` again. ## How to share Matter devices on your fabric with Google Google strongly recommends using the Commissioning API as the primary means of sharing a device that you have already set up on your fabric with the Google fabric. ### Why use the Commissioning API instead of the Share API? The Commissioning API offers a direct and preferred method. The Share API requires more user steps, such as having GHA installed and manually selecting it. To use the Commissioning API for sharing, open the commissioning window and call the API as a [secondary Matter commissioner](/apis/android/commissioning/multi-admin#secondary). ### When to use the Share API? Use the [Share API](/reference/kotlin/com/google/android/gms/home/matter/commissioning/ShareDeviceRequest) to let the end-user pick an eligible application to share a device generically with other Matter ecosystems. --- # Source: https://developers.home.google.com/apis/android/commissioning/multi-admin # Multi-admin for Commissioning API on Android The Commissioning API on Android supports multi-administration for Matter, allowing it to serve as either a primary or secondary commissioner. ### Commissioner Roles * **Primary Matter Commissioner**: * The Google fabric is added first via the Google UX. * A custom commissioner can then be called to add another fabric after the Matter commissioning window is re-opened. * If Google's commissioning fails, the custom commissioning service will not run. * **Secondary Matter Commissioner**: * Your app can implement its own commissioning UX to onboard a device to its own fabric first. * The Google Commissioning API can be called later to add the Google fabric. * **Google Recommendation**: When a user has granted Home API permissions, your app should actively prompt them to add Google's fabric after your commissioning flow is complete. ### How to Use as Primary Commissioner (Google-preferred flow) 1. The user starts the flow in your app (e.g., taps **Add Device**). 2. The Google UX takes control for scanning the Matter QR code. 3. The user agrees to connect the device to their Google account. 4. The user selects a home. The process ends if no home, hubs, or permissions are available. 5. On the **Device connected** screen, the user names the device and chooses a room. 6. The **Getting your device ready** screen appears as the device is onboarded to the Matter fabric. 7. Your app resumes control, and a registered custom commissioner can run to add additional fabrics. ### How to Use as Secondary Commissioner 1. The user starts the flow in your app. 2. Your app's commissioning UX runs to add the device to your fabric. 3. After completion, your app can trigger the Google process (e.g., if the user has opted into Google Home APIs). 4. Your app calls the Commissioning API with the device payload (passcode, discriminator, etc.). 5. The Google commissioning process adds the device to the Google fabric. --- # Source: https://developers.home.google.com/apis/android/onboarding-guidance # End-user Onboarding Flows on Android for Google Home APIs This guide provides UX guidance for designing seamless device permission and sharing flows in your application. **Topics:** * Why share devices with Google Home? * Key components of the sharing flow * Technical implementation * UX best practices ## Why Share Devices with Google Home? Sharing devices is necessary for Home API capabilities because: * It's a technical requirement for Google to use devices in automations. * It maintains a consistent user experience, preventing fragmentation where users must switch between apps for basic tasks. ## Key Components of the Sharing Flow * **Permissions API on Android**: Prompts users to grant your app permission to access devices in their home (the "structure"). This is required before using any Home APIs. * **Cloud-to-cloud Linking**: Starts the account-linking process to share cloud-connected devices with Google Home from within your app. Deep linking is recommended to reduce friction. * **Commissioning API on Android**: Used to commission new Matter devices or add the Google fabric to Matter devices already commissioned to another fabric. ## Technical Implementation The recommended implementation order depends on the types of devices you produce. **General Guidance:** * **Cloud-to-cloud first:** Perform Cloud-to-cloud deep linking before requesting permissions to avoid confusing users with mixed lists of shared and unshared devices. * **Matter Device Sharing:** Since sharing must be done per device and requires user input, guide the user by: * Showing a list of Matter devices not shared with Google. * Allowing users to start sharing from that list (using the Commissioning API). * Returning to the list to show progress and status. ### Scenarios * **You only produce Matter devices:** 1. Call the Permissions API on Android. 2. Call the Commissioning API on Android for each applicable Matter device (follow general guidance above). * **You only produce Cloud-to-cloud devices:** 1. Perform Cloud-to-cloud deep linking. 2. Call the Permissions API on Android. * **You produce both Cloud-to-cloud and Matter devices:** 1. Perform Cloud-to-cloud deep linking. 2. Call the Permissions API on Android. 3. Call the Commissioning API for Android for each applicable Matter device (follow general guidance above). * **You have no devices to share with Google:** * Call the Permissions API. ## UX Best Practices ### Entry Points for Device Sharing Consider these non-mutually exclusive entry points: * **Settings Menu**: A familiar location for users to manage connections. You can separate device sharing (Cloud-to-cloud, Matter) from app permissioning (Permissions API) to give users more control and show connection status. * **Automations Tab**: When a user interacts with a Google-run automation, present an entry point to the sharing flow with a clear value proposition. * **Commissioning Flow**: For partners with only Matter devices (no cloud or own fabric), integrate sharing (Commissioning API) and permissioning (Permissions API) into a single flow right after the out-of-box experience. ### Sharing Logic * Prompt users to complete only the missing steps. (e.g., if devices are already shared via cloud, only request Home API permissions). * Cloud-to-cloud linking shouldn't be a prerequisite for Home API permissions, as different home administrators might manage different aspects. ### Visual Design Suggestions * Clearly state the benefit of onboarding (e.g., "Create advanced automations powered by Google Home"). * Include a clear call-to-action (e.g., "Get Started") and a way to cancel. * Briefly explain what will happen during the flow. * For Matter, if permissions are already granted, prompt the user to share a new device with the Google fabric right after adding it to your fabric. ### Content Suggestions * **Focus on the "what's in it for me?"** for the user. * **Be enticing but don't over-promise.** Clearly state device requirements. * **Keep text concise** (under 4 lines per block), but prioritize clarity. * **Use exciting examples** for automations. * **Use a playful tone** if it aligns with your brand. * **Use actionable phrases** like "Get started." --- # Source: https://developers.home.google.com/apis/android/ux/commissioning # Commissioning UX on Android The commissioning flow using the Commissioning API can be initiated in two ways: directly within your app or through the Fast Pair app picker. ## Initiated by the App This flow begins when a user starts commissioning from within your app, typically via an **"Add Device"** call-to-action (CTA). **CTA Placement Recommendations:** * On a **Controls** page where users see their devices. * On a **Settings** page for home management. * On the app's **Home** page. After commissioning, it's recommended to direct the user to the app's Home page or a view showing the newly added device. ### UX Flow 1. The user taps **Add device**. 2. The user scans the QR code or enters the pairing code. 3. The user is prompted to add the device to the Google fabric and select a Google Account. 4. If the user has multiple Homes, they are prompted to select one. If no Home exists, one named "Home" is created automatically. 5. The Commissioning API connects to the device. 6. The user selects a room for the device. 7. The user renames the device. 8. The Commissioning API generates Matter credentials, checks network connectivity, and commissions the device to the chosen fabric. 9. If permissions for the user's structure and devices have been granted, the device will appear in the app and be controllable. Otherwise, [permission is required](/apis/initialization) for access and control. ## Initiated by Fast Pair Commissioning can also start via Fast Pair after a user scans a device's Matter QR code. The user is then prompted to select an app to continue the process. If the user does not have your app installed, they will be prompted to install it before proceeding. The subsequent UX is the same as the app-initiated flow from the consent screen onwards. ### UX Flow 1. The user scans the device's Matter QR code. 2. The user is prompted to select an app to continue. 3. If the app isn't installed, the user is prompted to install it from the Google Play Store. 4. Once the app is ready, the user agrees to add the device to the Google fabric and selects a Google Account. 5. The user selects a Home. A default "Home" is created if none exist. 6. The Commissioning API connects to the device. 7. The user selects the device's room. 8. The user renames the device. 9. The Commissioning API generates credentials, checks the network, and completes the commissioning process. 10. If permissions have been granted, the device appears in the app and is controllable. Otherwise, [permission is required](/apis/initialization). ## App Picker Your app can appear in two places during the commissioning process: 1. On the **Choose an app** screen. 2. On the **Other Installed Apps** screen, if the user selects **Choose other app**. ### Suggested Apps The **Choose an app** screen displays two suggestions: * The first is always the Google Home app (GHA). * The second is the device maker's preferred app, if one is defined in the Google Home Developer Console project associated with the device's VID or PID. ### App Status on the "Choose an app" screen * **Installed**: Google Play services verifies that the app supports the `ACTION_COMMISSION_DEVICE` intent filter. If the filter is missing, the user is directed to the Play Store to update the app. * **Not Installed**: The user is directed to the Play Store to install the app before continuing. --- # Source: https://developers.home.google.com/apis/android/structure # Structure APIs on Android > **Note:** An application can only be granted permission to one structure at a time. Structure APIs are accessed through the Home APIs for Android. ## Setup Import the necessary packages: ```kotlin import com.google.home.Home import com.google.home.Id import com.google.home.Structure ``` ## Error Handling All Home API methods can throw a `HomeException`. Use a `try-catch` block for all calls and check the exception's `code` and `message` fields to handle errors. Unhandled exceptions will crash your app. For more information, see [Error handling](/apis/android/error-handling). ## API Usage > **Important:** The Structure API only returns structures the developer has been granted access to. ### Get Structures The `home.structures()` call returns a `Flow` of structures. **Reactive Approach:** ```kotlin // Get a flow of all structures accessible to the user. val allStructuresFlow: HomeObjectsFlow = home.structures() // Calling list() on a HomeObjectsFlow returns the first Set of elements. val allStructures: Set = allStructuresFlow.list() ``` * The flow may not immediately return a valid list. Your app should handle cases where an empty list is returned (e.g., no connectivity, revoked permissions). **Imperative Approach:** Use a terminal flow operator to wait for a valid list with a timeout. ```kotlin val everyStructure = withTimeout(5000) { home.structures().first { it.isNotEmpty() } } ``` ### Get Structure Properties Get a flow for a single structure or a snapshot of its properties. ```kotlin // Get a flow on a structure. Flow emits new values on metadata changes. val structureFlow: Flow = home.structures().itemFlow(myStructureId) // Get a snapshot of the structure. val structure: Structure = structureFlow.first() // Get structure properties. println("id ${structure.id}") println("name ${structure.name}") ``` ### Find a Structure by Name ```kotlin val myHome = home.structures().list().first { it.name == "My home" } ``` ### Work with Multiple Structures Get a separate reference for each structure, handling exceptions individually. ```kotlin var structure1: Structure? = null var structure2: Structure? = null try { structure1 = home.structures().list().firstOrNull { it.name == "Main House" } } catch (e: HomeException) { // Code for handling the exception } try { structure2 = home.structures().list().firstOrNull { it.name == "Guest Cottage" } } catch (e: HomeException) { // Code for handling the exception } ``` ### Manage Rooms #### Get a list of rooms ```kotlin val allRoomsFlow: HomeObjectsFlow = structure.rooms() val allRooms: Set = allRoomsFlow.list() val room: Room = allRooms.first() println("id ${room.id}") println("name ${room.name}") ``` #### Create a room ```kotlin val newRoom: Room = structure.createRoom("Test Room Name") ``` #### Delete a room You can delete a room by its object or ID. ```kotlin // By object val roomToDelete = structure.rooms().list().filter { it.name == "room_id1" }.firstOrNull() structure.deleteRoom(roomToDelete!!) // By ID val roomToDelete1 = allRooms.filter { it.id == testRoomId }.firstOrNull() structure.deleteRoom(roomToDelete1!!) ``` * If a room containing devices is deleted, the devices remain in the structure but are no longer assigned to a room. #### Move devices to a different room You can move devices using their objects or IDs. ```kotlin // By object val room2 = structure.rooms().get(Id("room_id_other_structure")) val device1 = structure.devices().get(Id("device_id1")) structure.moveDevicesToRoom(room2!!, listOf(device1!!)) // By ID structure.moveDevicesToRoom(Id("room_id_other_structure"), listOf(Id("device_id1"))) ``` #### Change the name of a room ```kotlin livingRoom.setName("Living Room") ``` * Names are truncated if they exceed 60 Unicode code points. ## Automations The entry point to the Automation API is through a structure. For more information, see the [Automation API on Android overview](/apis/android/automation). ## API Reference ### `Home` API * `structures()`: Get all structures on the Google Account. Returns a `HomeObjectsFlow`. ### `Structure` APIs * `automations()`: List all automations in the structure (only those created via Home APIs). * `createAutomation(automation)`: Create an automation instance. * `createRoom(name)`: Create a room. * `deleteAutomation(automationId)`: Delete an automation by its ID. * `deleteRoom(roomId)`: Delete a room by its ID. * `devices()`: Get all devices in the structure. Returns a `HomeObjectsFlow`. * `getAutomation(automationId)`: Get an automation by its ID. * `getSourceConnectivity(trait)`: Get metadata for a trait. Returns a `SourceConnectivity`. * `has(trait)`: Check if a trait is supported. * `id`: The unique system ID of the structure. * `moveDevicesToRoom(roomId, deviceIds)`: Move devices to a different room. * `name`: The user-provided name of the structure. * `rooms()`: Get all rooms in the structure. Returns a `HomeObjectsFlow`. * `trait(trait)`: Get a current snapshot of trait attributes. > **Note:** Common APIs like `devices()`, `id`, and `name` are also available for a `Room`. --- # Source: https://developers.home.google.com/apis/android/supported-device-types # Supported device types on Android Device support is determined by traits from the Google Home ecosystem or the Matter specification, which enable specific features. For more details, see [Data model on Android](/apis/android/data-model). > **Note:** Provisional Matter device types and clusters are not supported. ### Table Key * `matter`: Indicates the trait is from the Matter standard. * `google`: Indicates the trait is from the Google smart home ecosystem. * **Kotlin Sample App**: Indicates if device state or limited control is implemented in the [sample app](/apis/android/sample-app/build). * **Use Case**: The corresponding device type from the Google Home ecosystem, as featured on the [Use Cases](/use-cases) page. * **Device type IDs**: Unique identifiers (e.g., `home.matter.0000.types.002d`) which correspond to the Matter Vendor ID (VID). > **Tip:** Device types that begin with `Google*` are Google smart home device types, not Google-branded devices. The following devices and their associated traits are supported by the Home APIs for Android: | Home APIs Device Type | Traits | Kotlin Sample App | Use Case | | --- | --- | --- | --- | | **[AirPurifierDevice](/reference/kotlin/com/google/home/matter/standard/AirPurifierDevice)**
ID: `home.matter.0000.types.002d`
*A device designed to clean the air in a room.* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl)
**Optional**:
  • matter [HepaFilterMonitoring](/reference/kotlin/com/google/home/matter/standard/HepaFilterMonitoring)
  • matter [ActivatedCarbonFilterMonitoring](/reference/kotlin/com/google/home/matter/standard/ActivatedCarbonFilterMonitoring)
  • google [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl)
  • google [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality)
  • google [FilterMonitoring](/reference/kotlin/com/google/home/google/FilterMonitoring)
| | [Air Purifier](/use-cases?device=air-purifier) | | **[AirQualitySensorDevice](/reference/kotlin/com/google/home/matter/standard/AirQualitySensorDevice)**
ID: `home.matter.0000.types.002c`
*A device that monitors and measures air quality parameters.* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [AirQuality](/reference/kotlin/com/google/home/matter/standard/AirQuality)
**Optional**:
  • matter [TemperatureMeasurement](/reference/kotlin/com/google/home/matter/standard/TemperatureMeasurement)
  • matter [RelativeHumidityMeasurement](/reference/kotlin/com/google/home/matter/standard/RelativeHumidityMeasurement)
  • matter [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement)
  • matter [CarbonDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurement)
  • matter [NitrogenDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurement)
  • matter [OzoneConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurement)
  • matter [Pm25ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurement)
  • matter [FormaldehydeConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurement)
  • matter [Pm1ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm1ConcentrationMeasurement)
  • matter [Pm10ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurement)
  • matter [TotalVolatileOrganicCompoundsConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurement)
  • matter [RadonConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurement)
| | [Sensor](/use-cases?device=sensor) | | **[ContactSensorDevice](/reference/kotlin/com/google/home/matter/standard/ContactSensorDevice)**
ID: `home.matter.0000.types.0015`
*A device that detects if an object (e.g., door, window) is open or closed.* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [BooleanState](/reference/kotlin/com/google/home/matter/standard/BooleanState)
**Optional**:
  • matter [BooleanStateConfiguration](/reference/kotlin/com/google/home/matter/standard/BooleanStateConfiguration)
| boolean state | [Sensor](/use-cases?device=sensor) | | **[FlowSensorDevice](/reference/kotlin/com/google/home/matter/standard/FlowSensorDevice)**
ID: `home.matter.0000.types.0306`
*A device that measures and reports the flow rate of a fluid.* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [FlowMeasurement](/reference/kotlin/com/google/home/matter/standard/FlowMeasurement)
| | [Sensor](/use-cases?device=sensor) | | **[HumiditySensorDevice](/reference/kotlin/com/google/home/matter/standard/HumiditySensorDevice)**
ID: `home.matter.0000.types.0307`
*A device that reports humidity measurements.* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [RelativeHumidityMeasurement](/reference/kotlin/com/google/home/matter/standard/RelativeHumidityMeasurement)
**Optional**:
  • google [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl)
  • google [RelativeHumidityControl](/reference/kotlin/com/google/home/google/RelativeHumidityControl)
  • google [ExtendedOperationalState](/reference/kotlin/com/google/home/google/ExtendedOperationalState)
| | [Sensor](/use-cases?device=sensor) | | **[LightSensorDevice](/reference/kotlin/com/google/home/matter/standard/LightSensorDevice)**
ID: `home.matter.0000.types.0106`
*A device that measures and reports the intensity of light (illuminance).* | **Required**:
  • matter [Identify](/reference/kotlin/com/google/home/matter/standard/Identify)
  • matter [IlluminanceMeasurement](/reference/kotlin/com/google/home/matter/standard/IlluminanceMeasurement)
| | | --- # Source: https://developers.home.google.com/apis/android/device # Android Device & Metadata APIs Access devices and their metadata using the Home APIs for Android. ### Required Imports Import the base packages: ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.Id ``` Import specific device types or traits as needed. For example, for the Matter On/Off trait and On/Off Plug-in Unit device type: ```kotlin import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOffPluginUnitDevice ``` **Note:** Android Studio's auto-complete feature lists available packages. For more information, see [Data model on Android](/apis/android/data-model). ## Error Handling All Home API methods can throw a `HomeException`. Use a `try-catch` block for all calls and check the `code` and `message` fields to identify the error. Unhandled exceptions will crash your app. See [Error handling](/apis/android/error-handling) and [Send a command to a device](/apis/android/device/control#send-command) for examples. ## Sample Calls ### Get a list of devices Get a `Flow` of all devices accessible from a structure: ```kotlin // Get a flow of all devices accessible to the user val allDevicesFlow: HomeObjectsFlow = home.devices() // Calling list() on a HomeObjectsFlow returns the first Set of elements. val allDevices: Set = allDevicesFlow.list() ``` ### Read a device state Retrieve a specific trait's data, like the `OnOff` attribute, through the device type's `standardTraits` class. Use `distinctUntilChanged` to only trigger on specific trait changes. ```kotlin // Assuming we have a device. val deviceFlow = home.devices().itemFlow(myDeviceId) val device = deviceFlow.first() // Get a flow of a standard trait on the type. val onOffTraitFlow: Flow = device.type(DimmableLightDevice).map { it.standardTraits.onOff }.distinctUntilChanged() val onOffTrait: OnOff = onOffTraitFlow.first()!! ``` See [`distinctUntilChanged`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/distinct-until-changed.html) for more details. ### Invalidate state in a trait subscription The [`TraitStateInvalidation` interface](/reference/kotlin/com/google/home/TraitStateInvalidation) forces a read of the current trait state, returning the result through existing trait flows. This is useful when state is not reported correctly (e.g., Matter traits with "C" quality). ```kotlin val onOffTrait = device.?type(DimmableLightDevice)?.map{it.trait(OnOff)}.first() onOffTrait.forceRead() ``` **Important:** Use this API sparingly as it can impact device performance and battery life. ### Get a list of device type traits Device types decompose a device into its functional pieces and handle trait collisions. To get the list of available traits for a device type: ```kotlin // Get all types available on this device. val typesFlow: Flow> = device.types() val types: Set = typesFlow.first() // Get the DimmableLightDevice instance from the set of types. val dimmableLightDevice = types.filterIsInstance().firstOrNull() // Get all traits in the type + traits registered val allTraits: Set = dimmableLightDevice!!.traits() ``` To avoid ambiguity when a device has traits with the same name (e.g., standard vs. manufacturer-defined), use qualifying namespaces: * `standardTraits`: For standard traits (analogous to Matter standard clusters). * `googleTraits`: For Google traits. ```kotlin // Accessing standard traits on the type. val onOffTrait: OnOff? = dimmableLightDevice.standardTraits.onOff val levelControlTrait: LevelControl? = dimmableLightDevice.standardTraits.levelControl // Accessing a custom trait on the type. val customTrait = dimmableLightDevice.trait(MyCustomTrait) ``` ### Get a list of devices with a specific trait Use Kotlin's [`filter`](https://kotlinlang.org/docs/collection-filtering.html) to find devices with a specific trait. ```kotlin // Get all devices that support OnOff val onOffDevices: Flow> = home.devices().map { devices -> devices.filter { it.has(OnOff) } } ``` See the [`Trait` interface](/reference/kotlin/com/google/home/Trait) for a full list of traits. ### Get a list of devices with similar device types To get a comprehensive view of a higher-level device type (e.g., all "lights"), filter for multiple related device types. ```kotlin // Get a list of devices with similar device types (lights) val lightDevices = home.devices().map { devices -> devices.filter { it.has(DimmableLightDevice) || it.has(OnOffLightDevice) || it.has(ColorTemperatureLightDevice) || it.has(ExtendedColorLightDevice) } } ``` See the [`DeviceType` interface](/reference/kotlin/com/google/home/DeviceType) for a full list of device types. ### Get the Vendor ID or Product ID for a device The [`BasicInformation`](/reference/kotlin/com/google/home/matter/standard/BasicInformation) trait includes Vendor ID, Product ID, Product Name, and Serial Number. ```kotlin // Get device basic information. All general information traits are on the RootNodeDevice type. val basicInformation = device.type(RootNodeDevice).first().standardTraits.basicInformation!! println("vendorName ${basicInformation.vendorName}") println("vendorId ${basicInformation.vendorId}") println("productId ${basicInformation.productId}") ``` #### Cloud-to-cloud device identification for device manufacturers To identify your [Cloud-to-cloud](/cloud-to-cloud/get-started) devices via the `BasicInformation` trait, include these string fields in their `SYNC` response: * `"matterOriginalVendorId"`: The CSA-issued vendor ID (e.g., `"0xfff1"`). * `"matterOriginalProductId"`: A unique product identifier (e.g., `"0x1234"`). * `"matterUniqueId"`: A manufacturer-specific unique device identifier (e.g., `"matter-device-id"`). Example `SYNC` response: ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "payload": { "agentUserId": "1836.15267389", "devices": [ { "id": "456", "type": "action.devices.types.LIGHT", "traits": [ "action.devices.traits.OnOff", "action.devices.traits.Brightness", "action.devices.traits.ColorSetting" ], "willReportState": true, "deviceInfo": { "...": "..." }, "matterOriginalVendorId": "0xfff1", "matterOriginalProductId": "0x1234", "matterUniqueId": "matter-device-id", "otherDeviceIds": [ { "deviceId": "local-device-id" } ] } ] } } ``` See [Cloud-to-cloud `SYNC` documentation](/cloud-to-cloud/integration/sync#sync-request). ## Device and Trait Metadata Each trait has a [`sourceConnectivity`](/reference/kotlin/com/google/home/SourceConnectivity) property with information about its online status and routing (local/remote). ### Get the primary type of a device A device can have multiple types. Check for primary types to determine core functionality. **Important:** * All types on the primary endpoint are primary types. * If one member of a Matter superset type (e.g., a light) is primary, all other present members of that superset are also primary. ```kotlin val types = device.types().first() val primaryTypes = types.filter { it.metadata.isPrimaryType } ``` ### Check if a trait is online Use the `connectivityState()` method. Cloud-based traits may be offline without internet connectivity. ```kotlin val onOffConnectivity = onOffTrait?.metadata?.sourceConnectivity?.connectivityState ``` ### Check connectivity for a device Connectivity is checked at the device type level, aggregating all its trait states. ```kotlin val lightConnectivity = dimmableLightDevice.metadata.sourceConnectivity.connectivityState ``` A state of `PARTIALLY_ONLINE` can occur with mixed local (Matter) and cloud-based traits. **Important:** A device with `connectivityState` of [`PARTIALLY_ONLINE`](/reference/kotlin/com/google/home/ConnectivityState#PARTIALLY_ONLINE) should be represented to the user as "Online." ### Check the network routing of a trait The `dataSourceLocality` indicates if routing is remote (cloud), local (hub), or peer-to-peer. An `UNSPECIFIED` value is possible during app boot when devices are unreachable. ```kotlin val onOffLocality = onOffTrait?.metadata?.sourceConnectivity?.dataSourceLocality ``` ### Check the network routing for a device Like connectivity, locality is checked at the device type level, aggregating all trait localities. A `MIXED` state is possible. ```kotlin val lightLocality = dimmableLightDevice.metadata.sourceConnectivity.dataSourceLocality ``` ### Change the name of a device Use the [`setName()`](/reference/kotlin/com/google/home/HomeDevice#setName(kotlin.String)) method. Names are truncated if over the 60-character limit, and no errors are thrown. ```kotlin mixerDevice.setName("Grendel") ``` ## API List ### Home APIs Accessible via a [`Home`](/reference/kotlin/com/google/home/Home) instance. | API | Description | | --- | --- | | `devices()` | Get all devices in all structures. Returns a [`HomeObjectsFlow`](/reference/kotlin/com/google/home/HomeObjectsFlow). | ### HomeDevice APIs Accessible via a [`HomeDevice`](/reference/kotlin/com/google/home/HomeDevice) instance. | API | Description | | --- | --- | | `allCandidates()` | Returns all [automation candidates](/apis/android/automation/discovery) for the device and its children. | | `candidates()` | Returns all [automation candidates](/apis/android/automation/discovery) for the device. | | `connectivityStateChanged` | The most recent time the device's state changed. | | `events(event)` | Gets a flow of a specific Event. | | `events(trait)` | Gets a flow of all Events by this Trait. | | `events(traits)` | Gets a flow of all Events by these Traits. | | `getSourceConnectivity(trait)` | Get metadata for a particular trait. Returns a `SourceConnectivity`. | | `has(trait)` | Check if the device supports the requested trait. | | `has(type)` | Check if the device supports the provided type. | | `id` | The unique system ID of the device. | | `isMatterDevice` | Check if the device is backed by Matter. | | `name` | The user-provided name of the device. | | `room()` | The room the device is assigned to. Returns a `Room`. | | `roomId` | The ID of the room the device is assigned to. Returns an `Id`. | | `sourceConnectivity` | Aggregated connectivity and locality of the device's traits. | | `structure()` | The structure the device is assigned to. Returns a `Structure`. | | `structureId` | The ID of the structure the device is assigned to. Returns an `Id`. | | `type(type)` | Get the type definition with populated traits. Returns an up-to-date snapshot. | | `types()` | Get a list of all types available on the device. | --- # Source: https://developers.home.google.com/apis/android/device/control # Control devices on Android ### Check if a trait supports a command Use the trait-level `supports` function to check if a device supports a specific command. ```kotlin // Check if the OnOff trait supports the toggle command. if (onOffTrait.supports(OnOff.Command.Toggle)) { println("onOffTrait supports toggle command") } else { println("onOffTrait does not support stateful toggle command") } ``` **Note:** The `Command` enum value is capitalized (`Toggle`), while the method is not (`toggle`). ### Send a command to a device To send a command, call the corresponding method on the trait. For example, to toggle a device's on/off state: ```kotlin // Calling a command on a trait. try { onOffTrait.toggle() } catch (e: HomeException) { // Handle the exception } ``` * **All trait commands are `suspend` functions.** They complete only when a response is returned from the API. * **Commands can throw exceptions.** Always use a `try-catch` block to handle potential errors. * You can also use explicit commands like `onOffTrait.off()` or `onOffTrait.on()`. * After sending a command, the preferred method to get the updated state is to [observe state with flows](/apis/observe-state). ### Send a command with parameters Some commands accept required or optional parameters. **Required Parameters:** ```kotlin // Turn off the light using the DyingLight effect. onOffTrait.offWithEffect( effectIdentifier = OnOffTrait.EffectIdentifierEnum.DyingLight, effectVariant = 0u, ) // Change the brightness of the light to 50% levelControlTrait.moveToLevel( level = 127u.toUByte(), // Matter spec: currentLevel is 0-254. 127 is ~50%. transitionTime = null, optionsMask = LevelControlTrait.OptionsBitmap(), optionsOverride = LevelControlTrait.OptionsBitmap(), ) ``` **Optional Parameters:** Optional arguments follow required ones. They can be set in a trailing lambda. ```kotlin val fanControl = // ... get FanControl trait // Calling with only required parameters fanControl?.step(direction = FanControlTrait.StepDirectionEnum.Increase) // Calling with an optional parameter fanControl?.step(direction = FanControlTrait.StepDirectionEnum.Increase) { wrap = true } ``` ### Check if a trait supports an attribute Use the `supports` function with the trait's `Attribute` enum to verify attribute support, as some devices may not support every attribute of a trait. ```kotlin // Check if the OnOff trait supports the onOff attribute. if (onOffTrait.supports(OnOff.Attribute.onOff)) { println("onOffTrait supports onOff state") } else { println("onOffTrait is for a command only device!") } ``` For attributes that are nullable in the specification, you can use `isNullable` to distinguish between an unsupported attribute and one whose value is legitimately `null`. ```kotlin if (onOffTrait.supports(OnOff.Attribute.startUpOnOff)) { // The device supports startUpOnOff. if (OnOff.Attribute.startUpOnOff.isNullable && onOffTrait.startUpOnOff == null) { // This value is nullable and currently set to null. println("onOffTrait supports startUpOnOff and it is null") } else { // This value is set. println("onOffTrait supports startUpOnOff and it is set to ${onOffTrait.startUpOnOff}") } } else { println("onOffTrait does not support startUpOnOff!") } ``` ### Update trait attributes An attribute's value can be changed if it is writable. How it can be changed depends on its properties: * **Read-only & not affected by commands**: The value is static (e.g., `SwitchTrait.currentPosition`). * **Read-only & affected by commands**: The value changes only as a side effect of a command (e.g., `LevelControlTrait.currentLevel` is changed by `moveToLevel`). * **Writable & not affected by commands**: The value can only be changed directly using the `update` function (e.g., `DoorLockTrait.WrongCodeEntryLimit`). * **Writable & affected by commands**: The value can be changed by both the `update` function and by commands (e.g., `FanControlTrait.speedSetting` is changed by `step`). To directly set a writable attribute's value, use the trait's `update` function with a mutator. ```kotlin val doorLockTrait: DoorLock = // ... get DoorLock trait if (doorLockTrait.supports(DoorLock.Attribute.wrongCodeEntryLimit)) { doorLockTrait.update { setWrongCodeEntryLimit(3u) } } ``` ### Send multiple commands at once (Batching API) **Warning:** This API is experimental and may change. The Batching API allows sending multiple commands across different devices in a single payload for parallel execution. **How to use the Batching API:** 1. Invoke the `Home.sendBatchedCommands()` method. 2. Inside its lambda block, specify commands to be included in the batch. Use the "shadow" versions of commands, which have a `Batchable` suffix (e.g., `onBatchable()`, `lockDoorBatchable()`). 3. Add each command to the batch using `add()`. This returns a `DeferredResponse`. 4. The batch is sent automatically when execution leaves the lambda. 5. **Important:** Individual command failures within the batch **do not** throw exceptions. 6. Outside the `sendBatchedCommands()` block, check each `DeferredResponse` by calling `getOrThrow()` to see if the command succeeded or failed. **Example: 'Good Night' Scene** This example turns off all lights and locks the front and back doors simultaneously. ```kotlin val lightDevices: List = // ... val doorlockDevices: List = // ... // 1. Send all commands in a batch val responses: List> = home.sendBatchedCommands { // 2. Add batchable commands for each light val lightResponses = lightDevices.map { lightDevice -> add(lightDevice.standardTraits.onOff.onBatchable()) } // 3. Add batchable commands for each door lock val doorLockResponses = doorlockDevices.map { doorlockDevice -> add(doorlockDevice.standardTraits.doorLock.lockDoorBatchable()) } lightResponses + doorLockResponses } // 4. Check all responses for success or failure outside the batch block try { for (response in responses) { response.getOrThrow() } // All commands succeeded } catch (e: Exception) { // At least one command failed } ``` --- # Source: https://developers.home.google.com/apis/android/device/monitor # Monitor Device State on Android Observing state changes in the home (structures, rooms, devices) is done using Kotlin [flows](https://developer.android.com/kotlin/flow). Any API inheriting from [`HomeObjectsFlow`](/reference/kotlin/com/google/home/HomeObjectsFlow) provides this capability. When any item in a collection is added, deleted, or modified, the flow emits the latest snapshot of the entire collection. You must compare this snapshot with a previous version to deduce specific changes, using the `id` field provided for each [parent object type](/reference/kotlin/com/google/home/HasId). ## Using Flows to Observe State First, create an instance of `Home`: ```kotlin val context = LocalContext.current val homeManager = Home.getClient(context) ``` ### Track Structure Changes This flow is triggered by changes to a structure's [name](/reference/kotlin/com/google/home/Structure#name()). ```kotlin homeManager.structures().map { it.firstOrNull() }.collect { println("Structure ${it.id} updated to ${it}") } val structure = homeManager.structures().list().firstOrNull()!! ``` ### Track Specific Device Changes Triggered by changes to a device's: * [Connectivity state](/reference/kotlin/com/google/home/ConnectivityState) * [Name](/reference/kotlin/com/google/home/HomeDevice#name()) * [Room](/reference/kotlin/com/google/home/HomeDevice#room()) membership * Supported [traits](/reference/kotlin/com/google/home/HasTraits#has(com.google.home.TraitFactory)) * Supported [types](/reference/kotlin/com/google/home/HasDeviceTypes#has(com.google.home.DeviceTypeFactory)) ```kotlin structure .devices() .map { devices -> device.filter { it.name == "Bedroom Lamp" }.single() } .collect { println("The bedroom lamp has changed!") } val device = structure.devices().list().firstOrNull { it.name == "Bedroom Lamp" }!! ``` ### Track Specific Trait Changes on a Device Use any trait supported by the device and the Home APIs. See [`Trait`](/reference/kotlin/com/google/home/Trait) for a full list. ```kotlin val trait = device.type(DimmableLightDevice)?.map { it.trait(OnOff)}.first() trait?.collect { if (it != null) { println("Got new state update! ${it.onOff}") } } ``` ### Track Specific Type Changes on a Device Triggered by changes to any trait within the [generated device type](/reference/kotlin/com/google/home/HasDeviceTypes#type(com.google.home.DeviceTypeFactory)). Use any Matter device type supported by the Home APIs. See [`DeviceType`](/reference/kotlin/com/google/home/DeviceType) for a full list. ```kotlin device.type(DimmableLightDevice).collect { type -> println("Got new state update! ${type.trait(LevelControl)?.currentLevel}") } ``` ### Track Room Changes in a Structure Triggered by changes to a room's: * [Name](/reference/kotlin/com/google/home/Room#name()) * [Structure](/reference/kotlin/com/google/home/Room#structure()) membership > **Note:** To track when devices are added or removed from a room, use the `devices()` flow. ```kotlin structure.rooms().collect { println("Got a new updated set of rooms!") for (room in it) { println("Got room $room") } } ``` ## Subscribing to Device Events Events are used to detect changes in a device's state. > **Important:** Device manufacturers are not required to send Matter events. In such cases, you must rely on observing state changes as described in the section above. See [Observe state changes](/apis/observe-state). To subscribe to events on a specific device, call one of the three [`HomeDevice`](/reference/kotlin/com/google/home/HomeDevice).[`events`](/reference/kotlin/com/google/home/HasEvents#events(com.google.home.EventFactory)) functions, which return a `Flow`: 1. **For a specific event type:** ```kotlin val eventFlow = homeDevice.type(DoorLockDevice).first().events(DoorLock.DoorLockAlarmEvent) ``` 2. **For all events from a trait:** ```kotlin val eventflow = homeDevice.type(DoorLockDevice).first().events(DoorLock) ``` 3. **For all available events for the object:** ```kotlin val eventflow = homeDevice.type(DoorLockDevice).first().events() ``` Consume events from the flow using `collect()`: ```kotlin eventflow.collect { event -> if (event != null) { logger.atInfo().log("Received event %s", event) // do something } } ``` ## Subscribing to Entity Relation Events You can listen for events when an entity (structure, room, device, automation) is added, removed, or updated. These events are instances of [`HomeObjectChangeEvent`](/reference/kotlin/com/google/home/HomeObjectChangeEvent) and contain the ID of the changed entity. > **Note:** These events originate from the Device and Structure APIs, not as Matter events. To get an event stream, call the [`stream()`](/reference/kotlin/com/google/home/HomeObjectsFlow#stream()) method on the [`HomeObjectsFlow`](/reference/kotlin/com/google/home/HomeObjectsFlow) from the corresponding flow method: | Entity | Interface | Flow Method | | --- | --- | --- | | [`Structure`](/apis/android/device/reference/kotlin/com/google/home/Structure) | [`HasStructures`](/reference/kotlin/com/google/home/HasStructures) | [`structures()`](/reference/kotlin/com/google/home/HasStructures#structures()) | | [`Room`](/apis/android/device/reference/kotlin/com/google/home/Room) | [`HasRooms`](/reference/kotlin/com/google/home/HasRooms) | [`rooms()`](/reference/kotlin/com/google/home/HasRooms#rooms()) | | [`HomeDevice`](/apis/android/device/reference/kotlin/com/google/home/HomeDevice) | [`HasHomeDevices`](/reference/kotlin/com/google/home/HasHomeDevices) | [`devices()`](/reference/kotlin/com/google/home/HasHomeDevices#devices()) | | [`Automation`](/apis/android/device/reference/kotlin/com/google/home/Automation) | [`HasAutomations`](/reference/kotlin/com/google/home/HasAutomations) | [`automations()`](/reference/kotlin/com/google/home/HasAutomations#automations()) | Example of handling device changes: ```kotlin val devicesStream = home.devices().stream() // Collect and react to device changes. devicesStream.collect { deviceEvent -> when (deviceEvent) { is HomeObjectAddedEvent -> println("New device now available with id: ${deviceEvent.id}") is HomeObjectUpdatedEvent -> println("Device ${deviceEvent.id} has been updated") is HomeObjectRemovedEvent -> println("Device is removed from your account") else -> {} } } ``` --- # Source: https://developers.home.google.com/apis/android/device/remove # Remove a device Removing (decommissioning) a device from a structure can be done via the Google Home app (GHA) or programmatically by an app using the Home APIs. This action has limitations and can affect the entire structure and user experience. ## Removable Devices An app can programmatically remove: * **Matter devices** for which the app has permissions. * **Matter bridges**, provided the app has access to all devices connected through it. Removing the bridge also removes all its connected devices. ## Non-Removable Devices The Home APIs **cannot** be used to programmatically remove: * Matter devices for which the app lacks user permissions. * Individual devices connected behind a Matter bridge. * Cloud-to-cloud linked devices. * Dual-path devices (implementing both Matter and Cloud-to-cloud). ## Important Considerations Removing a device affects all users and apps in the structure, including the GHA. * **Multi-function Devices**: Removing a device with multiple functions (e.g., a smart light that is also a hub) will also remove all associated devices. The app should inform the user. * **Device History**: The device's history may be deleted. * **Shared Surfaces**: Deleting devices on shared surfaces can have unintended consequences for other users. * **Authentication**: Device removal must be performed on authenticated surfaces (e.g., a mobile phone) and not on unauthenticated ones (e.g., a TV), per [Google Home Developer Policies](/policies). ## How to Remove a Device ### 1. Check Eligibility (Optional) Checking a device's removal eligibility is a resource-intensive, high-latency operation and should only be done when necessary to avoid impacting UI responsiveness. ```kotlin val eligibility = device.checkDecommissionEligibility() if (eligibility is DecommissionEligibility.Ineligible) { println("The device cannot be decommissioned.") } else if (eligibility is DecommissionEligibility.EligibleWithSideEffects) { println("The device can be decommissioned but there will be side effects on other devices.") } else if (eligibility is DecommissionEligibility.Eligible) { println("The device can be decommissioned.") } ``` ### 2. Remove the Device #### Matter Devices A Matter device can be removed programmatically if it is not behind a Matter bridge. * **To remove**, call `decommissionDevice()`: ```kotlin val decommissionedDeviceIds = device.decommissionDevice() ``` A successful call does not throw an error. * **To verify**, check if the device ID is in the returned list: ```kotlin if (decommissionedDeviceIds.contains(deviceId)) { println("Decommission successful!") } else { println("Decommission failed!") } ``` #### Non-Matter Devices Non-Matter devices **cannot** be removed programmatically. * Calling `decommissionDevice()` on a non-Matter device throws a `HomeException`. * To remove them, you must issue a [Sync request](/cloud-to-cloud/integration/request-sync) or [delete the Cloud-to-cloud integration](/cloud-to-cloud/on-hold/launch/delete). * **To verify** removal, confirm the device is no longer present by attempting to retrieve it: ```kotlin var removedDevice: HomeDevice? = null runBlockingCustom { try { removedDevice = homeManager.devices().get(deviceId) } catch (exception: Exception) { println("removal successful!") } } if (removedDevice != null) { println("removal failed!") } ``` --- # Source: https://developers.home.google.com/apis/android/device/trait-index # Trait Index on Android This index helps determine a trait's name from its ID, which is often the only information available in log messages. Each trait has a unique ID containing a four-digit string corresponding to the Matter Vendor ID (VID): * `0000`: **Matter Standard VID** - The trait is derived from a Matter cluster. * `6006`: **Google VID** - The trait is derived from a Google smart home trait. For example, `home.matter.0000.clusters.0508` is the Matter trait `LowPower`, and `home.matter.6006.clusters.fc2f` is the Google trait `OpenClose`. For additional information, see [Traits](/apis/android/data-model#traits). | Trait ID | Trait name | | --- | --- | | home.matter.0000\.clusters.050e | [AccountLogin](/reference/kotlin/com/google/home/matter/standard/AccountLogin) | | home.matter.0000\.clusters.0025 | [Actions](/reference/kotlin/com/google/home/matter/standard/Actions) | | home.matter.0000\.clusters.0072 | [ActivatedCarbonFilterMonitoring](/reference/kotlin/com/google/home/matter/standard/ActivatedCarbonFilterMonitoring) | | home.matter.0000\.clusters.005b | [AirQuality](/reference/kotlin/com/google/home/matter/standard/AirQuality) | | home.matter.0000\.clusters.050d | [ApplicationBasic](/reference/kotlin/com/google/home/matter/standard/ApplicationBasic) | | home.matter.0000\.clusters.050c | [ApplicationLauncher](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher) | | home.matter.6006\.clusters.fc06 | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | | home.matter.6006\.clusters.fc08 | [AudioInput](/reference/kotlin/com/google/home/google/AudioInput) | | home.matter.0000\.clusters.050b | [AudioOutput](/reference/kotlin/com/google/home/matter/standard/AudioOutput) | | home.matter.0000\.clusters.0028 | [BasicInformation](/reference/kotlin/com/google/home/matter/standard/BasicInformation) | | home.matter.0000\.clusters.001e | [Binding](/reference/kotlin/com/google/home/matter/standard/Binding) | | home.matter.0000\.clusters.0045 | [BooleanState](/reference/kotlin/com/google/home/matter/standard/BooleanState) | | home.matter.0000\.clusters.0080 | [BooleanStateConfiguration](/reference/kotlin/com/google/home/matter/standard/BooleanStateConfiguration) | | home.matter.6006\.clusters.fc48 | [Brightness](/reference/kotlin/com/google/home/google/Brightness) | | home.matter.0000\.clusters.040d | [CarbonDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurement) | | home.matter.0000\.clusters.040c | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | | home.matter.0000\.clusters.0504 | [Channel](/reference/kotlin/com/google/home/matter/standard/Channel) | | home.matter.0000\.clusters.0300 | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | | home.matter.0000\.clusters.050a | [ContentLauncher](/reference/kotlin/com/google/home/matter/standard/ContentLauncher) | | home.matter.6006\.clusters.fc0f | [Cook](/reference/kotlin/com/google/home/google/Cook) | | home.matter.0000\.clusters.001d | [Descriptor](/reference/kotlin/com/google/home/matter/standard/Descriptor) | | home.matter.0000\.clusters.005d | [DishwasherAlarm](/reference/kotlin/com/google/home/matter/standard/DishwasherAlarm) | | home.matter.0000\.clusters.0059 | [DishwasherMode](/reference/kotlin/com/google/home/matter/standard/DishwasherMode) | | home.matter.6006\.clusters.fc11 | [Dispense](/reference/kotlin/com/google/home/google/Dispense) | | home.matter.6006\.clusters.fc12 | [Dock](/reference/kotlin/com/google/home/google/Dock) | | home.matter.6006\.clusters.fc04 | [DoorbellPress](/reference/kotlin/com/google/home/google/DoorbellPress) | | home.matter.0000\.clusters.0101 | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | | home.matter.0000\.clusters.0091 | [ElectricalEnergyMeasurement](/reference/kotlin/com/google/home/matter/standard/ElectricalEnergyMeasurement) | | home.matter.0000\.clusters.0090 | [ElectricalPowerMeasurement](/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurement) | | home.matter.6006\.clusters.fc14 | [ElevatorControl](/reference/kotlin/com/google/home/google/ElevatorControl) | | home.matter.0000\.clusters.0099 | [EnergyEvse](/reference/kotlin/com/google/home/matter/standard/EnergyEvse) | | home.matter.0000\.clusters.009d | [EnergyEvseMode](/reference/kotlin/com/google/home/matter/standard/EnergyEvseMode) | | home.matter.6006\.clusters.fc38 | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | | home.matter.6006\.clusters.fc05 | [ExtendedApplicationLauncher](/reference/kotlin/com/google/home/google/ExtendedApplicationLauncher) | | home.matter.6006\.clusters.fc01 | [ExtendedChannel](/reference/kotlin/com/google/home/google/ExtendedChannel) | | home.matter.6006\.clusters.fc41 | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | | home.matter.6006\.clusters.fc32 | [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl) | | home.matter.6006\.clusters.fc2c | [ExtendedLevelControl](/reference/kotlin/com/google/home/google/ExtendedLevelControl) | | home.matter.6006\.clusters.fc34 | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | | home.matter.6006\.clusters.fc2d | [ExtendedMediaPlayback](/reference/kotlin/com/google/home/google/ExtendedMediaPlayback) | | home.matter.6006\.clusters.fc4a | [ExtendedModeSelect](/reference/kotlin/com/google/home/google/ExtendedModeSelect) | | home.matter.6006\.clusters.fc36 | [ExtendedOperationalState](/reference/kotlin/com/google/home/google/ExtendedOperationalState) | | home.matter.6006\.clusters.fc16 | [ExtendedPowerSource](/reference/kotlin/com/google/home/google/ExtendedPowerSource) | | home.matter.6006\.clusters.fc33 | [ExtendedTemperatureControl](/reference/kotlin/com/google/home/google/ExtendedTemperatureControl) | | home.matter.6006\.clusters.fc42 | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | | home.matter.0000\.clusters.0202 | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | | home.matter.6006\.clusters.fc17 | [Fill](/reference/kotlin/com/google/home/google/Fill) | | home.matter.6006\.clusters.fc39 | [FilterMonitoring](/reference/kotlin/com/google/home/google/FilterMonitoring) | | home.matter.0000\.clusters.0040 | [FixedLabel](/reference/kotlin/com/google/home/matter/standard/FixedLabel) | | home.matter.0000\.clusters.0404 | [FlowMeasurement](/reference/kotlin/com/google/home/matter/standard/FlowMeasurement) | | home.matter.0000\.clusters.042b | [FormaldehydeConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurement) | | home.matter.0000\.clusters.0071 | [HepaFilterMonitoring](/reference/kotlin/com/google/home/matter/standard/HepaFilterMonitoring) | | home.matter.0000\.clusters.0003 | [Identify](/reference/kotlin/com/google/home/matter/standard/Identify) | | home.matter.0000\.clusters.0400 | [IlluminanceMeasurement](/reference/kotlin/com/google/home/matter/standard/IlluminanceMeasurement) | | home.matter.0000\.clusters.0509 | [KeypadInput](/reference/kotlin/com/google/home/matter/standard/KeypadInput) | | home.matter.0000\.clusters.004a | [LaundryDryerControls](/reference/kotlin/com/google/home/matter/standard/LaundryDryerControls) | | home.matter.0000\.clusters.0053 | [LaundryWasherControls](/reference/kotlin/com/google/home/matter/standard/LaundryWasherControls) | | home.matter.0000\.clusters.0051 | [LaundryWasherMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherMode) | | home.matter.6006\.clusters.fc3a | [LeafWetnessMeasurement](/reference/kotlin/com/google/home/google/LeafWetnessMeasurement) | | home.matter.0000\.clusters.0008 | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | | home.matter.6006\.clusters.fc40 | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | | home.matter.6006\.clusters.fc1a | [Locator](/reference/kotlin/com/google/home/google/Locator) | | home.matter.6006\.clusters.fc31 | [LockUnlock](/reference/kotlin/com/google/home/google/LockUnlock) | | home.matter.0000\.clusters.0508 | [LowPower](/reference/kotlin/com/google/home/matter/standard/LowPower) | | home.matter.6006\.clusters.fc3b | [Max2FilterMonitoring](/reference/kotlin/com/google/home/google/Max2FilterMonitoring) | | home.matter.6006\.clusters.fc35 | [MediaActivityState](/reference/kotlin/com/google/home/google/MediaActivityState) | | home.matter.0000\.clusters.0507 | [MediaInput](/reference/kotlin/com/google/home/matter/standard/MediaInput) | | home.matter.0000\.clusters.0506 | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | | home.matter.0000\.clusters.005f | [MicrowaveOvenControl](/reference/kotlin/com/google/home/matter/standard/MicrowaveOvenControl) | | home.matter.0000\.clusters.005e | [MicrowaveOvenMode](/reference/kotlin/com/google/home/matter/standard/MicrowaveOvenMode) | | home.matter.0000\.clusters.0050 | [ModeSelect](/reference/kotlin/com/google/home/matter/standard/ModeSelect) | | home.matter.6006\.clusters.fc1b | [MotionDetection](/reference/kotlin/com/google/home/google/MotionDetection) | | home.matter.6006\.clusters.fc1d | [NetworkControl](/reference/kotlin/com/google/home/google/NetworkControl) | | home.matter.0000\.clusters.0413 | [NitrogenDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurement) | | home.matter.6006\.clusters.fc30 | [ObjectDetection](/reference/kotlin/com/google/home/google/ObjectDetection) | | home.matter.0000\.clusters.0406 | [OccupancySensing](/reference/kotlin/com/google/home/matter/standard/OccupancySensing) | | home.matter.0000\.clusters.0006 | [OnOff](/reference/kotlin/com/google/home/matter/standard/OnOff) | | home.matter.6006\.clusters.fc2f | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | | home.matter.0000\.clusters.0060 | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | | home.matter.0000\.clusters.0048 | [OvenCavityOperationalState](/reference/kotlin/com/google/home/matter/standard/OvenCavityOperationalState) | | home.matter.0000\.clusters.0049 | [OvenMode](/reference/kotlin/com/google/home/matter/standard/OvenMode) | | home.matter.0000\.clusters.0415 | [OzoneConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurement) | | home.matter.6006\.clusters.fc1f | [ParkingLocation](/reference/kotlin/com/google/home/google/ParkingLocation) | | home.matter.0000\.clusters.042d | [Pm10ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurement) | | home.matter.0000\.clusters.042c | [Pm1ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm1ConcentrationMeasurement) | | home.matter.0000\.clusters.042a | [Pm25ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurement) | | home.matter.0000\.clusters.002f | [PowerSource](/reference/kotlin/com/google/home/matter/standard/PowerSource) | | home.matter.0000\.clusters.009c | [PowerTopology](/reference/kotlin/com/google/home/matter/standard/PowerTopology) | | home.matter.6006\.clusters.fc3c | [PreFilterMonitoring](/reference/kotlin/com/google/home/google/PreFilterMonitoring) | | home.matter.0000\.clusters.0403 | [PressureMeasurement](/reference/kotlin/com/google/home/matter/standard/PressureMeasurement) | | home.matter.0000\.clusters.0200 | [PumpConfigurationAndControl](/reference/kotlin/com/google/home/matter/standard/PumpConfigurationAndControl) | | home.matter.0000\.clusters.042f | [RadonConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurement) | | home.matter.6006\.clusters.fc02 | [Reboot](/reference/kotlin/com/google/home/google/Reboot) | | home.matter.0000\.clusters.0057 | [RefrigeratorAlarm](/reference/kotlin/com/google/home/matter/standard/RefrigeratorAlarm) | | home.matter.0000\.clusters.0052 | [RefrigeratorAndTemperatureControlledCabinetMode](/reference/kotlin/com/google/home/matter/standard/RefrigeratorAndTemperatureControlledCabinetMode) | | home.matter.6006\.clusters.fc19 | [RelativeHumidityControl](/reference/kotlin/com/google/home/google/RelativeHumidityControl) | | home.matter.0000\.clusters.0405 | [RelativeHumidityMeasurement](/reference/kotlin/com/google/home/matter/standard/RelativeHumidityMeasurement) | | home.matter.6006\.clusters.fc2e | [Rotation](/reference/kotlin/com/google/home/google/Rotation) | | home.matter.0000\.clusters.0055 | [RvcCleanMode](/reference/kotlin/com/google/home/matter/standard/RvcCleanMode) | | home.matter.0000\.clusters.0061 | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | | home.matter.0000\.clusters.0054 | [RvcRunMode](/reference/kotlin/com/google/home/matter/standard/RvcRunMode) | | home.matter.6006\.clusters.fc50 | [SimplifiedOnOff](/reference/kotlin/com/google/home/google/SimplifiedOnOff) | | home.matter.6006\.clusters.fc4c | [SimplifiedThermostat](/reference/kotlin/com/google/home/google/SimplifiedThermostat) | | home.matter.6006\.clusters.fc3e | [SoilMoistureMeasurement](/reference/kotlin/com/google/home/google/SoilMoistureMeasurement) | | home.matter.6006\.clusters.fc3f | [SpeedMeasurement](/reference/kotlin/com/google/home/google/SpeedMeasurement) | | home.matter.0000\.clusters.003b | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | | home.matter.0000\.clusters.0505 | [TargetNavigator](/reference/kotlin/com/google/home/matter/standard/TargetNavigator) | | home.matter.0000\.clusters.0056 | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | | home.matter.0000\.clusters.0402 | [TemperatureMeasurement](/reference/kotlin/com/google/home/matter/standard/TemperatureMeasurement) | | home.matter.0000\.clusters.0201 | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | | home.matter.0000\.clusters.0204 | [ThermostatUserInterfaceConfiguration](/reference/kotlin/com/google/home/matter/standard/ThermostatUserInterfaceConfiguration) | | home.matter.6006\.clusters.fc29 | [Timer](/reference/kotlin/com/google/home/google/Timer) | | home.matter.6006\.clusters.fc49 | [Toggles](/reference/kotlin/com/google/home/google/Toggles) | | home.matter.0000\.clusters.042e | [TotalVolatileOrganicCompoundsConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurement) | | home.matter.0000\.clusters.0041 | [UserLabel](/reference/kotlin/com/google/home/matter/standard/UserLabel) | | home.matter.0000\.clusters.0081 | [ValveConfigurationAndControl](/reference/kotlin/com/google/home/matter/standard/ValveConfigurationAndControl) | | home.matter.6006\.clusters.fc43 | [Volume](/reference/kotlin/com/google/home/google/Volume) | | home.matter.0000\.clusters.0503 | [WakeOnLan](/reference/kotlin/com/google/home/matter/standard/WakeOnLan) | | home.matter.0000\.clusters.0102 | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | --- # Source: https://developers.home.google.com/apis/android/manufacturer-specific-traits # Manufacturer-specific traits on Android The Home APIs for Android support Manufacturer-specific (MS) traits, which allow for functionality beyond standard Matter traits. MS traits must be defined in the standard `.matter` IDL format and then converted into an Android package using the Google-provided code generator. Provisional traits can also be generated. **Note:** The term *trait* in the Home APIs is equivalent to *cluster* in the Matter Specification. ### Prerequisites * A Linux-based machine with Python 3.10 or newer. * A `.matter` IDL file with your `client cluster` definitions. * For more about the IDL format, see [matter/idl on GitHub](https://github.com/project-chip/connectedhomeip/tree/master/scripts/py_matter_idl/matter/idl). * The complete IDL for all standard Matter clusters is at [controller-clusters.matter](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/data_model/controller-clusters.matter). ### Generate a package [Download the Packaged Code Generator](/static/apis/matter/matter_codegen.tar.gz) 1. Choose a Java package name that aligns with your app's Application ID (e.g., `com.mycompany.matter.cluster`). 2. Extract and set up the generator: ```bash mkdir -p ~/tmp/codegen_test cd ~/tmp/codegen_test tar xfvz ~/tmp/matter_codegen.tar.gz pip install -r requirements.txt ``` 3. Run the generator with your IDL file: ```bash ./codegen.py \ --generator custom:.:kotlin \ --output-dir ./generated/com/mycompany/matter/cluster \ --option package:com.mycompany.matter.cluster \ custom-cluster-idl.matter ``` ### Use the package Import the generated package into your app to use the MS traits like standard traits. ```kotlin import com.mycompany.matter.cluster // Example: Accessing an MS trait named 'CustomTrait' val device = devices().get(id)? val deviceType = devices().get(id)?.type?.value val trait = device?.type(deviceType)?.map{it.trait(CustomTrait)}.firstOrNull() ``` ### Additional dependencies You may need to add the following to your app's `build.gradle` file: ```groovy implementation 'com.google.errorprone:error_prone_annotations:2.35.1' ``` ### Example #### IDL input A simple MS trait defined in `mycustom.matter`. The trait ID `4294048768` (`0xFFF1FC00`) uses a test Vendor ID (`0xFFF1`) and a manufacturer-specific suffix (`0xFC00`), as per the Matter Specification's *Manufacturer Extensible Identifier (MEI)* section. ```idl // mycustom.matter client cluster MyCustom = 4294048768 { attribute int16u clusterAttr = 1; // Global Attributes readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } ``` #### Run the code generator ```bash ./codegen.py \ --generator custom:.:kotlin \ --output-dir ./generated/com/mycompany/matter/cluster \ --option package:com.mycompany.matter.cluster \ mycustom.matter ``` #### Kotlin output The generator creates two Kotlin files, `MyCustom.kt` and `MyCustomTrait.kt`, in the specified output directory. These files contain the generated interfaces, classes, and serialization logic for the `MyCustomTrait`, formatted for use with the Home APIs. Once imported into your project, they can be used as described in the "Use the package" section. --- # Source: https://developers.home.google.com/apis/android/automation # Automation API on Android Overview Automations, previously known as Routines in the Google Home app (GHA) and the web script editor, are now available via the Home APIs for Android. They use the same core concepts but offer enhanced features: * Access to all Matter standard and smart home device traits presented in the Home APIs. * Support for sequential, parallel, and select execution flows. Automations are written using **Automation DSL**, a domain-specific language for Kotlin. **Note:** * **Trait Support:** Support may be limited to specific attributes, events, and commands for a given trait. See [Automation API trait support on Android](/apis/android/automation/supported-traits) for a complete list. * **Initialization:** All traits and types used with the Device, Structure, or Automation APIs must be registered at initialization. See [Initialize the home on Android](/apis/android/initialize). * **Permissions:** If a user revokes full permissions, all automations will stop working without notifying the developer. Revoking access to specific devices will cause associated starters, conditions, and actions to fail. ## Developer Journey Integrating the Automation API follows the integration of the Structure and Device APIs. 1. Plan and define the automation using Automation DSL. 2. Embed the definition in a Kotlin Android app. 3. The app presents automations to the user based on device info (traits, attributes, etc.) gathered from the Discovery API or Device API. * The **Discovery API** is optimized for generating customized draft automations. * The **Device API** provides similar data but is less optimized for this use case. See [Compare the Device API and Discovery API](/apis/automation/discovery#compare_the_device_api_and_discovery_api). 4. The app creates the automation instance, keyed to the selected structure. 5. The automation is now available in the user's structure and can be managed (executed, deleted) using Structure API methods. Your app can offer predefined automations, customizable templates, or a full editor for users to build complex automations. Each time a user sets up an automation, a new instance is created. ## Resource Limits The following limits apply to automations in the Home APIs and are subject to change. | Metric | Limit | | --- | --- | | Max automations per structure | 64 | | Max nodes per automation | 128 | | Max expression nodes per automation | 64 | | Max automation instances per structure | 1024 | | Max automation instances per developer per structure | 64 | | Max executions per structure per day | 1024 | | Max executions per developer per structure per day | 128 | --- # Source: https://developers.home.google.com/apis/android/automation/design # Design an Automation on Android **Important Considerations:** * All household members can see when automations run. * Automations are for convenience, not for safety or security-critical use cases. Do not create automations where failure could result in injury or harm. * Functionality depends on a working internet connection, Wi-Fi, and service availability from both Google and third-party device manufacturers. * Google is not responsible for any harm or losses from failed automations. ## Design Parameters Before building an automation, determine the following: * **Suggestion Context:** The circumstances under which the automation should be suggested to the user (e.g., after adding three new lights). * **Required Device Types:** The specific devices needed (e.g., `OnOffLightDevice`, `DimmableLightDevice`). * **Required Traits & Commands:** The necessary traits, attributes, and commands, ensuring they are [supported by the Automation API](/apis/android/automation/supported-traits). * **Starters:** The traits that will activate the automation. * **Conditions & Actions:** Additional conditions that determine if the automation should run and which actions to perform. * **Execution Flow:** Whether the automation should execute sequentially or in parallel, and if multiple logic paths are needed. **Note:** It's helpful to diagram the automation's flow. The automation you build is a "template" populated with the user's specific structures and devices when they adopt it. ## Automation Examples See the [Build an automation](/apis/android/automation/build#code_examples) page for code examples. ### Simple Automation: Raise Blinds at 8:00 AM 1. **Gather Devices:** Use the Discovery API to get a list of `WindowCoveringDevice` devices. 2. **Verify Address:** Ensure the user's structure has a street address in the Google Home app for time zone accuracy. If not, notify the user and halt. 3. **Define Automation:** * **Starter:** Time is 8:00 AM. * **Action:** For each blind, call the `WindowCovering` trait's `upOrOpen` command. ### Complex Automation: Blink Lights on Motion 1. **Gather Devices:** Use the Discovery API to get a list of light devices (e.g., `OnOffLightDevice`, `ColorTemperatureLightDevice`). 2. **User Selection:** Allow the user to select which lights should blink. 3. **Define Automation:** * **Starter:** Monitor `AreaPresenceState` for someone arriving or leaving. * **Condition:** If `presenceState` indicates the structure is occupied. * **Action:** Blink the selected lights. ### Generic Automation: User-Guided Creation This automation guides a user through creating a custom automation using any of their devices. 1. The user selects a structure. 2. The app displays all rooms and devices, allowing the user to see available starters and commands for each. 3. The user assembles the automation by choosing devices, starters, and commands. 4. The app generates and saves the automation to the chosen structure. This requires data from several Home APIs: | API | Information Provided | | :--- | :--- | | **Structure API** | Available structures and the rooms within them. | | **Device API** | Devices within a chosen structure and their location (room). | | **Discovery API** | Supported device traits, available starters/commands, and constraints on command parameters. | --- # Source: https://developers.home.google.com/apis/android/automation/build # Build an Automation on Android Automation APIs are accessed via the Home APIs for Android. You must first get user permission for a `Structure` before using them. Once permissions are granted, import the necessary packages: ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.Id import com.google.home.Structure import com.google.home.automation.* // ... and other specific packages as needed ``` A `Structure` contains the [`HasAutomations`](/reference/kotlin/com/google/home/automation/HasAutomations) interface with these methods: | API | Description | | :--- | :--- | | `automations()` | Lists all automations belonging to the structure that were created via the Home APIs. | | `createAutomation(automation)` | Creates an automation instance for a structure. | | `deleteAutomation(automationId)` | Deletes an automation instance by its ID. | > **Caution:** Code examples may be implemented differently than in sample apps to illustrate basic API calls. ## Create an Automation First, get the structure and device(s): ```kotlin val structure = homeManager.structures().list().single() val device = homeManager.devices().get(Id("myDevice"))!! ``` Define the automation's logic using the Automation DSL. An automation is represented by the `Automation` interface, which has properties for metadata (name, description), flags (`isActive`), and the automation logic graph (`automationGraph`). The `DraftAutomation` interface is used for building and creating automations. Here's an automation that turns `device2` on when `device1` is turned on: ```kotlin val automation: DraftAutomation = automation { name = "MyFirstAutomation" description = "Turn on a device when another device is turned on." // isActive defaults to true sequential { val starterNode = starter<_>(device1, OnOffLightDevice, trait=OnOff) condition { expression = starterNode.onOff equals true } action(device2, OnOffLightDevice) { command(OnOff.on()) } } } // Pass the DraftAutomation to create it val createdAutomation = structure.createAutomation(automation) ``` ### Validation Errors If creation fails validation, a warning or error message will describe the issue. See [`ValidationIssueType`](/reference/kotlin/com/google/home/automation/ValidationIssueType) for details. ## Code Examples ### Simple Automation Raise the blinds at 8:00 AM daily. ```kotlin // Check if scheduling is supported and blinds exist val allCandidates = structure.allCandidates().first() val isSchedulingSupported = allCandidates.any { it is EventCandidate && it.eventFactory == Time.ScheduledTimeEvent && it.unsupportedReasons.isEmpty() } val blinds = allCandidates .filter { it is CommandCandidate && it.commandDescriptor == WindowCoveringTrait.UpOrOpenCommand } .map { it.entity }.filterIsInstance().filter { it.has(WindowCoveringDevice) } if (isSchedulingSupported && blinds.isNotEmpty()) { val automation: DraftAutomation = automation { name = "Day time open blinds" description = "Open all blinds at 8AM everyday" sequential { // At 8:00am local time... starter(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(8, 0, 0, 0))) } // ...open all the blinds parallel { for (blind in blinds) { action(blind, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } } } } } val createdAutomation = structure.createAutomation(automation) } ``` ### Complex Automation Blink lights when motion is detected. ```kotlin // Get available lights and let user select them val availableLights = ... val selectedLights = ... // user selects one or more lights automation { isActive = true sequential { // If the presence state changes... val starterNode = starter<_>(structure, AreaPresenceState) // ...and if the area is occupied... condition { expression = starterNode.presenceState equals PresenceState.PresenceStateOccupied } // "blink" the light(s) by toggling them with delays parallel { for(light in selectedLights) { action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(1)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(1)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(1)) action(light, OnOffLightDevice) { command(OnOff.toggle())} } } } } ``` ## Dynamically Select Devices with Entity Filters Entity filters allow automations to select devices at runtime based on criteria like device type or room. To use them, call `atExecutionTime()` on a `Structure` or `Room`, then call [`getDevicesOfType()`](/reference/kotlin/com/google/home/automation/GetDevicesOfType). **Example:** Trigger an automation when *any* `OnOffLightDevice` is used. ```kotlin val starter = starter( entityExpression = structure.atExecutionTime().getDevicesOfType(OnOffLightDevice), trait = OnOff, ) ``` **Example:** Turn off all lights except the hall light when any light is turned off. ```kotlin automation { sequential { // If any light is turned on or off val starter = starter( entityExpression = structure.atExecutionTime().getDevicesOfType(OnOffLightDevice), trait = OnOff, ) // Check if the triggering light was turned off condition { expression = starter.onOff equals false } // Turn off all lights except the hall light action( entityExpression = structure.atExecutionTime().getDevicesOfType(OnOffLightDevice) .filter { it notEquals entity(hallwayLight, OnOffLightDevice) } ) { command(OnOff.on()) } } } ``` **Runtime Behavior:** | Scenario | Result | | :--- | :--- | | No devices meet criteria in a starter. | The automation doesn't trigger. | | No devices meet criteria in a state reader. | The automation starts but does nothing. | | No devices meet criteria in an action. | The action does nothing. | ## Execute and Stop an Automation * **Execute**: Run an automation with `createdAutomation.execute()`. If the automation has a [manual starter](/apis/android/automation/dsl/basic#manual_starter), execution begins there. Otherwise, it starts after the first starter node. * **Stop**: Stop a running automation with `createdAutomation.stop()`. Both methods may throw a `HomeException` on failure. See [Error handling](/apis/android/error-handling). ## Manage Automations ### List Automations for a Structure Collect a `Flow` of automations from a structure. ```kotlin structure.automations().collect { automationsList -> for (automation in automationsList) { println("${automation.id}: ${automation.name}") } } ``` ### Get an Automation by ID Filter the list of automations by ID. ```kotlin val automation = structure.automations().mapNotNull { it.firstOrNull { automation -> automation.id == Id("automation-id") } }.firstOrNull() ``` ### Get an Automation by Name Filter the list by name. ```kotlin val automation = structure.automations().filter { it.name.equals("Sunset Blinds") } ``` ### Get All Automations for a Device Scan each automation's graph to find nodes that reference a specific device ID. ```kotlin fun collectDescendants(node: Node): List { val descendants: MutableList = mutableListOf(node) val children: List = when (node) { is SequentialFlow -> node.nodes is ParallelFlow -> node.nodes is SelectFlow -> node.nodes else -> emptyList() } for (c in children) { descendants += collectDescendants(c) } return descendants } val myDeviceId = "device@452f78ce8-0143-84a-7e32-1d99ab54c83a" val automationsForDevice = structure.automations().first().filter { automation -> collectDescendants(automation.automationGraph!!).any { node -> when (node) { is Starter -> node.entity.id.id == myDeviceId is StateReader -> node.entity.id.id == myDeviceId is Action -> node.entity.id.id == myDeviceId else -> false } } } ``` > **Note:** `structure.automations()` only lists automations created by your app. ## Update an Automation Update an automation's metadata using its [`update()`](/reference/kotlin/com/google/home/Updatable#update(kotlin.method1,kotlin.method1)) method. ```kotlin automation.update { this.name = "Flashing lights 2" } ``` To change an automation's logic, you must replace the entire `automationGraph`. Per-node editing is not supported. ```kotlin automation.update { this.automationGraph = sequential { // ... new automation logic ... action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("laundry is done")) } } } ``` > **Key Point:** Updating an automation creates a new, immutable instance and overwrites the original. Avoid maintaining references to old automation instances; always get the latest from the `structure.automations()` collection. ## Delete an Automation Delete an automation by its ID using the structure's [`deleteAutomation()`](/reference/kotlin/com/google/home/automation/HasAutomations#deleteAutomation(com.google.home.Id)) method. ```kotlin structure.deleteAutomation(automation.id) ``` This may throw a `HomeException` on failure. ## Impact of Device Deletion If a device used in an automation is deleted, the automation will be affected. It may fail to trigger (if the device was in a starter) or fail to execute actions involving that device. --- # Source: https://developers.home.google.com/apis/android/automation/discovery # Android Device Discovery API The Discovery API for Android allows apps to discover devices, traits, commands, attributes, events, and their valid value ranges within a user's home structure to create automations. It automatically ignores devices and traits that are unsupported by the Automation API or not registered in the `FactoryRegistry`. ### Warnings * **State Reporting:** Not all devices reliably report state changes. The API filters some known problematic devices, but it is not infallible. Devices that don't report state changes reliably should not be used as automation starters. * **Performance:** API calls can be resource-intensive and latent. Avoid impacting UI responsiveness. * **Transaction Limits:** * Home APIs < 1.0.1 & Play Services <= 25.02.34: `android.os.TransactionTooLargeException` may occur with 50 or more devices. * Home APIs >= 1.1.0 & Play Services >= 25.03.32: May return no candidates with more than 200 devices. ## Using the API The core of the API is the `HasCandidates` interface, which is the root for `Structure`, `Room`, and `HomeDevice`. * **Methods:** * `candidates()`: Returns a `Flow` with a one-time snapshot of automation candidates for the entity. * `allCandidates()`: Returns candidates for the entity and all its children (not supported by `Room`). * **Data Freshness:** To get the latest list, you must call `candidates()` or `allCandidates()` again. Calling more than once per minute returns cached data. * **Candidate Types:** The methods return a `NodeCandidate`, which is the root for interfaces like `ActionCandidate`, `StarterCandidate`, `StateReaderCandidate`, and classes like `CommandCandidate`, `EventCandidate`, and `TraitAttributesCandidate`. ## Automation Candidate Examples ### Example 1: Timed Automation (Close Blinds) This example finds an event candidate for a scheduled time and a command candidate to close window coverings, then creates an automation. ```kotlin import com.google.home.Structure import com.google.home.automation.CommandCandidate import com.google.home.automation.EventCandidate import com.google.home.automation.Automation import com.google.home.automation.DraftAutomation import com.google.home.platform.Time import java.time.LocalTime import com.google.home.matter.standard.WindowCoveringTrait import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking fun createAutomationWithDiscoveryApiTimeStarter( structureName: String, scheduledTimeInSecond: Int, ): String = runBlocking { val structure = homeClient.structures().findStructureByName(structureName) val clockTimeStarter = structure.allCandidates().first().firstOrNull { it is EventCandidate && it.eventFactory == Time.ScheduledTimeEvent } as? EventCandidate val downOrCloseCommand = structure.allCandidates().first().firstOrNull { it is CommandCandidate && it.commandDescriptor == WindowCoveringTrait.DownOrCloseCommand } as? CommandCandidate // prompt user to select the WindowCoveringDevice val blinds = ... if (clockTimeStarter != null && downOrCloseCommand != null && blinds != null) { val draftAutomation: DraftAutomation = automation { name = "" description = "" isActive = true sequential { starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.ofSecondOfDay(scheduledTimeInSecond.toLong()))) } action(blinds, WindowCoveringDevice) { command(WindowCoveringTrait.downOrClose()) } } } val automation = structure.createAutomation(draftAutomation) return@runBlocking automation.id.id } else { // The automation cannot be created } } ``` ### Example 2: State-Based Automation (Dim Light) This example creates an automation to set a light's brightness level when it is turned on. ```kotlin import com.google.home.Structure import com.google.home.automation.CommandCandidate import com.google.home.automation.TraitAttributesCandidate import com.google.home.automation.Automation import com.google.home.automation.DraftAutomation import com.google.home.matter.standard.LevelControl import com.google.home.matter.standard.LevelControlTrait.MoveToLevelCommand import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking import com.google.home.automation.equals fun createAutomationWithDiscoveryApiDimLight(structureName: String): String = runBlocking { val structure: Structure = homeClient.structures().findStructureByName(structureName) val allCandidates = structure.allCandidates().first() val dimmableLightDevice = structure.devices().list().first { it.has(OnOff) && it.has(LevelControl) } val starterCandidate = allCandidates.filterIsInstance() .firstOrNull { it.entity == dimmableLightDevice && it.trait == OnOff } val actionCandidate = allCandidates.filterIsInstance() .firstOrNull { it.entity == dimmableLightDevice && it.commandDescriptor == MoveToLevelCommand } if (starterCandidate != null && actionCandidate != null) { val draftAutomation: DraftAutomation = automation { sequential { val starter = starter<_>(dimmableLightDevice, OnOffLightDevice, OnOff) condition { expression = starter.onOff equals true } action(dimmableLightDevice, DimmableLightDevice) { mapOf(MoveToLevelCommand.Request.CommandFields.level to 55u.toUByte()) } } } val automation = structure.createAutomation(draftAutomation) return@runBlocking automation.id.id } else { // The automation cannot be created } } ``` ## Verifying Attribute Capabilities Not all trait attributes can be used as a starter or be modified. To check an attribute's capabilities: 1. Get the `TraitAttributesCandidate` for the desired trait. 2. Access its `fieldDetailsMap()` to get a map of `AttributeDetails` instances. 3. Check the properties of the specific `AttributeDetails` instance: * `isSubscribable()`: Determines if the attribute can be used as a starter. * `isModifiable()`: Determines if the attribute can be updated. ## Checking for Prerequisites The API reports missing prerequisites via the `NodeCandidate.unsupportedReasons()` attribute, which contains `UnsupportedCandidateReason` objects. * **Example Reasons:** * `MissingStructureAddressSetup`: Required for the `Time` trait. Prompt the user to set the address in the Google Home app (GHA). * `MissingPresenceSensingSetup`: Required for `AreaPresenceState` and `AreaAttendanceState` traits. * `MissingSubscription`: A [Nest Aware](https://store.google.com/product/nest_aware) subscription is required for the `ObjectDetection` trait. ### Handling Missing Prerequisites ```kotlin val structure = homeManager.structures().list().single() val allCandidates = structure.allCandidates().list().single() val scheduledStarterCandidate = allCandidates.first { it is EventCandidate && it.eventFactory == ScheduledTimeEvent } if (scheduledStarterCandidate.unsupportedReasons.any { it is MissingStructureAddressSetup }) { showToast("No Structure Address setup. Redirecting to GHA to set up an address.") launchChangeAddress(...) } ``` ## Validating Parameters with Constraints The API provides allowed values for attributes and parameters using `Constraint` instances, which helps validate user input. ### Constraint Types | Constraint class | Properties representing accepted values | | :--- | :--- | | `BitmapConstraint` | `combinedBits` | | `BooleanConstraint` | (none) | | `ByteConstraint` | `maxLength`, `minLength` | | `EnumConstraint` | `allowedSet` | | `NumberRangeConstraint` | `lowerBound`, `upperBound`, `step`, `unit` | | `NumberSetConstraint` | `allowedSet`, `unit` | | `StringConstraint` | `allowedSet`, `disallowedSet`, `isCaseSensitive`, `maxLength`, `minLength`, `regex` | | `StructConstraint` | `fieldConstraints` | | `ListConstraint` | `elementConstraint` | ### Using Constraints This example checks if a value for a `LevelControl` attribute is within the bounds returned by the API. ```kotlin import com.google.home.automation.CommandCandidate import com.google.home.matter.standard.LevelControlTrait import kotlinx.coroutines.flow.first // Find the CommandCandidate for the LevelControl trait's MoveToLevel command. val levelCommand = structure.allCandidates().first().firstOrNull { candidate -> candidate is CommandCandidate && candidate.command == LevelControlTrait.MoveToLevelCommand } as? CommandCandidate var levelConstraint: NumberRangeConstraint? = null // Retrieve the Constraint associated with the level parameter. if (levelCommand != null) { levelConstraint = levelCommand.fieldDetailsMap[ LevelControlTrait.MoveToLevelCommand.Request.CommandFields.level ]!!.constraint as? NumberRangeConstraint } // Test the value against the Constraint if (levelConstraint != null && value in levelConstraint.lowerBound..levelConstraint.upperBound) { // ok to use the value } ``` ## Discovery API vs. Device API While the Device API can also be used for discovery, it has limitations compared to the Discovery API. ### Device API Capabilities * Discover primary device types: `DeviceType.Metadata.isPrimaryType()` * Check for trait support on a device: `HasTraits.has()` * Check for attribute/command support on a trait: `supports()` ### Discovery API Advantages * **Automatic Filtering:** Filters out traits not supported by the Automation API. * **Value Constraints:** Provides valid value ranges for attributes and parameters, enabling input validation. --- # Source: https://developers.home.google.com/apis/android/automation/examples # Example Automations on Android These examples demonstrate various tasks that can be automated using the Automation API. For more details, see the [Android DSL Guide](/apis/android/automation/dsl/basic). > **Experimental:** These examples are provided as a starting point. Alterations may be required for them to work. > > **Important:** All household members can see when these automations run. Automations are for convenience only, not for safety- or security-critical use cases. Do not create automations that could result in injury or harm if they fail. Automations depend on working internet, Wi-Fi, and service availability from Google and third-party device manufacturers. Google is not responsible for any harm or losses incurred as a result of failed automations. ### Turn on a device when another device is turned on or off ```kotlin import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.OnOffLightDevice automation { sequential { val starterNode = starter<_>(device1, OnOffLightDevice, OnOff) val device2State = stateReader<_>(device2, OnOffLightDevice, OnOff) condition { // Only send the command if device2 is off expression = device2State.onOff equals false } // turn on device 2 action(device2, OnOffLightDevice) { command(OnOff.on()) } } } ``` ### Close the blind if it's too bright ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.automation.and import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.greaterThan import com.google.home.matter.standard.IlluminanceMeasurement import com.google.home.matter.standard.IlluminanceMeasurement.Companion.measuredValue import com.google.home.matter.standard.LightSensorDevice import com.google.home.matter.standard.WindowCovering import com.google.home.matter.standard.WindowCovering.Companion.currentPositionLift import com.google.home.matter.standard.WindowCoveringDevice automation { sequential { val starterNode = starter<_>(device1, LightSensorDevice, IlluminanceMeasurement) val blindsPosition = stateReader<_>(blinds, WindowCoveringDevice, WindowCovering) condition { // only send the command if the blinds are open (blindsPosition.currentPositionLift greaterThan 0u) and // and it's brighter than a certain threshold value (starterNode.measuredValue greaterThan 10u) } // close the blind action(blinds, WindowCoveringDevice) { command(WindowCovering.downOrClose()) } } } ``` ### Turn on the fan when the temperature surpasses a threshold ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.Action import com.google.home.automation.And import com.google.home.automation.Automation import com.google.home.automation.Condition import com.google.home.automation.Equals import com.google.home.automation.Node import com.google.home.automation.SequentialFlow import com.google.home.automation.Starter import com.google.home.automation.StateReader import com.google.home.matter.standard.FanDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOffTrait.Attributes.onOff import com.google.home.matter.standard.TemperatureMeasurement import com.google.home.matter.standard.TemperatureMeasurement.measuredValue import com.google.home.matter.standard.TemperatureSensorDevice automation { sequential { val starterNode = starter<_>(thermometer, TemperatureSensorDevice, TemperatureMeasurement) val fanStateReaderNode = stateReader<_>(fan, FanDevice, OnOff) condition { // only send the command if the temperature is above 78F val expr1 = starterNode.measuredValue greaterThan 78 // and the fan is off val expr2 = fanStateReaderNode.onOff equals false expression = expr1 and expr2 } // turn on the fan action(fan, FanDevice) { command(OnOff.on()) } } } ``` ### Alert when motion is detected during summer vacation See [Delays](/apis/android/automation/dsl/complex#delays) and [Trigger suppression](/apis/android/automation/dsl/complex#trigger_suppression) for more information. ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.automation.and import com.google.home.automation.automation import com.google.home.automation.condition import com.google.home.automation.equals import com.google.home.automation.greaterThan import com.google.home.automation.starter import com.google.home.automation.stateReader import com.google.home.google.AssistantBroadcast import com.google.home.google.MotionDetection import com.google.home.google.MotionDetection.Companion.motionDetectionEventInProgress import com.google.home.matter.standard.OccupancySensorDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.OnOffLightDevice import com.google.home.matter.standard.SpeakerDevice import java.time.Duration automation { sequential { val starterNode = starter<_>(sensor, OccupancySensorDevice, MotionDetection) condition { // only proceed if there is currently motion val expr1 = starterNode.motionDetectionEventInProgress // and it is during our summer vacation val expr2 = time.currentDate.monthDay.between( MonthDay.of(Month.JULY, 15), MonthDay.of(Month.AUGUST, 1), ) expression = expr1 and expr2 } // ignore the starter for one minute after it was last triggered suppressFor(Duration.ofMinutes(1)) // make three announcements three seconds apart action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("Intruder detected!")) } delayFor(Duration.ofSeconds(3)) action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("Intruder detected!")) } delayFor(Duration.ofSeconds(3)) action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("Intruder detected!")) } // flash lights every two seconds action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(2)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(2)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(2)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(2)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(2)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } } } ``` ### Open the blinds 15 minutes before sunrise ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.Action import com.google.home.automation.and import com.google.home.automation.automation import com.google.home.automation.condition import com.google.home.automation.equals import com.google.home.automation.greaterThan import com.google.home.automation.parallel import com.google.home.automation.starter import com.google.home.automation.stateReader import com.google.home.google.Time import com.google.home.google.Time.Companion.sunriseTime import com.google.home.google.TimeTrait.SolarTimeStruct import com.google.home.google.TimeTrait.SolarTimeType import com.google.home.matter.standard.WindowCovering import com.google.home.matter.standard.WindowCovering.Companion.upOrOpen import com.google.home.matter.standard.WindowCoveringDevice import java.time.Duration automation { sequential { // 15 minutes before sunrise val unused = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.solarTime( SolarTimeStruct(SolarTimeType.Sunrise, java.time.Duration.ofMinutes(-15)))) } } sequential { manualStarter() } // simultaneously open the five blinds parallel { action(blind1, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind2, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind3, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind4, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind5, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } } } ``` ### Open the blinds at 7:00am, except if it's too bright and/or too hot See [Trigger suppression](/apis/android/automation/dsl/complex#trigger_suppression) for more information. > **Note:** This example requires that the structure has been assigned an address using the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ```kotlin import com.google.home.Home import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.greaterThan import com.google.home.automation.lessThanOrEquals import com.google.home.automation.notEquals import com.google.home.automation.or import com.google.home.automation.parallel import com.google.home.automation.select import com.google.home.automation.sequential import com.google.home.automation.size import com.google.home.automation.starter import com.google.home.automation.stateReader import com.google.home.google.Time import com.google.home.matter.standard.IlluminanceMeasurement import com.google.home.matter.standard.IlluminanceMeasurement.Companion.measuredValue import com.google.home.matter.standard.LightSensorDevice import com.google.home.matter.standard.TemperatureMeasurement import com.google.home.matter.standard.TemperatureMeasurement.Companion.measuredValue import com.google.home.matter.standard.TemperatureSensorDevice import com.google.home.matter.standard.WindowCovering import com.google.home.matter.standard.WindowCovering.Companion.upOrOpen import com.google.home.matter.standard.WindowCoveringDevice import java.time.Duration import java.time.LocalTime automation { sequential { select { sequential { // run the automation daily at 7am val earlyMorning = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(7, 0, 0, 0))) } val temperature = starter<_>(device, TemperatureSensorDevice, TemperatureMeasurement) val brightness = starter<_>(device1, LightSensorDevice, IlluminanceMeasurement) // don't run more often than every 15 minutes suppressFor(Duration.ofMinutes(15)) condition { // temperature is below 32C/90F val expr1 = (temperature.measuredValue lessThanOrEquals 32) // too bright val expr2 = (brightness.measuredValue greaterThan 60u) expression = expr1 or expr2 } } sequential { manualStarter() } } // simultaneously open the five blinds parallel { action(blind1, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind2, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind3, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind4, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } action(blind5, WindowCoveringDevice) { command(WindowCovering.upOrOpen()) } } } } ``` ### If the light is on, turn off the fan and change the speed setting ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.matter.standard.DimmableLightDevice import com.google.home.matter.standard.FanControl import com.google.home.matter.standard.FanControl.Companion.setFanMode import com.google.home.matter.standard.FanControl.Companion.setPercentSetting import com.google.home.matter.standard.FanControlTrait import com.google.home.matter.standard.FanControlTrait.FanModeEnum import com.google.home.matter.standard.FanDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff automation { name = "Turn off the fan when the light is turned on." description = "If light is on, turn off the fan and change the speed setting." isActive = true sequential { // When the light's OnOff state changes... val starterNode = starter<_>(device, DimmableLightDevice, OnOff) // ...and if the light is turned on... condition() { expression = starterNode.onOff equals true } // ...turn off the fan and change the speed. action(device, FanDevice) { update(FanControl) { setFanMode(FanModeEnum.Off) setPercentSetting(20u) } } } } ``` ### Turn on the light if the area is occupied ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.google.AreaPresenceState import com.google.home.google.AreaPresenceState.Companion.presenceState import com.google.home.google.AreaPresenceStateTrait.PresenceState import com.google.home.matter.standard.DimmableLightDevice import com.google.home.matter.standard.OnOff automation { description = "If the area is occupied, turn the light on." isActive = true sequential { // If the presence state changes... val starterNode = starter<_>(structure, AreaPresenceState) // ...and if the area is occupied... condition() { expression = starterNode.presenceState equals PresenceState.PresenceStateOccupied } // ...turn the light on. action(device, DimmableLightDevice) { command(OnOff.on()) } } } ``` ### Turn off the light if no one is home ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.and import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.stateReader import com.google.home.google.AreaAttendanceState import com.google.home.google.AreaAttendanceState.Companion.attendanceState import com.google.home.google.AreaAttendanceStateTrait.AttendanceState import com.google.home.matter.standard.DimmableLightDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff automation { sequential { val starterNode = starter<_>(device, DimmableLightDevice, OnOff) val stateReaderNode = stateReader<_>(structure, AreaAttendanceState) condition() { // If the light is turned on and no one from the household is present val expr1 = starterNode.onOff equals true val expr2 = stateReaderNode.attendanceState equals AttendanceState.AttendanceStateNoHouseholdMembers expression = expr1 and expr2 } // turn the light off action(device, DimmableLightDevice) { command(OnOff.off()) } } } ``` ### Send a notification at a specified time > **Note:** This example requires that the structure has been assigned an address using the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.starter import com.google.home.google.AreaAttendanceState import com.google.home.google.Notification import com.google.home.google.Time import java.time.LocalTime automation { sequential { // If the time is 1:01:01:001 val unused = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(1, 1, 1, 1))) } action(structure) { // send a notification to the user via the Google Home App command(Notification.sendNotifications("title", { body = "body" })) } } } ``` ### Broadcast a message at a specified time if the light is on > **Note:** This example requires that the structure has been assigned an address using the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.google.AssistantBroadcast import com.google.home.google.Time import com.google.home.matter.standard.DimmableLightDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import java.time.LocalTime automation { sequential { // If the time is 12:00... val unused = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(12, 0, 0, 0))) } val stateReaderNode = stateReader<_>(device, DimmableLightDevice, OnOff) // ...and the light is on... condition() { expression = stateReaderNode.onOff equals true } // ...broadcast a message over any devices that support Google Assistant. action(structure) { command(AssistantBroadcast.broadcast("It's midday.")) } } } ``` ### Play music at a specified time when the light is on > **Note:** This example requires that the structure has been assigned an address using the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.google.AssistantFulfillment import com.google.home.google.Time import com.google.home.matter.standard.DimmableLightDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.SpeakerDevice import java.time.LocalTime automation { sequential { // When the time is 3:15pm... val unused = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(15, 15, 0, 0))) } val stateReaderNode = stateReader<_>(device, DimmableLightDevice, OnOff) // ...and the light's OnOff state is on... condition() { expression = stateReaderNode.onOff equals true } // ...tell Google Assistant to play music action(device, SpeakerDevice) { command(AssistantFulfillment.okGoogle("Play some music")) } } } ``` ### Blink the lights and announce when the oven reaches the chosen temperature This automation requires an Oven device that implements the [`RunCycle`](/cloud-to-cloud/traits/runcycle) Cloud-to-cloud trait or the Oven Cavity Operational State Matter cluster. See [Interoperability on Android](/apis/android/interoperability#oven) and [Delays](/apis/android/automation/dsl/complex#delays) for more information. ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.parallel import com.google.home.automation.starter import com.google.home.google.AssistantBroadcast import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.toggle import com.google.home.matter.standard.OnOffLightDevice import com.google.home.matter.standard.OvenCavityOperationalState import com.google.home.matter.standard.OvenCavityOperationalState.Companion.currentPhase import com.google.home.matter.standard.OvenCavityOperationalState.Companion.phaseList import com.google.home.matter.standard.OvenCavityOperationalStateTrait.OperationalStateStruct import com.google.home.matter.standard.OvenDevice import com.google.home.matter.standard.SpeakerDevice import java.time.Duration automation { name = "Oven is up-to-temperature" description = "When an oven has finished pre-heating, living room lights blink and smart speaker makes an announcement" isActive = true sequential { val starterNode = starter<_>(oven, OvenDevice, OvenCavityOperationalState /* Or OperationalState */) condition { expression = starterNode.phaseList[operationalState.currentPhase.toUInt()] equals "pre-heated" } action(speaker, SpeakerDevice) { command(AssistantBroadcast.broadcast("The oven has now reached the chosen temperature.")) } // "blink" the light by toggling them twice with a five-second pause, // then return to the original state. action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(5)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } } } ``` ### Use Google Assistant to create conditions for sleep This example is triggered by Google Assistant and uses Assistant in an action to play ocean wave sounds. The [`okGoogle`](/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.OkGoogleCommand) command is a structure-level command. See [OkGoogle permissions](/apis/permissions#okgoogle_permissions) for more details. ```kotlin import com.google.home.Home import com.google.home.HomeClient import com.google.home.HomeDevice import com.google.home.HomeManager import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.parallel import com.google.home.automation.starter import com.google.home.google.AssistantFulfillment import com.google.home.google.VoiceStarter import com.google.home.matter.standard.FanControl import com.google.home.matter.standard.FanControl.Companion.setFanMode import com.google.home.matter.standard.FanControlTrait.FanModeEnum import com.google.home.matter.standard.FanDevice import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.toggle import com.google.home.matter.standard.OnOffPluginUnitDevice import com.google.home.matter.standard.SpeakerDevice import com.google.home.matter.standard.WindowCovering import com.google.home.matter.standard.WindowCoveringDevice automation { name = "Lull to sleep" description = "If user says \"Hey Google, I can't sleep\", play ocean wave sounds, turn on the fan, turn on the plug, and roll down the blinds" isActive = true sequential { val unused = starter<_>(structure, VoiceStarter.OkGoogleEvent) { parameter(VoiceStarter.OkGoogleEvent.query("I can't sleep")) } parallel { // tell the speaker to play ocean wave sounds action(speaker, SpeakerDevice) { command(AssistantFulfillment.okGoogle("Play ocean wave sounds")) } // turn on the fan action(fan, FanDevice) { update(FanControl) { setFanMode(FanModeEnum.On) } } // turn on the outlet action(plug, OnOffPluginUnitDevice) { command(OnOff.on()) } // close the blinds action(blinds, WindowCoveringDevice) { command(WindowCovering.downOrClose()) } } } } ``` ### Turn Chromecast on or off when light turns on ```kotlin import com.google.home.HomeDevice import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.google.ExtendedApplicationLauncher import com.google.home.google.ExtendedChannel import com.google.home.google.ExtendedLevelControl import com.google.home.google.ExtendedMediaInput import com.google.home.google.ExtendedMediaPlayback import com.google.home.google.GoogleTVDevice import com.google.home.google.MediaActivityState import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.on import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.OnOffLightDevice automation { name = "Light Activated Chromecast" description = "When light turns on, turn on/off the Chromecast." isActive = true sequential { select { // Create a starter node for each light device selected sequential { val starterNode = starter<_>(lightDevice, OnOffLightDevice, OnOff) // ...and if the light is turned on... condition { expression = starterNode.onOff equals true } } manualStarter() } parallel { // ...turn the Chromecast on or off. action(chromecastDevice, GoogleTVDevice) { command(OnOff.on()) } } } } ``` ### Stop Chromecast and broadcast a message when light turns on ```kotlin import com.google.home.HomeDevice import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.google.AssistantBroadcast import com.google.home.google.ExtendedApplicationLauncher import com.google.home.google.ExtendedChannel import com.google.home.google.ExtendedLevelControl import com.google.home.google.ExtendedMediaInput import com.google.home.google.ExtendedMediaPlayback import com.google.home.google.GoogleTVDevice import com.google.home.matter.standard.MediaPlayback import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.OnOffLightDevice automation { name = "Light Activated Chromecast Media Control" description = "When the light turns on, stop the media on Chromecast." isActive = true sequential { select { // Create a starter node for each light device selected sequential { val starterNode = starter<_>(lightDevice, OnOffLightDevice, OnOff) condition { // ...and the light is on... expression = starterNode.onOff equals true } } manualStarter() } val message = "Light turned on, stopping the media." parallel { // ...stop the media on the Chromecast... action(chromecastDevice, GoogleTVDevice) { command(MediaPlayback.stop()) } // ...broadcast message over any devices that support Google Assistant. action(speakerDevice, SpeakerDevice) { command(AssistantBroadcast.broadcast(message)) } } } } ``` ### Turn on lights when Chromecast turns on ```kotlin import com.google.home.HomeDevice import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.google.GoogleTVDevice import com.google.home.matter.standard.MediaPlayback import com.google.home.matter.standard.OnOff import com.google.home.matter.standard.OnOff.Companion.onOff import com.google.home.matter.standard.OnOffLightDevice automation { name = "Chromecast Activated Lights" description = "When chromecast turns on, turn on a set of lights." isActive = true sequential { select { // Create a starter node for each Chromecast device selected... sequential { val starterNode = starter<_>(chromecastDevice, GoogleTVDevice, OnOff) condition { // ...and when the Chromecast is turned on... expression = starterNode.onOff equals true } } manualStarter() } parallel { // ...turn the lights on. action(lightDevice, OnOffLightDevice) { command(OnOff.on()) } } } } ``` ### Set temperature at 8:00am and 10:00pm in July and August > **Note:** This example requires that the structure has been assigned an address using the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ```kotlin import com.google.home.HomeDevice import com.google.home.Id import com.google.home.Structure import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.equals import com.google.home.automation.starter import com.google.home.matter.standard.TemperatureControl import com.google.home.matter.standard.TemperatureControlledCabinetDevice import com.google.home.google.Time automation { sequential { val starter = starter<_>(structure, event = Time.RecurringClockTimeScheduledEvent) { parameter(Time.RecurringClockTimeScheduledEvent.cronExpression("0 0 08,22 ? 7,8 * *")) } // Set the temperature to 5C action(tempControlDevice, TemperatureControlledCabinetDevice) { command(TemperatureControl.setTemperature(5)) } assertThat(starter).isNotNull() } } ``` --- # Source: https://developers.home.google.com/apis/android/automation/supported-traits # Automation API Trait Support on Android While the Automation API for Android supports most traits, some attributes, events, and commands may have limited support. ### General Rules & Limitations * **Registration:** All traits and types must be registered at initialization. See [Create a Home instance](/apis/android/initialize#create_a_home_instance). * **Usage:** Attributes can be used in starters or conditions. Commands can only be used as actions. * **Quality Thresholds:** Devices may be blocked from use due to [Report State](/cloud-to-cloud/integration/report-state) quality issues. The Discovery API automatically filters these devices out. * **Starters:** Blocked if Report State success is < **90%**. * **Actions:** Blocked if command execution success is < **95%**. * **Cloud-to-Cloud:** Devices that don't report their state cannot be used as automation triggers. * **API-Specific Traits:** Some traits, like [`AssistantBroadcast`](/reference/kotlin/com/google/home/google/AssistantBroadcast), are exclusive to the Automation API. * **`okGoogle` Command:** This is a structure-level command with specific [permission enforcement](/apis/android/permissions#okgoogle_permissions). * **Simplified Traits:** Simplified versions of some traits are available. See [Simplified traits on Android](/apis/android/automation/simplified-traits). * **Blocked Actions:** In the table below, `block` indicates a command is not supported for one or more device types. See [Blocked actions in automations on Android](/apis/android/automation/blocked-actions). ### Prerequisites * **`Time.ScheduledTimeEvent`**: The structure must have a street address set in the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). * **`AreaPresenceState` / `AreaAttendanceState`**: The user must set up presence sensing in the GHA. * **`ObjectDetection`**: Requires an active [Nest Aware](https://store.google.com/product/nest_aware) subscription. ### Supported Traits, Events, Attributes, and Commands | Trait | Trait type | Element type | Element | | --- | --- | --- | --- | | [AssistantBroadcast](/reference/kotlin/com/google/home/google/AssistantBroadcast) | google | Command | [Broadcast](/reference/kotlin/com/google/home/google/AssistantBroadcast#Broadcast) | | [AssistantFulfillment](/reference/kotlin/com/google/home/google/AssistantFulfillment) | google | Command | [OkGoogle](/reference/kotlin/com/google/home/google/AssistantFulfillment#OkGoogle) | | [Notification](/reference/kotlin/com/google/home/google/Notification) | google | Command | [SendNotifications](/reference/kotlin/com/google/home/google/Notification#SendNotifications) | | [Time](/reference/kotlin/com/google/home/google/Time) | google | Event | [ScheduledTimeEvent](/reference/kotlin/com/google/home/google/TimeTrait.ScheduledTimeEvent) | | [Time](/reference/kotlin/com/google/home/google/Time) | google | Attribute | [currentTime](/reference/kotlin/com/google/home/google/TimeTrait.Attributes#currentTime()) | | [Time](/reference/kotlin/com/google/home/google/Time) | google | Attribute | [missingStructureLocation](/reference/kotlin/com/google/home/google/TimeTrait.Attributes#missingStructureLocation()) | | [Time](/reference/kotlin/com/google/home/google/Time) | google | Attribute | [sunriseTime](/reference/kotlin/com/google/home/google/TimeTrait.Attributes#sunriseTime()) | | [Time](/reference/kotlin/com/google/home/google/Time) | google | Attribute | [sunsetTime](/reference/kotlin/com/google/home/google/TimeTrait.Attributes#sunsetTime()) | | [VoiceStarter](/reference/kotlin/com/google/home/google/VoiceStarter) | google | Event | [OkGoogleEvent](/reference/kotlin/com/google/home/google/VoiceStarterTrait.OkGoogleEvent) | | [AirQuality](/reference/kotlin/com/google/home/matter/standard/AirQuality) | matter | Attribute | [airQuality](/reference/kotlin/com/google/home/matter/standard/AirQualityTrait.Attributes#airQuality()) | | [ApplicationLauncher](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher) | matter | Command | [LaunchApp](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher.Command#LaunchApp) | | [ApplicationLauncher](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher) | matter | Command | [StopApp](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher.Command#StopApp) | | [ApplicationLauncher](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncher) | matter | Attribute | [currentApp](/reference/kotlin/com/google/home/matter/standard/ApplicationLauncherTrait.Attributes#currentApp()) | | [AudioOutput](/reference/kotlin/com/google/home/matter/standard/AudioOutput) | matter | Attribute | [currentOutput](/reference/kotlin/com/google/home/matter/standard/AudioOutputTrait.Attributes#currentOutput()) | | [BooleanState](/reference/kotlin/com/google/home/matter/standard/BooleanState) | matter | Event | [StateChange](/reference/kotlin/com/google/home/matter/standard/BooleanStateTrait.StateChange) | | [BooleanState](/reference/kotlin/com/google/home/matter/standard/BooleanState) | matter | Attribute | [stateValue](/reference/kotlin/com/google/home/matter/standard/BooleanStateTrait.Attributes#stateValue()) | | [CarbonDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurementTrait.Attributes#levelValue()) | | [CarbonDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/CarbonDioxideConcentrationMeasurementTrait.Attributes#measuredValue()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#levelValue()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [maxMeasuredValue](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#maxMeasuredValue()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#measuredValue()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [measurementUnit](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#measurementUnit()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [minMeasuredValue](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#minMeasuredValue()) | | [CarbonMonoxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurement) | matter | Attribute | [uncertainty](/reference/kotlin/com/google/home/matter/standard/CarbonMonoxideConcentrationMeasurementTrait.Attributes#uncertainty()) | | [Channel](/reference/kotlin/com/google/home/matter/standard/Channel) | matter | Command | [ChangeChannelByNumber](/reference/kotlin/com/google/home/matter/standard/Channel.Command#ChangeChannelByNumber) | | [Channel](/reference/kotlin/com/google/home/matter/standard/Channel) | matter | Command | [SkipChannel](/reference/kotlin/com/google/home/matter/standard/Channel.Command#SkipChannel) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [ColorLoopSet](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#ColorLoopSet) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveColor](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveColor) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveColorTemperature](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveColorTemperature) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveToColor](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveToColor) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveToColorTemperature](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveToColorTemperature) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveToHue](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveToHue) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveToHueAndSaturation](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveToHueAndSaturation) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [MoveToSaturation](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#MoveToSaturation) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [StepColor](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#StepColor) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Command | [StepColorTemperature](/reference/kotlin/com/google/home/matter/standard/ColorControl.Command#StepColorTemperature) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Attribute | [colorTemperatureMireds](/reference/kotlin/com/google/home/matter/standard/ColorControlTrait.Attributes#colorTemperatureMireds()) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Attribute | [currentHue](/reference/kotlin/com/google/home/matter/standard/ColorControlTrait.Attributes#currentHue()) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Attribute | [currentX](/reference/kotlin/com/google/home/matter/standard/ColorControlTrait.Attributes#currentX()) | | [ColorControl](/reference/kotlin/com/google/home/matter/standard/ColorControl) | matter | Attribute | [currentY](/reference/kotlin/com/google/home/matter/standard/ColorControlTrait.Attributes#currentY()) | | [DishwasherMode](/reference/kotlin/com/google/home/matter/standard/DishwasherMode) | matter | Command | [ChangeToMode](/reference/kotlin/com/google/home/matter/standard/DishwasherMode.Command#ChangeToMode) | | [DishwasherMode](/reference/kotlin/com/google/home/matter/standard/DishwasherMode) | matter | Attribute | [currentMode](/reference/kotlin/com/google/home/matter/standard/DishwasherModeTrait.Attributes#currentMode()) | | [DishwasherMode](/reference/kotlin/com/google/home/matter/standard/DishwasherMode) | matter | Attribute | [onMode](/reference/kotlin/com/google/home/matter/standard/DishwasherModeTrait.Attributes#onMode()) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Event | [DoorLockAlarm](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.DoorLockAlarm) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Event | [DoorStateChange](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.DoorStateChange) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Command | [LockDoor](/reference/kotlin/com/google/home/matter/standard/DoorLock.Command#LockDoor) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Event | [LockOperation](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.LockOperation) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Event | [LockOperationError](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.LockOperationError) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Command | [UnlockDoor](/reference/kotlin/com/google/home/matter/standard/DoorLock.Command#UnlockDoor) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Attribute | [doorClosedEvents](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.Attributes#doorClosedEvents()) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Attribute | [doorOpenEvents](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.Attributes#doorOpenEvents()) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Attribute | [doorState](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.Attributes#doorState()) | | [DoorLock](/reference/kotlin/com/google/home/matter/standard/DoorLock) | matter | Attribute | [lockState](/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.Attributes#lockState()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Command | [Step](/reference/kotlin/com/google/home/matter/standard/FanControl.Command#Step) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [airflowDirection](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#airflowDirection()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [fanMode](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#fanMode()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [percentCurrent](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#percentCurrent()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [percentSetting](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#percentSetting()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [speedCurrent](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#speedCurrent()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [speedSetting](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#speedSetting()) | | [FanControl](/reference/kotlin/com/google/home/matter/standard/FanControl) | matter | Attribute | [windSetting](/reference/kotlin/com/google/home/matter/standard/FanControlTrait.Attributes#windSetting()) | | [FormaldehydeConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurementTrait.Attributes#levelValue()) | | [FormaldehydeConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/FormaldehydeConcentrationMeasurementTrait.Attributes#measuredValue()) | | [IlluminanceMeasurement](/reference/kotlin/com/google/home/matter/standard/IlluminanceMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/IlluminanceMeasurementTrait.Attributes#measuredValue()) | | [LaundryWasherMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherMode) | matter | Command | [ChangeToMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherMode.Command#ChangeToMode) | | [LaundryWasherMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherMode) | matter | Attribute | [currentMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherModeTrait.Attributes#currentMode()) | | [LaundryWasherMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherMode) | matter | Attribute | [onMode](/reference/kotlin/com/google/home/matter/standard/LaundryWasherModeTrait.Attributes#onMode()) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [Move](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#Move) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [MoveToLevel](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#MoveToLevel) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [MoveToLevelWithOnOff](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#MoveToLevelWithOnOff) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [MoveWithOnOff](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#MoveWithOnOff) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [Step](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#Step) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [StepWithOnOff](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#StepWithOnOff) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [Stop](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#Stop) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Command | [StopWithOnOff](/reference/kotlin/com/google/home/matter/standard/LevelControl.Command#StopWithOnOff) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Attribute | [currentLevel](/reference/kotlin/com/google/home/matter/standard/LevelControlTrait.Attributes#currentLevel()) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Attribute | [maxLevel](/reference/kotlin/com/google/home/matter/standard/LevelControlTrait.Attributes#maxLevel()) | | [LevelControl](/reference/kotlin/com/google/home/matter/standard/LevelControl) | matter | Attribute | [startUpCurrentLevel](/reference/kotlin/com/google/home/matter/standard/LevelControlTrait.Attributes#startUpCurrentLevel()) | | [MediaInput](/reference/kotlin/com/google/home/matter/standard/MediaInput) | matter | Command | [RenameInput](/reference/kotlin/com/google/home/matter/standard/MediaInput.Command#RenameInput) | | [MediaInput](/reference/kotlin/com/google/home/matter/standard/MediaInput) | matter | Command | [SelectInput](/reference/kotlin/com/google/home/matter/standard/MediaInput.Command#SelectInput) | | [MediaInput](/reference/kotlin/com/google/home/matter/standard/MediaInput) | matter | Attribute | [currentInput](/reference/kotlin/com/google/home/matter/standard/MediaInputTrait.Attributes#currentInput()) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [FastForward](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#FastForward) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Next](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Next) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Pause](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Pause) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Play](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Play) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Previous](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Previous) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Rewind](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Rewind) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [SkipBackward](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#SkipBackward) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [SkipForward](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#SkipForward) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Event | [StateChanged](/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.StateChanged) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Command | [Stop](/reference/kotlin/com/google/home/matter/standard/MediaPlayback.Command#Stop) | | [MediaPlayback](/reference/kotlin/com/google/home/matter/standard/MediaPlayback) | matter | Attribute | [currentState](/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#currentState()) | | [ModeSelect](/reference/kotlin/com/google/home/matter/standard/ModeSelect) | matter | Command | [ChangeToMode](/reference/kotlin/com/google/home/matter/standard/ModeSelect.Command#ChangeToMode) block | | [ModeSelect](/reference/kotlin/com/google/home/matter/standard/ModeSelect) | matter | Attribute | [currentMode](/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.Attributes#currentMode()) | | [ModeSelect](/reference/kotlin/com/google/home/matter/standard/ModeSelect) | matter | Attribute | [onMode](/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.Attributes#onMode()) | | [NitrogenDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurementTrait.Attributes#levelValue()) | | [NitrogenDioxideConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/NitrogenDioxideConcentrationMeasurementTrait.Attributes#measuredValue()) | | [OccupancySensing](/reference/kotlin/com/google/home/matter/standard/OccupancySensing) | matter | Attribute | [occupancy](/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#occupancy()) | | [OnOff](/reference/kotlin/com/google/home/matter/standard/OnOff) | matter | Command | [Off](/reference/kotlin/com/google/home/matter/standard/OnOff.Command#Off) block | | [OnOff](/reference/kotlin/com/google/home/matter/standard/OnOff) | matter | Command | [On](/reference/kotlin/com/google/home/matter/standard/OnOff.Command#On) block | | [OnOff](/reference/kotlin/com/google/home/matter/standard/OnOff) | matter | Attribute | [onOff](/reference/kotlin/com/google/home/matter/standard/OnOffTrait.Attributes#onOff()) | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Event | [OperationCompletion](/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationCompletion) | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Command | [Pause](/reference/kotlin/com/google/home/matter/standard/OperationalState.Command#Pause) block | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Command | [Resume](/reference/kotlin/com/google/home/matter/standard/OperationalState.Command#Resume) block | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Command | [Start](/reference/kotlin/com/google/home/matter/standard/OperationalState.Command#Start) | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Command | [Stop](/reference/kotlin/com/google/home/matter/standard/OperationalState.Command#Stop) | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Attribute | [currentPhase](/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#currentPhase()) | | [OperationalState](/reference/kotlin/com/google/home/matter/standard/OperationalState) | matter | Attribute | [operationalState](/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#operationalState()) | | [OzoneConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurementTrait.Attributes#levelValue()) | | [OzoneConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/OzoneConcentrationMeasurementTrait.Attributes#measuredValue()) | | [Pm10ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurementTrait.Attributes#levelValue()) | | [Pm10ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/Pm10ConcentrationMeasurementTrait.Attributes#measuredValue()) | | [Pm25ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurementTrait.Attributes#levelValue()) | | [Pm25ConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/Pm25ConcentrationMeasurementTrait.Attributes#measuredValue()) | | [PowerSource](/reference/kotlin/com/google/home/matter/standard/PowerSource) | matter | Attribute | [batChargeState](/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batChargeState()) | | [PowerSource](/reference/kotlin/com/google/home/matter/standard/PowerSource) | matter | Attribute | [batChargingCurrent](/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batChargingCurrent()) | | [PowerSource](/reference/kotlin/com/google/home/matter/standard/PowerSource) | matter | Attribute | [batTimeToFullCharge](/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batTimeToFullCharge()) | | [RadonConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurementTrait.Attributes#levelValue()) | | [RadonConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/RadonConcentrationMeasurementTrait.Attributes#measuredValue()) | | [RelativeHumidityMeasurement](/reference/kotlin/com/google/home/matter/standard/RelativeHumidityMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/RelativeHumidityMeasurementTrait.Attributes#measuredValue()) | | [RvcCleanMode](/reference/kotlin/com/google/home/matter/standard/RvcCleanMode) | matter | Command | [ChangeToMode](/reference/kotlin/com/google/home/matter/standard/RvcCleanMode.Command#ChangeToMode) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Command | [GoHome](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState.Command#GoHome) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Command | [Pause](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState.Command#Pause) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Command | [Resume](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState.Command#Resume) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Attribute | [currentPhase](/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.Attributes#currentPhase()) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Attribute | [operationalError](/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.Attributes#operationalError()) | | [RvcOperationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalState) | matter | Attribute | [operationalState](/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.Attributes#operationalState()) | | [RvcRunMode](/reference/kotlin/com/google/home/matter/standard/RvcRunMode) | matter | Command | [ChangeToMode](/reference/kotlin/com/google/home/matter/standard/RvcRunMode.Command#ChangeToMode) | | [RvcRunMode](/reference/kotlin/com/google/home/matter/standard/RvcRunMode) | matter | Attribute | [currentMode](/reference/kotlin/com/google/home/matter/standard/RvcRunModeTrait.Attributes#currentMode()) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [InitialPress](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.InitialPress) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [LongPress](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.LongPress) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [LongRelease](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.LongRelease) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [MultiPressComplete](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.MultiPressComplete) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [MultiPressOngoing](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.MultiPressOngoing) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [ShortRelease](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.ShortRelease) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Event | [SwitchLatched](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.SwitchLatched) | | [Switch](/reference/kotlin/com/google/home/matter/standard/Switch) | matter | Attribute | [currentPosition](/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Attributes#currentPosition()) | | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | matter | Command | [SetTemperature](/reference/kotlin/com/google/home/matter/standard/TemperatureControl.Command#SetTemperature) block | | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | matter | Attribute | [maxTemperature](/reference/kotlin/com/google/home/matter/standard/TemperatureControlTrait.Attributes#maxTemperature()) | | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | matter | Attribute | [minTemperature](/reference/kotlin/com/google/home/matter/standard/TemperatureControlTrait.Attributes#minTemperature()) | | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | matter | Attribute | [selectedTemperatureLevel](/reference/kotlin/com/google/home/matter/standard/TemperatureControlTrait.Attributes#selectedTemperatureLevel()) | | [TemperatureControl](/reference/kotlin/com/google/home/matter/standard/TemperatureControl) | matter | Attribute | [temperatureSetpoint](/reference/kotlin/com/google/home/matter/standard/TemperatureControlTrait.Attributes#temperatureSetpoint()) | | [TemperatureMeasurement](/reference/kotlin/com/google/home/matter/standard/TemperatureMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/TemperatureMeasurementTrait.Attributes#measuredValue()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Command | [SetpointRaiseLower](/reference/kotlin/com/google/home/matter/standard/Thermostat.Command#SetpointRaiseLower) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [activePresetHandle](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#activePresetHandle()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [localTemperature](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#localTemperature()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [occupancy](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#occupancy()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [occupiedCoolingSetpoint](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#occupiedCoolingSetpoint()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [occupiedHeatingSetpoint](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#occupiedHeatingSetpoint()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [outdoorTemperature](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#outdoorTemperature()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [setpointChangeSource](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#setpointChangeSource()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [systemMode](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#systemMode()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [temperatureSetpointHold](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#temperatureSetpointHold()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [temperatureSetpointHoldDuration](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#temperatureSetpointHoldDuration()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [thermostatRunningMode](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#thermostatRunningMode()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [thermostatRunningState](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#thermostatRunningState()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [unoccupiedCoolingSetpoint](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#unoccupiedCoolingSetpoint()) | | [Thermostat](/reference/kotlin/com/google/home/matter/standard/Thermostat) | matter | Attribute | [unoccupiedHeatingSetpoint](/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.Attributes#unoccupiedHeatingSetpoint()) | | [TotalVolatileOrganicCompoundsConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurement) | matter | Attribute | [levelValue](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurementTrait.Attributes#levelValue()) | | [TotalVolatileOrganicCompoundsConcentrationMeasurement](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurement) | matter | Attribute | [measuredValue](/reference/kotlin/com/google/home/matter/standard/TotalVolatileOrganicCompoundsConcentrationMeasurementTrait.Attributes#measuredValue()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [DownOrClose](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#DownOrClose) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [GoToLiftPercentage](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#GoToLiftPercentage) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [GoToLiftValue](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#GoToLiftValue) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [GoToTiltPercentage](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#GoToTiltPercentage) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [GoToTiltValue](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#GoToTiltValue) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [StopMotion](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#StopMotion) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Command | [UpOrOpen](/reference/kotlin/com/google/home/matter/standard/WindowCovering.Command#UpOrOpen) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionLift](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionLift()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionLiftPercent100ths](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionLiftPercent100ths()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionLiftPercentage](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionLiftPercentage()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionTilt](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionTilt()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionTiltPercent100ths](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionTiltPercent100ths()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [currentPositionTiltPercentage](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#currentPositionTiltPercentage()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [targetPositionLiftPercent100ths](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#targetPositionLiftPercent100ths()) | | [WindowCovering](/reference/kotlin/com/google/home/matter/standard/WindowCovering) | matter | Attribute | [targetPositionTiltPercent100ths](/reference/kotlin/com/google/home/matter/standard/WindowCoveringTrait.Attributes#targetPositionTiltPercent100ths()) | | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | google | Command | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm.Command#ArmDisarm) block | | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | google | Event | [ArmDisarmArmState](/reference/kotlin/com/google/home/google/ArmDisarmTrait.ArmDisarmArmState) | | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | google | Attribute | [armState](/reference/kotlin/com/google/home/google/ArmDisarmTrait.Attributes#armState()) | | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | google | Attribute | [currentArmLevel](/reference/kotlin/com/google/home/google/ArmDisarmTrait.Attributes#currentArmLevel()) | | [ArmDisarm](/reference/kotlin/com/google/home/google/ArmDisarm) | google | Attribute | [isArmed](/reference/kotlin/com/google/home/google/ArmDisarmTrait.Attributes#isArmed()) | | [Dock](/reference/kotlin/com/google/home/google/Dock) | google | Command | [Dock](/reference/kotlin/com/google/home/google/Dock.Command#Dock) | | [Dock](/reference/kotlin/com/google/home/google/Dock) | google | Attribute | [isDocked](/reference/kotlin/com/google/home/google/DockTrait.Attributes#isDocked()) | | [DoorbellPress](/reference/kotlin/com/google/home/google/DoorbellPress) | google | Event | [DoorbellPressed](/reference/kotlin/com/google/home/google/DoorbellPressTrait.DoorbellPressed) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Event | [AirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.AirQuality) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Attribute | [indoorAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes#indoorAirQuality()) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Attribute | [indoorMeasuredValue](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes#indoorMeasuredValue()) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Attribute | [measuredValue](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes#measuredValue()) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Attribute | [outdoorAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes#outdoorAirQuality()) | | [ExtendedAirQuality](/reference/kotlin/com/google/home/google/ExtendedAirQuality) | google | Attribute | [outdoorMeasuredValue](/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes#outdoorMeasuredValue()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Command | [MoveToColorHSV](/reference/kotlin/com/google/home/google/ExtendedColorControl.Command#MoveToColorHSV) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Command | [MoveToColorName](/reference/kotlin/com/google/home/google/ExtendedColorControl.Command#MoveToColorName) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Command | [MoveToColorRGB](/reference/kotlin/com/google/home/google/ExtendedColorControl.Command#MoveToColorRGB) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentBlue](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentBlue()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentGreen](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentGreen()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentHue](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentHue()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentName](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentName()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentRed](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentRed()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentSaturation](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentSaturation()) | | [ExtendedColorControl](/reference/kotlin/com/google/home/google/ExtendedColorControl) | google | Attribute | [currentValue](/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes#currentValue()) | | [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl) | google | Command | [ToggleAirflowDirection](/reference/kotlin/com/google/home/google/ExtendedFanControl.Command#ToggleAirflowDirection) | | [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl) | google | Attribute | [customFanMode](/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.Attributes#customFanMode()) | | [ExtendedFanControl](/reference/kotlin/com/google/home/google/ExtendedFanControl) | google | Attribute | [customFanModes](/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.Attributes#customFanModes()) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Command | [NextInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput#NextInput) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Command | [PreviousInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput#PreviousInput) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Command | [SelectCustomInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput#SelectCustomInput) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Attribute | [currentCustomInput](/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.Attributes#currentCustomInput()) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Attribute | [customInputsList](/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.Attributes#customInputsList()) | | [ExtendedMediaInput](/reference/kotlin/com/google/home/google/ExtendedMediaInput) | google | Attribute | [customInputsOrdered](/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.Attributes#customInputsOrdered()) | | [ExtendedOperationalState](/reference/kotlin/com/google/home/google/ExtendedOperationalState) | google | Event | [PauseUnpauseFollowUp](/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.PauseUnpauseFollowUp) | | [ExtendedOperationalState](/reference/kotlin/com/google/home/google/ExtendedOperationalState) | google | Event | [StartStopFollowUp](/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StartStopFollowUp) | | [ExtendedPowerSource](/reference/kotlin/com/google/home/google/ExtendedPowerSource) | google | Command | [StartCharging](/reference/kotlin/com/google/home/google/ExtendedPowerSource#StartCharging) | | [ExtendedPowerSource](/reference/kotlin/com/google/home/google/ExtendedPowerSource) | google | Command | [StopCharging](/reference/kotlin/com/google/home/google/ExtendedPowerSource#StopCharging) | | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | google | Attribute | [activePresetHandle](/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes#activePresetHandle()) | | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | google | Attribute | [activeRemoteTemperatureSensorIds](/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes#activeRemoteTemperatureSensorIds()) | | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | google | Attribute | [averageLocalTemperature](/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes#averageLocalTemperature()) | | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | google | Attribute | [extendedRunningMode](/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes#extendedRunningMode()) | | [ExtendedThermostat](/reference/kotlin/com/google/home/google/ExtendedThermostat) | google | Attribute | [extendedSystemMode](/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes#extendedSystemMode()) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Command | [PulseEffectSet](/reference/kotlin/com/google/home/google/LightEffects.Command#PulseEffectSet) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Command | [SleepEffectSet](/reference/kotlin/com/google/home/google/LightEffects.Command#SleepEffectSet) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Command | [StopEffect](/reference/kotlin/com/google/home/google/LightEffects.Command#StopEffect) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Command | [WakeEffectSet](/reference/kotlin/com/google/home/google/LightEffects.Command#WakeEffectSet) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Attribute | [pulseEffectSet](/reference/kotlin/com/google/home/google/LightEffectsTrait.Attributes#pulseEffectSet()) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Attribute | [sleepEffectSet](/reference/kotlin/com/google/home/google/LightEffectsTrait.Attributes#sleepEffectSet()) | | [LightEffects](/reference/kotlin/com/google/home/google/LightEffects) | google | Attribute | [wakeEffectSet](/reference/kotlin/com/google/home/google/LightEffectsTrait.Attributes#wakeEffectSet()) | | [LockUnlock](/reference/kotlin/com/google/home/google/LockUnlock) | google | Command | [Lock](/reference/kotlin/com/google/home/google/LockUnlock.Command#Lock) | | [LockUnlock](/reference/kotlin/com/google/home/google/LockUnlock) | google | Command | [Unlock](/reference/kotlin/com/google/home/google/LockUnlock.Command#Unlock) block | | [LockUnlock](/reference/kotlin/com/google/home/google/LockUnlock) | google | Attribute | [lockState](/reference/kotlin/com/google/home/google/LockUnlockTrait.Attributes#lockState()) | | [MotionDetection](/reference/kotlin/com/google/home/google/MotionDetection) | google | Event | [MotionDetected](/reference/kotlin/com/google/home/google/MotionDetectionTrait.MotionDetected) | | [MotionDetection](/reference/kotlin/com/google/home/google/MotionDetection) | google | Attribute | [motionDetectionEventInProgress](/reference/kotlin/com/google/home/google/MotionDetectionTrait.Attributes#motionDetectionEventInProgress()) | | [ObjectDetection](/reference/kotlin/com/google/home/google/ObjectDetection) | google | Event | [ObjectDetected](/reference/kotlin/com/google/home/google/ObjectDetectionTrait.ObjectDetected) | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Command | [Close](/reference/kotlin/com/google/home/google/OpenClose.Command#Close) block | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Command | [GoToOpenPercentage](/reference/kotlin/com/google/home/google/OpenClose.Command#GoToOpenPercentage) block | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Command | [Open](/reference/kotlin/com/google/home/google/OpenClose.Command#Open) block | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Command | [Step](/reference/kotlin/com/google/home/google/OpenClose.Command#Step) block | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Attribute | [openPercent](/reference/kotlin/com/google/home/google/OpenCloseTrait.Attributes#openPercent()) | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Attribute | [openState](/reference/kotlin/com/google/home/google/OpenCloseTrait.Attributes#openState()) | | [OpenClose](/reference/kotlin/com/google/home/google/OpenClose) | google | Attribute | [targetOpenPercent](/reference/kotlin/com/google/home/google/OpenCloseTrait.Attributes#targetOpenPercent()) | | [Toggles](/reference/kotlin/com/google/home/google/Toggles) | google | Command | [ChangeToggleSettings](/reference/kotlin/com/google/home/google/Toggles#ChangeToggleSettings) block | | [Toggles](/reference/kotlin/com/google/home/google/Toggles) | google | Attribute | [currentToggleSettings](/reference/kotlin/com/google/home/google/TogglesTrait.Attributes#currentToggleSettings()) | | [Brightness](/reference/kotlin/com/google/home/google/Brightness) | google | Command | [BrightnessStep](/reference/kotlin/com/google/home/google/Brightness#BrightnessStep) | | [Brightness](/reference/kotlin/com/google/home/google/Brightness) | google | Command | [MoveToBrightness](/reference/kotlin/com/google/home/google/Brightness#MoveToBrightness) | | [Brightness](/reference/kotlin/com/google/home/google/Brightness) | google | Attribute | [currentBrightnessPercent](/reference/kotlin/com/google/home/google/BrightnessTrait.Attributes#currentBrightnessPercent()) | | [SimplifiedOnOff](/reference/kotlin/com/google/home/google/SimplifiedOnOff) | google | Attribute | [onOff](/reference/kotlin/com/google/home/google/SimplifiedOnOffTrait.Attributes#onOff()) | | [SimplifiedThermostat](/reference/kotlin/com/google/home/google/SimplifiedThermostat) | google | Command | [SetSystemMode](/reference/kotlin/com/google/home/google/SimplifiedThermostat#SetSystemMode) | | [SimplifiedThermostat](/reference/kotlin/com/google/home/google/SimplifiedThermostat) | google | Attribute | [systemMode](/reference/kotlin/com/google/home/google/SimplifiedThermostatTrait.Attributes#systemMode()) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Command | [MoveToVolume](/reference/kotlin/com/google/home/google/Volume#MoveToVolume) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Command | [Mute](/reference/kotlin/com/google/home/google/Volume#Mute) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Command | [Unmute](/reference/kotlin/com/google/home/google/Volume#Unmute) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Command | [VolumeStep](/reference/kotlin/com/google/home/google/Volume#VolumeStep) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Attribute | [currentVolumePercent](/reference/kotlin/com/google/home/google/VolumeTrait.Attributes#currentVolumePercent()) | | [Volume](/reference/kotlin/com/google/home/google/Volume) | google | Attribute | [isMuted](/reference/kotlin/com/google/home/google/VolumeTrait.Attributes#isMuted()) | | [AreaAttendanceState](/reference/kotlin/com/google/home/google/AreaAttendanceState) | google | Attribute | [attendanceState](/reference/kotlin/com/google/home/google/AreaAttendanceStateTrait.Attributes#attendanceState()) | | [AreaPresenceState](/reference/kotlin/com/google/home/google/AreaPresenceState) | google | Attribute | [presenceState](/reference/kotlin/com/google/home/google/AreaPresenceStateTrait.Attributes#presenceState()) | --- # Source: https://developers.home.google.com/apis/android/automation/simplified-traits # Simplified Traits on Android Simplified traits are facades for standard Home API traits, available for the Automation API on Android. They act as a device-specific subset of attributes and commands to simplify common tasks. They work for both Matter and Cloud-to-cloud devices. **Example:** * The standard [`LevelControl`](/reference/kotlin/com/google/home/matter/standard/LevelControl) trait is generic for any device with a continuous numeric range. * The [`Brightness`](/reference/kotlin/com/google/home/google/Brightness) simplified trait stands in for `LevelControl` on a [`DimmableLight`](/reference/kotlin/com/google/home/matter/standard/DimmableLightDevice). It offers a simple `moveToBrightness(brightnessPercent)` command, whereas `LevelControl` has more complex `move` commands with more parameters. ### Simplified vs. Standard Traits | Simplified trait | Standard trait(s) | | --- | --- | | [`SimplifiedThermostat`](/reference/kotlin/com/google/home/google/SimplifiedThermostat) | [`Thermostat`](/reference/kotlin/com/google/home/matter/standard/Thermostat) | | [`Brightness`](/reference/kotlin/com/google/home/google/Brightness) | [`LevelControl`](/reference/kotlin/com/google/home/matter/standard/LevelControl) | | [`SimplifiedOnOff`](/reference/kotlin/com/google/home/google/SimplifiedOnOff) | [`OnOff`](/reference/kotlin/com/google/home/matter/standard/OnOff) | | [`Volume`](/reference/kotlin/com/google/home/google/Volume) | [`LevelControl`](/reference/kotlin/com/google/home/matter/standard/LevelControl) [`OnOff`](/reference/kotlin/com/google/home/matter/standard/OnOff) | ### Discovery API If both a simplified trait and its underlying standard trait are registered in the [`FactoryRegistry`](/reference/kotlin/com/google/home/FactoryRegistry), the Discovery API will report both. The developer can then choose which trait to use for automation. ### Retrieving a Device To retrieve a device supporting a simplified trait (e.g., `SimplifiedThermostat`), you cannot use the `has(trait)` method. Instead, use the `has(deviceType)` method. ```kotlin val thermostat = home.devices().list().first { device -> device.has(ThermostatDevice) } ``` --- # Source: https://developers.home.google.com/apis/android/automation/blocked-actions # Blocked actions in automations on Android Certain commands are blocked from use as actions in the Automation APIs. Automations featuring these blocked actions cannot be created. | Device Type | Trait | Blocked Action | | --- | --- | --- | | Air conditioner | OnOff | Off | | Bathtub | Fill | Fill | | Bathtub | OperationalState | Pause | | Bathtub | OperationalState | Resume | | Blanket | ModeSelect | ChangeToMode | | Blanket | OnOff | On | | Boiler | OnOff | On | | Closet | OpenClose | Step | | Coffee maker | Cook | Cook | | Cooktop | OnOff | On | | Cooktop | Cook | Cook | | Door | LockUnlock | Unlock | | Door | OpenClose | Close | | Door | OpenClose | Open | | Door Lock | LockUnlock | Unlock | | Drawer | OpenClose | Step | | Faucet | TemperatureControl | SetTemperature | | Faucet | Dispense | Dispense | | Faucet | OperationalState | Pause | | Faucet | OperationalState | Resume | | Fireplace | ModeSelect | ChangeToMode | | Fireplace | OnOff | On | | Fireplace | Toggles | ChangeToggleSettings | | Fryer | OnOff | On | | Fryer | Cook | Cook | | Garage | LockUnlock | Unlock | | Garage | OpenClose | Close | | Garage | OpenClose | Open | | Gate | LockUnlock | Unlock | | Gate | OpenClose | Close | | Gate | OpenClose | Open | | Grill | OnOff | On | | Grill | Cook | Cook | | Heater | OnOff | On | | Kettle | OnOff | On | | Microwave | Cook | Cook | | Mower | OnOff | On | | Multicooker | OnOff | On | | Multicooker | Cook | Cook | | Oven | OnOff | On | | Oven | Cook | Cook | | Security system | ArmDisarm | ArmDisarm | | Shower | TemperatureControl | SetTemperature | | Shower | OperationalState | Pause | | Shower | OperationalState | Resume | | Sous vide | OnOff | On | | Thermostat | OnOff | Off | | Valve | OpenClose | Close | | Valve | OpenClose | Step | | Valve | OpenClose | GoToOpenPercentage | | Valve | OpenClose | Open | | Window | LockUnlock | Unlock | | Window | OpenClose | Close | | Window | OpenClose | Open | --- # Source: https://developers.home.google.com/apis/android/automation/dsl # Android DSL Concepts An overview of the fundamental concepts of the Automation DSL on Android. ## Automation Components An automation consists of three basic components, evaluated in order: 1. **Starter**: Defines the initial conditions that activate the automation (e.g., a trait change). A starter is mandatory. 2. **Condition**: Additional constraints evaluated after activation. The expression must be `true` for actions to proceed. 3. **Action**: Commands or state updates performed when all conditions are met. **Example**: An automation dims the lights (**Action**) when the TV turns on (**Starter**), but only if the time is between sunset and sunrise (**Condition**). Automations also contain metadata like **name** and **description**. ## Nodes The logical structure of an automation consists of **nodes**, which are reusable units representing entity behaviors or execution flows. Nodes have input and output variables. ### Node Types | Node | Node Type | Description | | :--- | :--- | :--- | | **Starter** | Behavioral | Starts an automation when a trait's state changes. | | **StateReader** | Behavioral | Reads a trait attribute to capture its value for use in condition nodes. | | **Action** | Behavioral | Invokes trait command(s). | | **Sequential** | Execution flow | Executes nested action nodes in sequence. This is the default behavior. | | **Parallel** | Execution flow | Executes nested action nodes in parallel. | | **Condition** | Execution flow | Conditionally changes execution flow based on the evaluation of logical expressions. | | **Select** | Execution flow | Allows more than one starter to activate an automation. | | **Expression** | Value | A trait's attribute value, a constant, or a literal. Must evaluate to a list, number, boolean, or string. | ### Execution Flow Nodes - **Sequential Flow**: Executes nodes in sequential order (e.g., starter, condition, action). - **Parallel Flow**: Executes multiple action nodes simultaneously. Nodes following a parallel flow wait for all parallel branches to finish. - **Condition Flow**: Changes the execution path based on the evaluation of an expression (e.g., checking if it is nighttime). - **Select Flow**: Allows an automation to be activated by any one of multiple starters. - **Important:** A `select` flow must be the first node in a `sequential` flow and cannot be placed in a `parallel` flow or nested within another `select` flow. ### Nested Flows Execution flow nodes can be nested within each other for complex automations (e.g., a sequential flow that contains a parallel flow). ### Node Combination Rules | Node | May contain the following | Must be within one of the following | | :--- | :--- | :--- | | **Starter** | Expression | Select, Sequential | | **ManualStarter** | | Select, Sequential | | **StateReader** | Expression (trait attribute value) | Action, Condition | | **Action** | Command, Entity, Expression | Parallel, Select, Sequential | | **Sequential** | Parallel, Select, Sequential | | | **Parallel** | Action | Sequential | | **Condition** | Expression | Parallel, Sequential | | **Select** | Condition, Sequential, Starter, ManualStarter | Sequential (must be the first node) | ## Automation DSL Automations are defined using the Automation DSL, a [Kotlin DSL](https://kotlinlang.org/docs/type-safe-builders.html) that uses type-safe builders. - It simplifies building automations and uses the same data model as Matter and smart home traits. - It defines logic using abstract device types rather than specific device instances. - When compiled, it generates Kotlin data classes that are serialized to protocol buffer JSON for Google's Automation Services. ### Example An automation that turns on `light2` when `light1` is turned on. ```kotlin val automation = automation { name = "MyFirstAutomation" description = "If light1 is on, turn on light2." isActive = true sequential { val onOffTrait = starter<_>(device1, OnOffLightDevice, OnOff) condition() { expression = onOffTrait.onOff equals true } action(device2, OnOffLightDevice) { command(OnOff.on()) } } } ``` --- # Source: https://developers.home.google.com/apis/android/automation/dsl/basic # Android DSL Guide All automation DSL is placed within a single `automation` node, which forms the boundary between the outer Kotlin language context and the embedded DSL context. ## Sequential flow The sequential flow is the default automation flow type. ![Sequential DSL example](/static/apis/images/apis-automation-dsl-sequential.svg) A basic sequential flow consists of a starter, a condition, and an action: ```kotlin import com.google.home.automation.action import com.google.home.automation.automation import com.google.home.automation.condition import com.google.home.automation.sequential import com.google.home.automation.starter ... automation { sequential { starter<_>(...) condition {...} action {...} } } ``` ## Starter Starter nodes define the initial circumstances that activate an automation. An automation must have at least one starter. To use multiple starters, you must use a `select` node. ### Starter based on trait attribute Specify the device, the device type, and the trait. The device type is required to disambiguate which part of a composite device triggers the automation (e.g., a device with both `FanDevice` and `HeatingCoolingUnitDevice` traits). ```kotlin starter<_>(thermostat, TemperatureSensorDevice, TemperatureMeasurement) ``` ### Starter based on event Specify the device, the device type, and the event. ```kotlin starter<_>(doorBell, GoogleDoorbellDevice, DoorbellPressed) ``` ### Starter based on a structure and event, with parameters Some events require parameters. This example uses `Time.ScheduledTimeEvent` to activate the automation at 7:00 AM: ```kotlin val earlyMorning = starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime( LocalTime.of(7, 0, 0, 0))) } ``` ### Manual starter A special starter that lets a user manually run the automation via a UI element calling `Automation.execute()`. * Do not specify a trait or device type. * In a `select` flow, a manual starter overrides other starters. * `condition` nodes following a manual starter are still evaluated and may block execution. ![Separating a manual starter from a conditional](/static/apis/images/apis-automation-dsl-select-manual-starter-vertical.svg) To prevent `condition` nodes from blocking a manual start, place the conditional starter and its `condition` in a separate `sequential` block: ```kotlin automation_graph { sequential { select { sequential { starter<_>(...) condition {...} } sequential { manualStarter() } } action {...} } } ``` ## Reference the value of an attribute Use the value of an attribute in an expression via a `stateReader` or a `starter`. **With a `stateReader`:** ```kotlin val time = stateReader<_>(structure, Structure, Time) val currTime = time.currentTime ``` **With a `starter`:** ```kotlin val starterNode = starter<_>(device1, LaundryWasherDevice, OnOff) condition() { expression = starterNode.onOff equals true } ``` ## Condition nodes and expressions A `condition` node is a decision point. If its expression evaluates to `false`, the automation stops. You can use multiple `condition` nodes. Expressions are formed like Kotlin expressions and must evaluate to a single boolean value. **Example of a complex expression:** ```kotlin condition() { val expr1 = starterNode.lockState equals DlLockState.Unlocked val expr2 = stateReaderNode.lockState equals true val expr3 = occupancySensingDevice.occupied notEquals 0 val expr4 = timeStateReaderNode .currentTime .between( timeStateReaderNode.sunsetTime, timeStateReaderNode.sunriseTime) expression = (expr1 and expr2) or (expr3 and expr4) } ``` ### stateReader A `stateReader` node can be used to reference trait attribute values within a `condition`. 1. **Define the `stateReader`:** ```kotlin import com.google.home.automation.stateReader ... val filterMonitoringState = stateReader<_>(structure, ActivatedCarbonFilterMonitoring) ``` 2. **Use it in a `condition`:** ```kotlin condition() { expression = filterMonitoringState.changeIndication .equals(ChangeIndicationEnum.Warning) } ``` 3. **Combine multiple `stateReaders`:** ```kotlin val armState = stateReader<_>(doorLock, DoorLockDevice, ArmDisarm ) val doorLockState = stateReader<_>(doorLock, DoorLockDevice, DoorLock) condition() { expression = (armState.armState equals true) and (doorLockState.lockState equals true) } ``` ### Condition duration You can specify a duration (1 to 30 minutes) for which a condition's expression must be true. ```kotlin condition { expression(lightStateReader.onOff == true) forDuration(Duration.ofMinutes(10)) } ``` ## Action nodes The `action` node executes the automation's task. This example invokes the `broadcast()` command of the `AssistantBroadcast` trait: ```kotlin action(device, SpeakerDevice) { command(AssistantBroadcast.broadcast("Intruder detected!")) } ``` ## Import statements * **Trait attributes:** Import from the trait's `Companion` object. ```kotlin import com.google.home.matter.standard.OnOff.Companion.onOff ``` * **Trait data structures:** Import from the trait class ending in `-Trait`. ```kotlin import com.google.home.matter.standard.MediaPlaybackTrait.PlaybackStateEnum ``` * **Trait commands:** Import from the trait's `Companion` object. ```kotlin import com.google.home.matter.standard.Thermostat.Companion.setTemperatureSetpointHold ``` --- # Source: https://developers.home.google.com/apis/android/automation/dsl/complex # Android DSL Guide for Complex Automations The Automation DSL can create automations more complex than basic ones. ### Sequential with Multiple Actions Multiple `action` nodes within a `sequential` block will run in order. ```kotlin automation { sequential { starter<_>(...) condition {...} action {...} action {...} action {...} } } ``` ### Sequential with Multiple Parallel Actions To run actions concurrently, place them inside a `parallel` block. Subsequent `action` nodes in the `sequential` block will wait for all parallel actions to complete. Using `parallel` is often preferred to avoid delays from sequential execution. ```kotlin automation { sequential { starter<_>(...) condition {...} parallel { action {...} action {...} action {...} } } } ``` ### Delays Use `delayFor(java.time.Duration)` to pause execution for a duration between 5 seconds and 24 hours. **Warning:** `delayFor` must be in a `sequential` flow. It is ignored if nested within a `parallel` flow. Example: Toggle a light four times with a five-second pause between each action. ```kotlin sequential { action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(5)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(5)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } delayFor(Duration.ofSeconds(5)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } } ``` ### Trigger Suppression Use `suppressFor(java.time.Duration)` to prevent an automation from re-triggering for a specified period (5 seconds to 24 hours). This affects all `starter` nodes that precede it in the automation. Example: After a motion trigger, ignore subsequent motion triggers for 30 minutes. ```kotlin automation { sequential { val starterNode = starter<_>(device, OccupancySensor, MotionDetection) suppressFor(Duration.ofMinutes(30)) action(light, OnOffLightDevice) { command(OnOff.toggle()) } } } ``` ### Limit the Number of Executions Set the `maxExecutionCount` metadata field to limit how many times an automation can run. After reaching the limit, the automation is deleted, but its history remains in the Google Home app's **Activity** tab. Example: An automation that can only execute once. ```kotlin automation { // The automation can only be executed once. maxExecutionCount = 1 // When the door lock state changes sequential { val doorLockEvent = starter<_>(doorLock, DoorLockDevice, LockOperationEvent) // if the door is unlocked condition() { expression = (doorLockEvent.lockOperationType equals LockOperationTypeEnum.Unlock) } // turn the light on action(light, DimmableLightDevice) { command(OnOff.on()) } } } ``` ### Set Trait Attributes in an Action To set a trait attribute's value, use an `update(trait)` node within an `action`. Inside `update`, call a mutator function for each attribute you want to modify. The function name is formed by prefixing the capitalized attribute name with `set` (e.g., `defaultMoveRate` becomes `setDefaultMoveRate`). **Important:** Only attributes with `write` access can be updated. Example: Update two attributes for a Fan device. ```kotlin action(device, Fan) { update(FanControl) { setPercentSetting(50u) setRockSetting(FanControlCluster.RockBitmap.rockUpDown) } } ``` --- # Source: https://developers.home.google.com/apis/android/automation/dsl/recurring-starters # Recurring Scheduled Event Starters Three starters let you schedule an automation in advance: * [`Time.ScheduledTimeEvent`](/reference/kotlin/com/google/home/google/Time.ScheduledTimeEvent) * [`Time.RecurringClockTimeScheduledEvent`](/reference/kotlin/com/google/home/google/Time.RecurringClockTimeScheduledEvent) * [`Time.RecurringSolarTimeScheduledEvent`](/reference/kotlin/com/google/home/google/Time.RecurringSolarTimeScheduledEvent) > **Note:** For these starters to work, the structure must have an address assigned via the [Google Home app (GHA)](https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app). See [Change Google home address](https://support.google.com/googlenest/answer/7551002). ## `Time.ScheduledTimeEvent` Schedules an automation for a single future instant or on a recurring basis, using either clock time or a solar event (sunrise/sunset). **Clock Time Example:** Starts the automation at 10:00 PM every day. ```kotlin starter<_>(structure, Time.ScheduledTimeEvent) { parameter(Time.ScheduledTimeEvent.clockTime(LocalTime.of(22, 0, 0, 0))) } ``` **Solar Time Example:** Uses a [`SolarTimeStruct`](/reference/kotlin/com/google/home/google/TimeTrait.SolarTimeStruct) with a `type` (sunrise/sunset) and an `offset`. The following starts the automation 15 minutes before sunrise every day. ```kotlin starter<_>(structure, Time.ScheduledTimeEvent) { parameter( Time.ScheduledTimeEvent.solarTime( SolarTimeStruct(SolarTimeType.Sunrise, java.time.Duration.ofMinutes(-15)) ) ) } ``` ## Recurring Scheduled Event Starters These starters, `RecurringClockTimeScheduledEvent` and `RecurringSolarTimeScheduledEvent`, create automations that run periodically with more specific time and calendar-based criteria. ### `cron` Expressions These starters use a scheduling syntax similar to the Unix `cron` utility, specifically the [Quartz scheduler](https://www.quartz-scheduler.org/) syntax. See the [Quartz `CronExpression` documentation](https://www.quartz-scheduler.org/api/2.3.0/org/quartz/CronExpression.html) for details. > **Important:** The **Second** field in `cron` expressions is strictly limited to numeric values from 0 to 59. A recurring event cannot trigger more often than once per minute. #### Examples | Use case | Second | Minute | Hour | Day-of-Month | Month | Day-of-Week | Year | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | Run every 24 hours, at midnight | `0` | `0` | `0` | `?` | `*` | `*` | `*` | | Run at 6:00am every Tuesday | `0` | `30` | `19` | `?` | `*` | `3` | `*` | | Run at quarter past the hour, every hour, during February | `0` | `15` | `*` | `?` | `2` | `*` | `*` | | Run once an hour | `0` | `0` | `*` | `?` | `*` | `*` | `*` | | Run at midnight, Jan-Mar, on weekday closest to the 1st | `0` | `0` | `0` | `?` | `1-3` | `1W` | `*` | | On the second Thursday of Feb, hourly at a quarter past | `0` | `15` | `*` | `?` | `2` | `5#2` | `*` | | Run hourly at quarter past, on the last day of February | `0` | `15` | `*` | `L` | `2` | `?` | `*` | | Run at 6:00am every Tuesday and Thursday | `0` | `30` | `19` | `?` | `*` | `3,5` | `*` | ### `RecurringClockTimeScheduledEvent` Assigns a `cron` expression string to the [`cronExpression`](/reference/kotlin/com/google/home/google/Time.RecurringClockTimeScheduledEvent#cronExpression()) field. **Example:** Starts the automation at 8:00 PM, every Wednesday in April. ```kotlin starter<_>(structure, event = Time.RecurringClockTimeScheduledEvent) { parameter(Time.RecurringClockTimeScheduledEvent.cronExpression("0 0 20 ? 4 4 *")) } ``` ### `RecurringSolarTimeScheduleEvent` This starter takes two parameters: 1. A [`SolarTimeStruct`](/reference/kotlin/com/google/home/google/TimeTrait.SolarTimeStruct). 2. `cronExpression`: A subset of a `cron` expression (Day-of-Month, Month, Day-of-Week, Year fields only). **Example:** Starts an automation one hour after sunrise, every Wednesday in April. ```kotlin starter<_>(structure, event = Time.RecurringSolarTimeScheduledEvent) { parameter( Time.RecurringSolarTimeScheduledEvent.solarTime( TimeTrait.SolarTimeStruct(SolarTimeType.Sunrise, Duration.ofHours(1)) ) ) parameter(Time.RecurringSolarTimeScheduledEvent.cronExpression("? 4 4 *")) } ``` --- # Source: https://developers.home.google.com/apis/android/automation/dsl/operators # Android DSL Operator Reference Operators allow you to check trait attributes, compare values, and combine expressions in `condition` nodes. **Required imports:** ```kotlin import com.google.home.automation.and import com.google.home.automation.between import com.google.home.automation.contains import com.google.home.automation.equals import com.google.home.automation.greaterThan import com.google.home.automation.greaterThanOrEquals import com.google.home.automation.lessThan import com.google.home.automation.not import com.google.home.automation.notEquals import com.google.home.automation.or ``` ## Comparison Operators ### `between` Checks if a value is between two other values (inclusive). * `2` between `1` and `3` -> `true` * `6` between `1` and `3` -> `false` ```kotlin val time = stateReader<_>(structure, Time) condition() { expression = time.currentTime .between( time.sunsetTime, time.sunriseTime) } ``` #### Using Dates with `between()` You can specify a range of dates using `LocalDate`, or partial dates with `YearMonth`, `MonthDay`, or just the day of the month. ```kotlin // Full dates val exp2 = time.currentDate.between( LocalDate.of(2025, Month.OCTOBER, 1), LocalDate.of(2025, Month.DECEMBER, 15), ) // Year and month val exp2 = time.currentDate.yearMonth.between( YearMonth.of(2024, Month.OCTOBER), YearMonth.of(2026, Month.JANUARY), ) // Month and day val exp2 = time.currentDate.monthDay.between( MonthDay.of(Month.OCTOBER, 1), MonthDay.of(Month.DECEMBER, 15), ) // Day of the month val exp2 = time.currentDate.day.between(1, 15) ``` ### `equals` Checks for equality. (`2` equals `2` -> `true`) ```kotlin washer.operationalState equals STOPPED ``` ### `greaterThan` Checks if a value is greater than another. (`6` greaterThan `1` -> `true`) ```kotlin ( blindsPosition.currentPositionLift greaterThan 0u ) ``` ### `greaterThanOrEquals` Checks if a value is greater than or equal to another. (`6` greaterThanOrEquals `6` -> `true`) ```kotlin ( starterNode.measuredValue greaterThanOrEquals 50 ) ``` ### `lessThan` Checks if a value is less than another. (`1` lessThan `6` -> `true`) ```kotlin time.currentTime lessThan LocalTime.of(22,0,0,0) ``` ### `lessThanOrEquals` Checks if a value is less than or equal to another. (`6` lessThanOrEquals `6` -> `true`) ```kotlin ( starterNode.measuredValue lessThanOrEquals 25 ) ``` ### `notEquals` Checks for inequality. (`6` notEquals `1` -> `true`) ```kotlin occupancyStateChange.occupied notEquals 0 ``` ## Arithmetic Operators ### Add (`+`) ```kotlin var totalCount = 0 ... totalCount = totalCount + 1 ``` ### Subtract (`-`) ```kotlin var countdown = 10 ... countdown = countdown - 1 ``` ### Multiply (`*`) ```kotlin val millis = seconds * 1000 ``` ### Divide (`/`) ```kotlin val rpm = revolutions / minutes ``` ## Logical Operators ### `and` Logical AND. Evaluates to `true` if both expressions are `true`. ```kotlin ((device.occupied notEquals 0) and time.currentTime.between(time.sunriseTime, time.sunsetTime)) ``` ### `not` Negates the logical value of an expression. (`not true` -> `false`) ```kotlin time.currentTime not (between(time.sunriseTime, time.sunsetTime)) ``` ### `or` Logical OR. Evaluates to `true` if at least one expression is `true`. ```kotlin (time.currentTime equals LocalTime.of(10,0,0,0)) or (time.currentTime equals LocalTime.of(22,0,0,0)) ``` --- # Source: https://developers.home.google.com/apis/android/test # Test your Home APIs app Testing Home APIs apps presents unique challenges due to dependencies on physical smart home devices, network reliability, security, privacy, and device/protocol interoperability. ## Set up your test environment * **Dedicated Wi-Fi Network:** Isolate test devices on a dedicated Wi-Fi network to prevent interference and simulate various network conditions (e.g., throttled bandwidth). * **Diverse Devices:** Test with a variety of real, physical smart home devices from multiple manufacturers. Do not rely exclusively on virtual devices or emulators. * **Variety of Android Devices:** Test your app on Android devices from different manufacturers, with varying screen sizes and OS versions, to ensure broad compatibility. ## Assemble your tools | Tool | Description | | --- | --- | | **[Google Home Plugin for Android Studio]** | Access to Google Assistant Simulator, Home Graph Viewer, Google Cloud Logging, and adb Log viewer. | | **[Google Home Playground]** | Useful for many testing scenarios, but not a substitute for physical devices. | | **[Matter Virtual Device (MVD)]** | Emulation app for testing Matter devices. | | [**Espresso**] | Automate UI testing. Requires mocking the underlying API to simulate hardware interactions. | | A **Network emulator** | Simulate varying network conditions and API responses, especially for cloud-based Home APIs. | | [**Android Studio Logcat**] | Handle and analyze log data. | ## Apply different testing approaches and strategies In addition to standard user experience and security testing, focus on the following areas for Home APIs apps. ### Functional testing 1. **Device Discovery and Pairing:** Test initial setup, re-discovery after app/device restarts or network changes, and failure scenarios (unresponsive devices, incorrect credentials). 2. **State Synchronization:** Ensure the app accurately and promptly reflects the current device state. 3. **Permissions:** Verify permission management and enforcement, especially for multiple users or shared access, including graceful handling of revoked permissions. 4. **Scenes and Automations:** Test the creation, modification, and execution of scenes (e.g., "Goodnight") and automations, including starters and actions. ### Performance testing * **Responsiveness:** Verify the app is responsive and doesn't introduce unnecessary latency. * **Scalability:** Test with a large number of devices to assess performance under load. * **Resource Consumption:** Monitor CPU, memory, and battery usage to ensure it's reasonable, especially during active device communication. ### Reliability and stability testing Test against the following scenarios: 1. **Network Fluctuation:** * Simulate Wi-Fi dropouts, weak signals, and network switching. * Verify graceful handling of disconnections and reconnections. * Check that commands queue and execute when connectivity is restored, or that appropriate error messages are shown. * Test from remote networks, not just the local home network. 2. **Device Disconnection:** * Physically unplug devices. * Power cycle devices. 3. **Concurrent Operations:** * Send a rapid sequence of commands. * Have multiple users control the same device simultaneously. * Test overlapping scenes and automations. 4. **Error Handling:** * Force API errors (e.g., by mocking cloud API server responses). * Test invalid user input. * Verify graceful degradation and informative error messages. 5. **Long-Term Reliability:** Run the app and connected devices for extended periods to uncover memory leaks or stability issues. # api reference file # each package has a corresponding source url, which is {package}-> {url}, which can provide user for reference --- package: com.google.home.annotation.package-summary --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/annotation/package-summary --- # com.google.home.annotation ### Annotations | Name | Description | |---|---| | `HomeExperimentalApi` | Indicates that this element is experimental and is subject to change without notice. | --- package: com.google.home.annotation.HomeExperimentalApi --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalApi --- # annotation `HomeExperimentalApi` @MustBeDocumented @Retention(AnnotationRetention.BINARY) @Target(FIELD, FUNCTION, CONSTRUCTOR, CLASS, PROPERTY, PROPERTY_GETTER) @RequiresOptIn(level = RequiresOptIn.Level.WARNING, message = "This API is experimental and may change or be removed without notice.") Indicates that this element is experimental and is subject to change without notice. --- package: com.google.home.automation.ManualStarterNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ManualStarterNodeDsl --- # ManualStarterNodeDsl `interface ManualStarterNodeDsl : AutomationFlowContributor` Interface for constructing `ManualStarter` nodes and contributing them to an automation flow. **Known direct subclasses:** * `SelectFlowBuilder`: Type-safe builder that builds a `SelectFlow` node. * `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions * `manualStarter(): Unit` ### Inherited Functions * From `AutomationFlowContributor`: `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.Not --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Not --- # Not `class Not : UnaryExpression` The logical NOT operator. ```kotlin val x = Not(false) ``` ### Inherited Properties * `operand: Expression`: The operand (from `UnaryExpression`). --- package: com.google.home.automation.UnknownCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownCommand --- # UnknownCommand `class UnknownCommand : ActionBehavior` Represents an unknown Command. ### Constructor * `UnknownCommand(commandId: String)` ### Properties * `commandId: String` --- package: com.google.home.automation.MapSize --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapSize --- # MapSize `class MapSize : ExpressionWithId` Represents the "size" operation on a map expression. ### Properties * `mapExpression: Expression` --- package: com.google.home.automation.ListAnyMatch --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAnyMatch --- ### class ListAnyMatch : Comprehension Represents the "any match" operation on a list expression. #### Inherited from `Comprehension` * `lambdaBody: Expression` * `lambdaVar: ReferenceDeclaration` * `rangeExpression: Expression` --- package: com.google.home.automation.ListSize --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListSize --- ### class ListSize : ExpressionWithId Represents the "size" operation on a list expression. #### Properties * `listExpression: Expression` --- package: com.google.home.automation.UnknownUnsupportedCandidateReason --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownUnsupportedCandidateReason --- ### class UnknownUnsupportedCandidateReason : UnsupportedCandidateReason Represents an unknown `UnsupportedCandidateReason`. #### Constructor * `UnknownUnsupportedCandidateReason(reason: String)` #### Functions * `equals(other: Any?): Boolean` * `hashCode(): Int` * `toString(): String` #### Properties * `reason: String` --- package: com.google.home.automation.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Command --- ### class Command : ActionBehavior A trait command used in an automation `Action`. #### Constructor * `Command(trait: TraitFactory, command: String, params: Map = emptyMap())` #### Properties * `command: String` - The unique identifier for the command. * `params: Map` - The parameters for the command. * `trait: TraitFactory` - The `Trait` associated with the command. --- package: com.google.home.automation.ListFilter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListFilter --- ### class ListFilter : Comprehension Represents the "filter" operation on a list expression. #### Inherited from `Comprehension` * `lambdaBody: Expression` * `lambdaVar: ReferenceDeclaration` * `rangeExpression: Expression` --- package: com.google.home.automation.Plus --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Plus --- ### class Plus : BinaryExpression The PLUS operator, which calculates `operand1 + operand2`. #### Inherited from `BinaryExpression` * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.UnsupportedNodeOutput --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedNodeOutput --- ### class UnsupportedNodeOutput : ValidationIssue This type of node does not produce output. #### Constructor * `UnsupportedNodeOutput(node: Node, severity: ValidationIssueSeverity, nodeType: String)` #### Properties * `nodeType: String` - The node type. #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. * `toString(): String` --- package: com.google.home.automation.LessThanOrEquals --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThanOrEquals --- ### class LessThanOrEquals : BinaryExpression The less-than-or-equal-to operator, which evaluates to `true` when `operand1 <= operand2`. #### Inherited from `BinaryExpression` * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.InvalidParameter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidParameter --- ### class InvalidParameter : ValidationIssue The parameter name is not found in the behavior schema. Only one of `commandId`, `eventId`, or `traitId` is populated. #### Constructor * `InvalidParameter(node: Node, severity: ValidationIssueSeverity, parameterName: String, commandId: String? = null, eventId: String? = null, traitId: String? = null)` #### Properties * `commandId: String?` - The unique ID of the command. * `eventId: String?` - The unique ID of the event. * `parameterName: String` - The name of the parameter. * `traitId: String?` - The unique ID of the trait. #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` * `node: Node` * `severity: ValidationIssueSeverity` * `toString(): String` --- package: com.google.home.automation.UnsupportedOperator --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedOperator --- ### class UnsupportedOperator : ValidationIssue The expression uses an unsupported operator. #### Constructor * `UnsupportedOperator(node: Node, severity: ValidationIssueSeverity)` #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` * `node: Node` * `severity: ValidationIssueSeverity` * `toString(): String` --- package: com.google.home.automation.InvalidParameterType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidParameterType --- ### class InvalidParameterType : ValidationIssue The parameter type is not valid. #### Constructor * `InvalidParameterType(node: Node, severity: ValidationIssueSeverity, id: Int? = null, name: String? = null, expected: String, actual: String)` #### Properties * `actual: String` - The actual parameter type. * `expected: String` - The expected parameter type. * `id: Int?` - The unique ID of the parameter. * `name: String?` - The name of the parameter. #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` * `node: Node` * `severity: ValidationIssueSeverity` * `toString(): String` --- package: com.google.home.automation.HasOutput --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasOutput --- ### interface HasOutput A node that can produce output, such as `Starter` or `Action`. * **Known subclasses:** `Assignment`, `Starter`, `StateReader` #### Properties * `output: String` - Data that uniquely identifies the `Node`, if available. Must be unique per `Automation`. --- package: com.google.home.automation.Or --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Or --- ### class Or : BinaryExpression The logical OR operator. #### Inherited from `BinaryExpression` * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.EnumConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/EnumConstraint --- ### class EnumConstraint> : Constraint Represents possible values a field can take. #### Constructor * `> EnumConstraint(allowedSet: Set)` #### Properties * `allowedSet: Set` - The allowed values. --- package: com.google.home.automation.Automation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation --- ### interface Automation : HasId, BaseAutomation, Updatable The main representation of an automation. * **Known subclasses:** `MutableAutomation` #### Functions * `execute(): suspend Unit` - Execute the automation. * `stop(): suspend Unit` - Stop the automation. #### Properties * `compatibleWithSdk: Boolean` - Whether the automation data is compatible with the current SDK. * `isRunning: Boolean` - Whether the automation is currently running. * `isValid: Boolean` - Indicates whether the automation is valid. * `manuallyExecutable: Boolean` - Whether the automation can be manually executed. * `validationIssues: List` - List of validation issues. #### Inherited from `Updatable` * `update(optimisticReturn: (Automation) -> Unit, init: MutableAutomation.() -> Unit): suspend Automation` - Creates a mutable copy, mutates it, saves it, and returns a new immutable copy. #### Inherited from `BaseAutomation` * `automationGraph: SequentialFlow?` - List of `Node` instances. * `description: String` - Description of this automation. * `isActive: Boolean` - Whether the automation can execute. * `name: String` - User-given name for the automation. #### Inherited from `HasId` * `id: Id` - Opaque ID for the object. --- package: com.google.home.automation.ListAllMatch --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAllMatch --- ### class ListAllMatch : Comprehension Represents the "all match" operation on a list expression. #### Inherited from `Comprehension` * `lambdaBody: Expression` * `lambdaVar: ReferenceDeclaration` * `rangeExpression: Expression` --- package: com.google.home.automation.TernaryExpression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TernaryExpression --- ### sealed class TernaryExpression : ExpressionWithId Represents a ternary expression with three operands. * **Known subclasses:** `BetweenTimes`, `Between` #### Properties * `operand1: Expression` * `operand2: Expression` * `operand3: Expression` --- package: com.google.home.automation.MapKeys --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapKeys --- ### class MapKeys : ExpressionWithId Represents the "keys" operation on a map expression. #### Properties * `mapExpression: Expression` --- package: com.google.home.automation.Action --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Action --- ### class Action : Node Represents a command that the automation can issue. #### Constructors * `Action(entityExpression: Expression, behavior: ActionBehavior)` * `entityExpression`: An expression that selects an entity or a list of entities. * `behavior`: The behavior of the `Action`. * `Action(entity: HasId, deviceType: DeviceTypeFactory? = null, behavior: ActionBehavior)` * `entity`: The unique ID for the entity. * `deviceType`: The `DeviceType` associated with the `Action`. * `behavior`: The behavior of the `Action`. #### Properties * `behavior: ActionBehavior` - The behavior of the `Action`. * `deviceType: DeviceTypeFactory?` - The `DeviceType` associated with the `Action`. * `entity: HasId?` - The unique ID for the entity associated with the `Action`. Null if the target is not a static entity. * `entityExpression: Expression` - An expression that selects an entity or a list of entities. #### Inherited from `Node` * `nodeId: String?` --- package: com.google.home.automation.OutputTypeMismatch --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/OutputTypeMismatch --- ### class OutputTypeMismatch : ValidationIssue An output variable has been defined in multiple nodes with different types. #### Constructor * `OutputTypeMismatch(node: Node, severity: ValidationIssueSeverity, output: String, otherNodes: List)` #### Properties * `otherNodes: List` - A list of other nodes where the output variable is defined. * `output: String` - The output. #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` * `node: Node` * `severity: ValidationIssueSeverity` * `toString(): String` --- package: com.google.home.automation.ParallelFlow --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelFlow --- ### class ParallelFlow : Node A set of one or more Automation nodes that execute in parallel. #### Constructor * `ParallelFlow(nodes: List, joinSemantic: JoinSemanticType)` * `nodes`: The `Node` instances to include. * `joinSemantic`: The join type. #### Properties * `joinSemantic: JoinSemanticType` - The join type. * `nodes: List` - The `Node` instances within the `ParallelFlow`. #### Inherited from `Node` * `nodeId: String?` --- package: com.google.home.automation.SelectNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SelectNodeDsl --- ### interface SelectNodeDsl : AutomationFlowContributor Interface for constructing Select nodes and contributing them to an automation flow. * **Known subclasses:** `SequentialFlowBuilder` #### Functions * `select(block: SelectFlowBuilder.() -> Unit): Unit` #### Inherited from `AutomationFlowContributor` * `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.UnknownDeviceType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownDeviceType --- ### class UnknownDeviceType : DeviceType Represents an unknown `DeviceType`. #### Nested Types * `class UnknownDeviceType.UnknownDeviceTypeFactory : DeviceTypeFactory` #### Constructor * `UnknownDeviceType(metadata: DeviceType.Metadata = DeviceType.Metadata(isPrimaryType = false))` #### Properties * `factory: DeviceTypeFactory` * `metadata: DeviceType.Metadata` #### Inherited from `DeviceType` * `traitProvider: TraitProvider` * `equals(other: Any?): Boolean` * `hashCode(): Int` #### Inherited from `HasEvents` * `events(): Flow` * ` events(event: EventFactory): Flow` * ` events(trait: TraitFactory): Flow` #### Inherited from `TraitProvider` * ` metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * ` trait(traitFactory: TraitFactory): T?` * `traits(): Set` --- package: com.google.home.automation.AttributeDetails --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeDetails --- ### class AttributeDetails : FieldDetails Metadata pertaining to a trait attribute. #### Constructor * `AttributeDetails(name: String, isOptional: Boolean, constraint: Constraint?, isModifiable: Boolean = false, isSubscribable: Boolean = false, field: Field)` #### Properties * `isModifiable: Boolean` - Whether the attribute is modifiable. * `isSubscribable: Boolean` - Whether the attribute can be subscribed to. #### Inherited from `FieldDetails` * `constraint: Constraint?` * `field: Field` * `isOptional: Boolean` * `name: String` (deprecated) --- package: com.google.home.automation.MapValues --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapValues --- ### class MapValues : ExpressionWithId Represents the "values" operation on a map expression. #### Properties * `mapExpression: Expression` --- package: com.google.home.automation.ConditionBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConditionBuilder --- ### class ConditionBuilder Type-safe builder that builds a `Condition` node. #### Companion Functions * ` constant(value: T): TypedExpression` #### Constructor * `ConditionBuilder()` #### Functions * `build(): Condition` - Builds a `Condition`. * `expression(expression: TypedExpression): Unit` - Builds an `Expression`. * `forDuration(forDuration: Duration?): Unit` - Builds forDuration. #### Properties * `expression: lateinit TypedExpression` - The `Boolean` expression for the `Condition`. * `forDuration: Duration?` - The duration associated with the `Condition`. --- package: com.google.home.automation.MissingSubscription --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingSubscription --- ### class MissingSubscription : UnsupportedCandidateReason Candidate is not supported due to missing subscription setup. #### Constructor * `MissingSubscription(reason: String = "MISSING_SUBSCRIPTION")` #### Functions * `equals(other: Any?): Boolean` * `hashCode(): Int` * `toString(): String` #### Properties * `reason: String` --- package: com.google.home.automation.MultipleManualStarters --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MultipleManualStarters --- ### class MultipleManualStarters : ValidationIssue The automation has more than one manual starter node. #### Constructor * `MultipleManualStarters(node: Node, severity: ValidationIssueSeverity)` #### Inherited from `ValidationIssue` * `issueType: ValidationIssueType` * `node: Node` * `severity: ValidationIssueSeverity` * `toString(): String` --- package: com.google.home.automation.GreaterThanOrEquals --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThanOrEquals --- ### class GreaterThanOrEquals : BinaryExpression The greater-than-or-equal-to operator, which evaluates to `true` when `operand1 >= operand2`. #### Inherited from `BinaryExpression` * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.HasAutomations --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasAutomations --- ### interface HasAutomations Interface for `Automation` creation, retrieval, update, and deletion operations. * **Known subclasses:** `Structure` #### Functions * `automations(): HomeObjectsFlow` - Lists all automations belonging to the structure. * `createAutomation(automation: BaseAutomation): suspend Automation` - Creates an `Automation`. * `deleteAutomation(automation: Automation): suspend Unit` - Deletes an `Automation`. * `deleteAutomation(automationId: Id): suspend Unit` - Deletes an `Automation` using an ID. ---END TEXT--- --- package: com.google.home.automation.InvalidDurationExpressionType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidDurationExpressionType --- # `InvalidDurationExpressionType` *class InvalidDurationExpressionType : ValidationIssue* The duration expression type is not valid. ### Constructor ```kotlin InvalidDurationExpressionType( node: Node, severity: ValidationIssueSeverity, expected: String, actual: String ) ``` ### Properties - **`actual: String`**: The actual duration expression type. - **`expected: String`**: The expected duration expression type. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`**: The type of the validation issue. - **`node: Node`**: The node for which validation is failing. - **`severity: ValidationIssueSeverity`**: The severity of the validation issue. --- package: com.google.home.automation.InvalidCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidCommand --- # `InvalidCommand` *class InvalidCommand : ValidationIssue* The command ID is not found in the command schema. Optional `expectedBehaviorType` indicates it belongs to other schemas. ### Constructor ```kotlin InvalidCommand( node: Node, severity: ValidationIssueSeverity, commandId: String, expectedBehaviorType: String ) ``` ### Properties - **`commandId: String`**: The unique ID of the command. - **`expectedBehaviorType: String`**: Description of the expected behavior. Set to `TRAIT_ID` or `EVENT_ID` when `commandId` is a valid trait or event instead of a command. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`**: The type of the validation issue. - **`node: Node`**: The node for which validation is failing. - **`severity: ValidationIssueSeverity`**: The severity of the validation issue. --- package: com.google.home.automation.Multiply --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Multiply --- # `Multiply` *class Multiply : BinaryExpression* The MULTIPLY operator, which calculates `operand1 * operand2`. Example: `val x = Multiply(1, 2)` ### Inherited Properties from `BinaryExpression` - **`operand1: Expression`** - **`operand2: Expression`** --- package: com.google.home.automation.ParallelFlowBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelFlowBuilder --- # `ParallelFlowBuilder` *@AutomationDsl class ParallelFlowBuilder : AutomationFlowBuilder, StateReaderNodeDsl, ActionNodeDsl, SequentialDsl* Type-safe builder that builds a `ParallelFlow` node. ### Constructor ```kotlin ParallelFlowBuilder( nodes: List = emptyList(), joinSemantic: JoinSemanticType = JoinSemanticType.JsWhenAllFinished ) ``` ### Public Functions - **`build(): ParallelFlow`**: Builds and returns a `ParallelFlow` instance. ### Inherited Functions - From **`ActionNodeDsl`**: - `action(...)`: Overloaded methods to build and add an `Action`. - From **`AutomationFlowBuilder`**: - `nodes(): List` - From **`AutomationFlowContributor`**: - `flowBuilder(): AutomationFlowBuilder` - From **`SequentialDsl`**: - `sequential(block: SequentialFlowBuilder.() -> Unit)` - From **`StateReaderNodeDsl`**: - `stateReader(...)`: Overloaded methods to build a `StateReader`. --- package: com.google.home.automation.StateReaderNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StateReaderNodeDsl --- # `StateReaderNodeDsl` *interface StateReaderNodeDsl : AutomationFlowContributor* Interface for constructing `StateReader` nodes and contributing them to an automation flow. **Known direct subclasses**: `ParallelFlowBuilder`, `SequentialFlowBuilder` ### Public Functions - **` stateReader(entityExpression: TypedExpression?>, trait: TraitFactory): TypedExpression`**: Build a `StateReader`. - **` stateReader(entityExpression: TypedExpression>?>, trait: TraitFactory): TypedExpression, T>>`**: Build a `StateReader`. - **` stateReader(structure: Structure, trait: TraitFactory): TypedExpression`**: Build a `StateReader`. - **` stateReader(device: HomeDevice, deviceType: DeviceTypeFactory, trait: TraitFactory): TypedExpression`**: Build a `StateReader`. - **` stateReader(unknownEntity: UnknownEntity, entityType: TypeFactory, trait: TraitFactory): TypedExpression`**: Build a `StateReader` using an `UnknownEntity`. ### Inherited Functions - From **`AutomationFlowContributor`**: - `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.AssignmentNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl --- # `AssignmentNodeDsl` *interface AssignmentNodeDsl : AutomationFlowContributor* Interface for constructing `Assignment` nodes and contributing them to an automation flow. **Known direct subclasses**: `SequentialFlowBuilder` ### Nested Types - **`class AssignmentNodeDsl.Variable : TypedExpression`** ### Public Functions - **` variable(): AssignmentNodeDsl.Variable`**: Creates a new variable. - **` AssignmentNodeDsl.Variable.assign(expression: TypedExpression)`**: Assigns an expression to a variable. - **` AssignmentNodeDsl.Variable.assign(value: T)`**: Assigns a value to a variable. ### Inherited Functions - From **`AutomationFlowContributor`**: - `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.BlockedAction --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BlockedAction --- # `BlockedAction` *class BlockedAction : ValidationIssue* The action could impact the safety, security, or privacy of a household. ### Constructor ```kotlin BlockedAction( node: Node, severity: ValidationIssueSeverity, entityType: String, actionType: String ) ``` ### Properties - **`actionType: String`**: The action type. - **`entityType: String`**: The entity type. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`**: The type of the validation issue. - **`node: Node`**: The node for which validation is failing. - **`severity: ValidationIssueSeverity`**: The severity of the validation issue. --- package: com.google.home.automation.GetDevicesOfType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/GetDevicesOfType --- # `GetDevicesOfType` *class GetDevicesOfType : ExpressionWithId* An expression to get devices of a specific type from a structure or room. ### Properties - **`deviceType: Expression`**: The device type to filter by. - **`from: Expression`**: The structure (or room) to get devices from. --- package: com.google.home.automation.AutomationTooLarge --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationTooLarge --- # `AutomationTooLarge` *class AutomationTooLarge : ValidationIssue* The automation's serialized form is larger than the allowed limit. ### Constructor ```kotlin AutomationTooLarge( node: Node, severity: ValidationIssueSeverity, byteCount: Long, byteCountLimit: Long ) ``` ### Properties - **`byteCount: Long`**: The size of the serialized automation in bytes. - **`byteCountLimit: Long`**: The maximum allowed size in bytes. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`**: The type of the validation issue. - **`node: Node`**: The node for which validation is failing. - **`severity: ValidationIssueSeverity`**: The severity of the validation issue. --- package: com.google.home.automation.EventCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/EventCandidate --- # `EventCandidate` *class EventCandidate : StarterCandidate* Represents an automation candidate node corresponding to an event, used in starters. ### Constructor ```kotlin EventCandidate( entity: HasId, types: List>, trait: TraitFactory, fields: Map, fieldDetailsMap: Map, unsupportedReasons: List, eventId: String, eventFactory: EventFactory ) ``` ### Properties - **`entity: HasId`** - **`eventFactory: EventFactory`** - **`eventId: String`** (Deprecated: Use `eventFactory` instead) - **`fieldDetailsMap: Map`** - **`fields: Map`** (Deprecated: Use `fieldDetailsMap` instead) - **`trait: TraitFactory`** - **`types: List>`** - **`unsupportedReasons: List`** ### Public Functions - `equals(other: Any?): Boolean` - `hashCode(): Int` - `toString(): String` --- package: com.google.home.automation.HasCandidates --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/HasCandidates --- # `HasCandidates` *interface HasCandidates* Interface that provides discovery functions for automation candidates. **Known direct subclasses**: `HomeDevice`, `Room`, `Structure` ### Public Functions - **`allCandidates(): Flow>`**: Returns all automation `NodeCandidate` instances for the receiver and its child objects. - **`candidates(): Flow>`**: Returns all automation `NodeCandidate` instances for the receiver. --- package: com.google.home.automation.ActionBehavior --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBehavior --- # `ActionBehavior` *interface ActionBehavior* Represents the behavior of an action. **Known direct subclasses**: - **`Command`**: A trait command used in an automation `Action`. - **`UnknownCommand`**: Represents an unknown Command. - **`Update`**: Trait attribute update used in an automation action. --- package: com.google.home.automation.FieldSelect --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldSelect --- # `FieldSelect` *class FieldSelect : ExpressionWithId* Selects one or more fields from a struct. ### Properties - **`from: Expression`**: The struct expression to select from. - **`selected: List`**: The list of fields to be selected. --- package: com.google.home.automation.ActionBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionBuilder --- # `ActionBuilder` *@AutomationDsl class ActionBuilder* Type-safe builder that builds an `Action` node. ### Constructor ```kotlin ActionBuilder( entity: HasId? = null, deviceType: DeviceTypeFactory? = null, entityExpression: Expression ) ``` ### Properties - **`actionBehavior: ActionBehavior`**: The behavior (command or update) of the action. - **`deviceType: DeviceTypeFactory?`**: The `DeviceType` associated with the `Action`. - **`entity: HasId?`**: The unique ID of the entity associated with the `Action`. - **`entityExpression: Expression`**: The entity `Expression` associated with the `Action`. ### Public Functions - **`build(): Action`**: Builds the `Action` instance. - **`command(command: Command)`**: Sets the action's behavior to a `Command`. - **` update(trait: TraitFactory, block: Updater.() -> Unit)`**: Builds an `Update` behavior from an `Updater`. --- package: com.google.home.automation.BaseAutomation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseAutomation --- # `BaseAutomation` *interface BaseAutomation* A common interface for `Automation` and `DraftAutomation`. **Known direct subclasses**: `Automation`, `MutableAutomation` ### Properties - **`automationGraph: SequentialFlow?`**: List of `Node` instances that execute sequentially by default. - **`description: String`**: Description of this automation instance. - **`isActive: Boolean`**: Whether the automation can execute. - **`name: String`**: User-given name for the automation. --- package: com.google.home.automation.ListMap --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListMap --- # `ListMap` *class ListMap : Comprehension* Represents the map operation on a list expression. ### Inherited Properties from `Comprehension` - **`lambdaBody: Expression`** - **`lambdaVar: ReferenceDeclaration`** - **`rangeExpression: Expression`** --- package: com.google.home.automation.UnaryExpression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnaryExpression --- # `UnaryExpression` *sealed class UnaryExpression : ExpressionWithId* Represents a unary expression with one operand: "`operator` `operand`". **Known direct subclasses**: `Not` ### Protected Constructors ```kotlin protected UnaryExpression(operand: Expression) protected UnaryExpression(operand: Expression, expressionId: String) ``` ### Public Properties - **`operand: Expression`**: The operand. --- package: com.google.home.automation.Assignment --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Assignment --- # `Assignment` *class Assignment : Node, HasOutput* A node that assigns a value or an expression's result to a variable. ### Properties - **`expression: Expression`**: An expression that is evaluated and assigned to the variable. - **`output: String`**: The unique ID for the `Assignment` node output (the variable name). ### Inherited Properties from `Node` - **`nodeId: String?`**: String identifier of this node. --- package: com.google.home.automation.AutomationFlowBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowBuilder --- # `AutomationFlowBuilder` *interface AutomationFlowBuilder : AutomationFlowContributor* Interface to build an automation flow. **Known direct subclasses**: `ParallelFlowBuilder`, `SelectFlowBuilder`, `SequentialFlowBuilder` ### Public Functions - **`nodes(): List`**: Returns the list of nodes in the flow. ### Inherited Functions - From **`AutomationFlowContributor`**: - `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.BooleanConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BooleanConstraint --- # `BooleanConstraint` *class BooleanConstraint : Constraint* Constrains a field to boolean values. ### Constructor ```kotlin BooleanConstraint() ``` --- package: com.google.home.automation.CommandCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/CommandCandidate --- # `CommandCandidate` *class CommandCandidate : ActionCandidate* Represents an automation candidate node corresponding to a command, used in actions. ### Constructor ```kotlin CommandCandidate( entity: HasId, types: List>, trait: TraitFactory, fields: Map, fieldDetailsMap: Map, unsupportedReasons: List, commandId: String, commandDescriptor: CommandDescriptor ) ``` ### Properties - **`commandDescriptor: CommandDescriptor`** - **`commandId: String`** (Deprecated: Use `commandDescriptor` instead) - **`entity: HasId`** - **`fieldDetailsMap: Map`** - **`fields: Map`** (Deprecated: Use `fieldDetailsMap` instead) - **`trait: TraitFactory`** - **`types: List>`** - **`unsupportedReasons: List`** ### Public Functions - `equals(other: Any?): Boolean` - `hashCode(): Int` - `toString(): String` --- package: com.google.home.automation.And --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/And --- # `And` *class And : BinaryExpression* The logical AND operator. Example: `val x = And(true, true)` ### Inherited Properties from `BinaryExpression` - **`operand1: Expression`** - **`operand2: Expression`** --- package: com.google.home.automation.Node --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Node --- # `Node` *sealed class Node* An Automation node, the basic building block of an automation graph. **Known direct subclasses**: - `Action` - `Assignment` - `Condition` - `Delay` - `ManualStarter` - `ParallelFlow` - `SelectFlow` - `SequentialFlow` - `Starter` - `StateReader` - `Suppression` - `UnknownNode` ### Protected Constructors ```kotlin protected Node() protected Node(nodeId: String?) ``` ### Public Properties - **`nodeId: String?`**: A unique string identifier for this node within a single automation graph. --- package: com.google.home.automation.InvalidArgumentsForOperator --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidArgumentsForOperator --- # `InvalidArgumentsForOperator` *class InvalidArgumentsForOperator : ValidationIssue* Indicates that the arguments supplied to an operator are of the wrong type. ### Constructor ```kotlin InvalidArgumentsForOperator( node: Node, severity: ValidationIssueSeverity, expression: Expression?, operator: String, actual: List, candidates: List> ) ``` ### Properties - **`actual: List`**: List of supplied argument types. - **`candidates: List>`**: List of allowed argument type combinations. - **`expression: Expression?`**: The expression with the invalid operator. - **`operator: String`**: The operator. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`** - **`node: Node`** - **`severity: ValidationIssueSeverity`** --- package: com.google.home.automation.ActionCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionCandidate --- # `ActionCandidate` *interface ActionCandidate : NodeCandidate* An interface that all `ActionCandidate` types should implement. **Known direct subclasses**: - `CommandCandidate` - `TraitAttributesCandidate` ### Inherited Properties from `NodeCandidate` - **`entity: HasId`** - **`fieldDetailsMap: Map`** - **`fields: Map`** (Deprecated: Use `fieldDetailsMap` instead) - **`trait: TraitFactory`** - **`types: List>`** - **`unsupportedReasons: List`** --- package: com.google.home.automation.ConstraintUnit --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit --- # `ConstraintUnit` *class ConstraintUnit* Represents a unit of measurement, consisting of a base unit and a scale multiplier. ### Constructor ```kotlin ConstraintUnit(baseUnit: BaseUnit, scale: Number) ``` ### Properties - **`baseUnit: BaseUnit`**: The base unit. - **`scale: Number`**: The multiplier used to derive a value in the `baseUnit`. --- package: com.google.home.automation.NodeCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/NodeCandidate --- # `NodeCandidate` *interface NodeCandidate* The base interface that every automation candidate should implement. **Known subclasses**: - **Direct**: `ActionCandidate`, `StarterCandidate`, `StateReaderCandidate` - **Indirect**: `CommandCandidate`, `EventCandidate`, `TraitAttributesCandidate` ### Properties - **`entity: HasId`** - **`fieldDetailsMap: Map`** - **`fields: Map`** (Deprecated: Use `fieldDetailsMap` instead) - **`trait: TraitFactory`** - **`types: List>`** - **`unsupportedReasons: List`** --- package: com.google.home.automation.UnknownDeviceType.UnknownDeviceTypeFactory --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownDeviceType.UnknownDeviceTypeFactory --- # `UnknownDeviceType.UnknownDeviceTypeFactory` *class UnknownDeviceType.UnknownDeviceTypeFactory : DeviceTypeFactory* A factory for creating `UnknownDeviceType` instances. ### Constructor ```kotlin UnknownDeviceTypeFactory(id: String) ``` ### Properties - **`id: String`** ### Public Functions - `equals(other: Any?): Boolean` ### Inherited Properties - From **`DeviceTypeFactory`**: - `factory: InternalDeviceTypeFactory` --- package: com.google.home.automation.UnknownTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownTrait --- # `UnknownTrait` *class UnknownTrait : Trait* Represents an unknown Trait. ### Nested Types - **`class UnknownTrait.UnknownTraitFactory : TraitFactory`** ### Constructor ```kotlin UnknownTrait(id: String) ``` ### Properties - **`factory: TraitFactory`** - **`id: String`** - **`metadata: Trait.TraitMetadata`** --- package: com.google.home.automation.InvalidValue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidValue --- # `InvalidValue` *class InvalidValue : ValidationIssue* The value provided in an expression is invalid. ### Constructor ```kotlin InvalidValue( node: Node, severity: ValidationIssueSeverity, expression: Expression?, value: Any? ) ``` ### Properties - **`expression: Expression?`**: The expression containing the invalid value. - **`value: Any?`**: The invalid value. ### Inherited Properties from `ValidationIssue` - **`issueType: ValidationIssueType`**: The type of the validation issue. - **`node: Node`**: The node for which validation is failing. - **`severity: ValidationIssueSeverity`**: The severity of the validation issue. --- package: com.google.home.automation.Between --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Between --- # Between `class Between : TernaryExpression` The between operator, which evaluates to `true` when `operand1` is between `operand2` and `operand3`. ### Inherited Properties * `operand1: Expression` * `operand2: Expression` * `operand3: Expression` --- package: com.google.home.automation.MutableAutomation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MutableAutomation --- # MutableAutomation `interface MutableAutomation : Automation` Mutable attributes for an `Automation`. ### Properties * `automationGraph: SequentialFlow?` - The node instances that implement the logic of the automation. * `description: String` - The description of the automation. * `isActive: Boolean` - Whether the automation can execute. * `maxExecutionCount: Int?` - The max execution count of the automation. Only applicable to ephemeral automations. * `name: String` - The name of the automation. ### Inherited Functions * `suspend fun execute(): Unit` - Execute the automation. * `suspend fun stop(): Unit` - Stop the automation. * `suspend fun update(optimisticReturn: (Automation) -> Unit, init: MutableAutomation.() -> Unit): Automation` - Creates a mutable copy, mutates it, saves it, and returns a new immutable copy. ### Inherited Properties * `compatibleWithSdk: Boolean` - Whether the underlying automation data is compatible with the current SDK. * `isRunning: Boolean` - Whether the automation is currently running. * `isValid: Boolean` - Indicates whether or not the automation is valid. * `manuallyExecutable: Boolean` - Whether the automation can be manually executed via `execute()`. * `validationIssues: List` - List of automation graph compilation validation issues. * `id: Id` - Opaque ID for the object. --- package: com.google.home.automation.TooManyNodes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TooManyNodes --- # TooManyNodes `class TooManyNodes : ValidationIssue` The automation has more nodes than allowed by the abuse prevention config for the calling application. ### Constructor * `TooManyNodes(node: Node, severity: ValidationIssueSeverity, nodeCount: Int, nodeCountLimit: Int)` ### Properties * `nodeCount: Int` * `nodeCountLimit: Int` ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.UnknownEntity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEntity --- # UnknownEntity `class UnknownEntity : HasId` An unrecognized entity. ### Constructor * `UnknownEntity(id: Id = Id(""))` - Create an `UnknownEntity` instance. ### Functions * `open fun toString(): String` ### Properties * `open val id: Id` - The unique ID for the `UnknownEntity`. --- package: com.google.home.automation.GreaterThan --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThan --- # GreaterThan `class GreaterThan : BinaryExpression` The greater-than operator, which evaluates to `true` when `operand1` > `operand2`. ### Inherited Properties * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.Equals --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Equals --- # Equals `class Equals : BinaryExpression` The equality operator, which evaluates to `true` when `operand1` equals `operand2`. ### Inherited Properties * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.MapFilter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MapFilter --- # MapFilter `class MapFilter : ExpressionWithId` Represents the "filter" operation on a map expression. ### Properties * `lambdaBody: Expression` * `lambdaVarK: ReferenceDeclaration` * `lambdaVarV: ReferenceDeclaration` * `mapExpression: Expression` --- package: com.google.home.automation.SelectFlow --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SelectFlow --- # SelectFlow `class SelectFlow : Node` A `Node` that, when it contains more than one `Node`, allows only one `Node` to execute. ### Constructor * `SelectFlow(nodes: List)` - Create a `SelectFlow` instance from a list of nodes. ### Properties * `nodes: List` - The `Node` instances within the `SelectFlow`. ### Inherited Properties * `nodeId: String?` - String identifier of this node. --- package: com.google.home.automation.InvalidArgumentCount --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidArgumentCount --- # InvalidArgumentCount `class InvalidArgumentCount : ValidationIssue` The expression has an invalid argument count. ### Constructor * `InvalidArgumentCount(node: Node, severity: ValidationIssueSeverity, expression: Expression?, operator: String, minOperands: Int, maxOperands: Int)` ### Properties * `expression: Expression?` - The expression. * `maxOperands: Int` - The maximum operands. * `minOperands: Int` - The minimum operands. * `operator: String` - The operator. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.Minus --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Minus --- # Minus `class Minus : BinaryExpression` The MINUS operator, which calculates `operand1 - operand2`. ### Inherited Properties * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.FieldDetails --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails --- # FieldDetails `sealed class FieldDetails` Describes a Field with additional details, in addition to information from interface `Field`. ### Known Subclasses * `AttributeDetails`: Metadata pertaining to a trait attribute. * `CommandFieldDetails`: A parameter belonging to a `Command`. * `EventFieldDetails`: A field that belongs to an Event. ### Protected Constructor * `FieldDetails(name: String, isOptional: Boolean, constraint: Constraint?, field: Field)` ### Properties * `constraint: Constraint?` * `field: Field` * `isOptional: Boolean` * `name: String` - **Deprecated**: Use `field.toString()` instead. --- package: com.google.home.automation.UnknownIssue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownIssue --- # UnknownIssue `class UnknownIssue : ValidationIssue` Default validation issue type. Used when the specific issue type has not been implemented. ### Constructor * `UnknownIssue(node: Node, severity: ValidationIssueSeverity, issueType: ValidationIssueType = ValidationIssueType.Unknown, detail: String)` ### Properties * `detail: String` - Details about the issue. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.Expression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression --- # Expression `interface Expression` An expression which evaluates to a value. This can be a literal, logical, comparison, or arithmetic expression. ### Known Direct Subclasses * `Constant`: Represents a constant. * `ExpressionWithId`: Represents an expression with random UUID. * `Reference`: Represents a reference to a previously defined node or list element. ### Known Indirect Subclasses * `And`, `Between`, `BetweenTimes`, `BinaryExpression`, `Comprehension`, `Divide`, `Equals`, `FieldSelect`, `GetDevicesOfType`, `GreaterThan`, `GreaterThanOrEquals`, `LessThan`, `LessThanOrEquals`, `ListAllMatch`, `ListAnyMatch`, `ListContains`, `ListFilter`, `ListGet`, `ListIn`, `ListMap`, `ListNoneMatch`, `ListSize`, `MapFilter`, `MapKeys`, `MapSize`, `MapValues`, `Minus`, `Multiply`, `Not`, `NotEquals`, `Or`, `Plus`, `TernaryExpression`, `UnaryExpression`, `UnknownExpression` --- package: com.google.home.automation.MissingPresenceSensingSetup --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingPresenceSensingSetup --- # MissingPresenceSensingSetup `class MissingPresenceSensingSetup : UnsupportedCandidateReason` Candidate is not supported due to missing presence sensing setup. ### Nested Types * `enum SetupType : Enum` - Type of presence sensing setup that is missing. ### Constructor * `MissingPresenceSensingSetup(type: MissingPresenceSensingSetup.SetupType = SetupType.UNSPECIFIED, reason: String = "MISSING_PRESENCE_SENSING_SETUP")` ### Functions * `open operator fun equals(other: Any?): Boolean` * `open fun hashCode(): Int` * `open fun toString(): String` ### Properties * `open val reason: String` * `val type: MissingPresenceSensingSetup.SetupType` --- package: com.google.home.automation.MisplacedStarterNode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MisplacedStarterNode --- # MisplacedStarterNode `class MisplacedStarterNode : ValidationIssue` The starter node must be the first node in an automation or in a select flow. ### Constructor * `MisplacedStarterNode(node: Node, severity: ValidationIssueSeverity)` ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.NumberRangeConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberRangeConstraint --- # NumberRangeConstraint `class NumberRangeConstraint : Constraint` Represents a range of numbers. ### Constructor * ` NumberRangeConstraint(lowerBound: T, upperBound: T, step: T, unit: ConstraintUnit?)` ### Properties * `lowerBound: T` - The lower bound of this number range. * `upperBound: T` - The upper bound of this number range. * `step: T` - The mathematical difference between each member of the number range. * `unit: ConstraintUnit?` - The measurement unit associated with the number range. --- package: com.google.home.automation.UnsupportedEntityTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityTrait --- # UnsupportedEntityTrait `class UnsupportedEntityTrait : ValidationIssue` The trait is not supported by the entity. ### Constructor * `UnsupportedEntityTrait(node: Node, severity: ValidationIssueSeverity, traitId: String, entityId: String, entityType: String, unsupportedReasons: List)` ### Properties * `entityId: String` - The unique ID of the entity. * `entityType: String` - The type of the entity. * `traitId: String` - The unique ID of the trait. * `unsupportedReasons: List` - List of reasons why the trait is not supported. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.InvalidNullParameterValue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidNullParameterValue --- # InvalidNullParameterValue `class InvalidNullParameterValue : ValidationIssue` The parameter value must not be null. ### Constructor * `InvalidNullParameterValue(node: Node, severity: ValidationIssueSeverity, id: Int? = null, name: String? = null, expected: String)` ### Properties * `expected: String` - The expected parameter type. * `id: Int?` - The unique ID of the parameter. * `name: String?` - The name of the parameter. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.Update --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Update --- # Update `class Update : ActionBehavior` Trait attribute update used in automation action. ### Constructor * `Update(trait: TraitFactory, updatedAttributes: Map = emptyMap())` ### Properties * `trait: TraitFactory` - The trait to update. * `traitId: String` * `updatedAttributes: Map` - Key-value pairs representing the attributes to update. --- package: com.google.home.automation.TypedExpression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression --- # TypedExpression `abstract class TypedExpression` An expression with an associated type: T. ### Known Subclasses * `AssignmentNodeDsl.Variable` ### Extension Properties * `val TypedExpression?>.size: TypedExpression` - Performs the `Size` operation on a list. ### Extension Functions * `infix fun TypedExpression.and(other: TypedExpression): TypedExpression` - Allows infix `And` operator. * `infix fun TypedExpression.or(other: TypedExpression): TypedExpression` - Allows infix `Or` operator. * A large number of `div`, `minus`, `plus`, `times` operator overloads for numeric and time-based `TypedExpression`s. * A large number of `between` function overloads for `Comparable` and time-based `TypedExpression`s. * `equals`, `greaterThan`, `greaterThanOrEquals`, `lessThan`, `lessThanOrEquals`, `notEquals` infix function overloads for `Comparable` and generic `TypedExpression`s. * `fun TypedExpression>.getDevicesOfType(deviceType: DeviceTypeFactory?): TypedExpression>>` - Returns devices of a given type under a structure. * `fun TypedExpression>.getDevicesOfType(deviceType: DeviceTypeFactory?): TypedExpression>>` - Returns devices of a given type under a room. * `infix fun TypedExpression?>.all(body: (TypedExpression) -> TypedExpression): TypedExpression` - All match operation on a list. * `infix fun TypedExpression?>.any(body: (TypedExpression) -> TypedExpression): TypedExpression` - Any match operation on a list. * `infix fun TypedExpression?>.contains(constant: T): TypedExpression` - `Contains` operation on a list with a constant. * `infix fun TypedExpression?>.contains(element: TypedExpression): TypedExpression` - `Contains` operation on a list with an expression. * `infix fun TypedExpression?>.filter(body: (TypedExpression) -> TypedExpression): TypedExpression?>` - Filter operation on a list. * `operator fun TypedExpression?>.get(constant: Int): TypedExpression` - `Get` operation on a list with a constant index. * `operator fun TypedExpression?>.get(index: TypedExpression): TypedExpression` - `Get` operation on a list with an expression index. * `infix fun TypedExpression.inList(listExpression: TypedExpression?>): TypedExpression` - `In` operation on an expression list. * `infix fun TypedExpression.inList(list: List): TypedExpression` - `In` operation on a constant list. * `infix fun TypedExpression?>.map(body: (TypedExpression) -> TypedExpression): TypedExpression?>` - Map operation on a list. * `infix fun TypedExpression?>.none(body: (TypedExpression) -> TypedExpression): TypedExpression` - None match operation on a list. * A large number of numeric type conversion functions (`toByte`, `toInt`, `toDouble`, `toUInt`, etc.). --- package: com.google.home.automation.Divide --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Divide --- # Divide `class Divide : BinaryExpression` The DIVIDE operator, which calculates `operand1 / operand2`. ### Inherited Properties * `operand1: Expression` * `operand2: Expression` --- package: com.google.home.automation.StructConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StructConstraint --- # StructConstraint `class StructConstraint : Constraint` Represents constraints on individual fields of a struct. ### Constructor * `StructConstraint(fieldConstraints: Map)` ### Properties * `fieldConstraints: Map` - The constraints on each field. --- package: com.google.home.automation.AutomationBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder --- # AutomationBuilder `@AutomationDsl class AutomationBuilder` Type-safe builder that builds an `Automation` node. ### Constructor * `AutomationBuilder()` ### Properties * `description: String` - The description of the automation. * `isActive: Boolean` - Whether the automation is active. `true` by default. * `isRunning: Boolean` - Whether the automation is running. `false` by default. * `name: String` - The name of the automation, must be specified and not empty. ### Functions * `fun build(): BaseAutomation` - Build an `Automation`. * `fun description(description: String): () -> Unit` - Set the description. * `fun isActive(isActive: Boolean): () -> Unit` - Set the `isActive` flag. * `fun maxExecutionCount(maxExecutionCount: Int?): () -> Unit` - Set the `maxExecutionCount` value. * `fun name(name: String): Unit` - Set the name. * `fun sequential(block: SequentialFlowBuilder.() -> Unit): Unit` - Build and add a `sequentialFlow`. * `fun sequential(sequentialFlow: SequentialFlow): Unit` - Set the `sequentialFlow`. --- package: com.google.home.automation.InvalidEntity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidEntity --- # InvalidEntity `class InvalidEntity : ValidationIssue` The Entity (ID or name) does not exist or belong to the user. ### Constructor * `InvalidEntity(node: Node, severity: ValidationIssueSeverity, entity: UnknownEntity, entityType: String)` ### Properties * `entity: UnknownEntity` - The entity. * `entityType: String` - The type of the entity. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.InvalidField --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidField --- # InvalidField `class InvalidField : ValidationIssue` The FIELD_SELECT expression uses an invalid field. ### Constructor * `InvalidField(node: Node, severity: ValidationIssueSeverity, expression: Expression?, id: Int? = null, name: String? = null, operandIndex: Int)` ### Properties * `expression: Expression?` - The expression. * `id: Int?` - The unique ID of the field. * `name: String?` - The name of the field. * `operandIndex: Int` - The index of the operand in the expression. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.UnsupportedSubNodeType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedSubNodeType --- # UnsupportedSubNodeType `class UnsupportedSubNodeType : ValidationIssue` The sub-node type is not allowed inside the parent node. ### Constructor * `UnsupportedSubNodeType(node: Node, severity: ValidationIssueSeverity, parentNodeType: String, subNodeType: String)` ### Properties * `parentNodeType: String` - The parent node type. * `subNodeType: String` - The sub node type. ### Inherited Properties * `issueType: ValidationIssueType` - The type of the validation issue. * `node: Node` - The node for which validation is failing. * `severity: ValidationIssueSeverity` - The severity of the validation issue. --- package: com.google.home.automation.StringConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StringConstraint --- # StringConstraint `class StringConstraint : Constraint` Represents string constraints, including constraints on length, and specific allowed and disallowed values. ### Constants * `MAX_STRING_LENGTH: Int = 256` * `MIN_STRING_LENGTH: Int = 0` ### Constructors * `StringConstraint(allowedSet: Set, isCaseSensitive: Boolean = false)` * `StringConstraint(disallowedSet: Set, minLength: Int = MIN_STRING_LENGTH, maxLength: Int = MAX_STRING_LENGTH, isCaseSensitive: Boolean = false, regex: Regex? = null)` ### Properties * `allowedSet: Set?` * `disallowedSet: Set` * `isCaseSensitive: Boolean` * `maxLength: Int` * `minLength: Int` * `regex: Regex?` --- package: com.google.home.automation.ListNoneMatch --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListNoneMatch --- # ListNoneMatch `class ListNoneMatch : Comprehension` Represents the "none match" operation on a list expression. ### Inherited Properties * `lambdaBody: Expression` * `lambdaVar: ReferenceDeclaration` * `rangeExpression: Expression` --- package: com.google.home.automation.Parameter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Parameter --- # Parameter `class Parameter` A command parameter. ### Constructor * `Parameter(param: Pair)` ### Properties * `param: Pair` - The parameter, composed of a parameter field and value. --- package: com.google.home.automation.UnsupportedCandidateReason --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedCandidateReason --- # UnsupportedCandidateReason `interface UnsupportedCandidateReason` Reasons why a candidate node is not supported. ### Known Subclasses * `MissingPresenceSensingSetup` * `MissingStructureAddressSetup` * `MissingSubscription` * `UnknownUnsupportedCandidateReason` ### Properties * `reason: String` --- package: com.google.home.automation.JoinSemanticType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/JoinSemanticType --- # enum JoinSemanticType : Enum Ways of coordinating the execution of multiple concurrent operations. ### Enum Values - **`JsUnspecified`**: Unspecified. - **`JsWhenAllFinished`**: Once all the nodes within the execution paths in a `ParallelFlow` node finish executing, the node that follows this ParallelFlow node is executed. ### Functions - **`valueOf(value: String): JoinSemanticType`**: Returns the enum constant of this type with the specified name. - **Throws**: `kotlin.IllegalArgumentException` if this enum type has no constant with the specified name. - **`values(): Array`**: Returns an array containing the constants of this enum type, in the order they're declared. --- package: com.google.home.automation.ListContains --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListContains --- # class ListContains : ExpressionWithId Represents the "contains" operation on a list expression. ### Properties - **`element: Expression`** - **`listExpression: Expression`** --- package: com.google.home.automation.ConditionNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConditionNodeDsl --- # interface ConditionNodeDsl : AutomationFlowContributor Interface for constructing `Condition` nodes and contributing them to an automation flow. **Known direct subclasses:** `SequentialFlowBuilder` ### Functions - **`condition(block: ConditionBuilder.() -> Unit): Unit`** ### Inherited Functions - From `AutomationFlowContributor`: **`flowBuilder(): AutomationFlowBuilder`** --- package: com.google.home.automation.OutputNotAccessible --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/OutputNotAccessible --- # class OutputNotAccessible : ValidationIssue An output reference is not accessible. ### Constructors - **`OutputNotAccessible(node: Node, severity: ValidationIssueSeverity, output: String)`** ### Properties - **`output: String`**: The output. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.Starter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Starter --- # class Starter : Node, HasOutput Defines the initial triggers that activate an automation, such as a change to a trait. Either `trait` or `event` must be set. ### Constructors - **`Starter(entityExpression: Expression, trait: TraitFactory, output: String)`**: Create a `Starter` from an entity expression, a `DeviceType`, and a `Trait`. - **`Starter(entityExpression: Expression, event: EventFactory, parameters: List, output: String)`**: Create a `Starter` from an entity expression, a `DeviceType`, and an `Event`. - **`Starter(entity: HasId, deviceType: DeviceTypeFactory?, trait: TraitFactory, output: String)`**: Create a `Starter` from an entity, a `DeviceType`, and a `Trait`. - **`Starter(entity: HasId, deviceType: DeviceTypeFactory?, event: EventFactory, parameters: List, output: String)`**: Create a `Starter` from an entity, a `DeviceType`, and an `Event`. ### Properties - **`deviceType: DeviceTypeFactory?`**: The device type associated with this `Starter`. - **`entity: HasId?`**: The unique ID for the entity associated with the `Starter`. - **`entityExpression: Expression`**: An expression that selects an entity or a list of entity associated with the `Starter` at runtime. - **`event: EventFactory?`**: The `Event` associated with this `Starter`. - **`output: String`**: The output. - **`parameters: List`**: The Parameters for the `Event` associated with this `Starter`. - **`trait: TraitFactory?`**: The `Trait` associated with this `Starter`. - **`traitId: String`**: The ID for the `Trait` associated with this `Starter`. ### Inherited Properties - From `Node`: `nodeId: String?` --- package: com.google.home.automation.StarterNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StarterNodeDsl --- # interface StarterNodeDsl : AutomationFlowContributor Interface for constructing `Starter` nodes and adding them to an automation flow. **Known direct subclasses:** `SelectFlowBuilder`, `SequentialFlowBuilder` ### Functions - **` starter(entityExpression: TypedExpression?>, event: EventFactory): TypedExpression`**: From an `Expression` of `Entity` and an `Event`. - **` starter(entityExpression: TypedExpression>?>, event: EventFactory): TypedExpression`**: From an `Expression` of `Entity` list and an `Event`. - **` starter(entityExpression: TypedExpression?>, trait: TraitFactory): TypedExpression`**: From an `Expression` of `Entity` and a `Trait`. - **` starter(entityExpression: TypedExpression>?>, trait: TraitFactory): TypedExpression`**: From an `Expression` of `Entity` list and a `Trait`. - **` starter(structure: Structure, event: EventFactory): TypedExpression`**: From a `Structure` and an `Event`. - **` starter(structure: Structure, trait: TraitFactory): TypedExpression`**: From a `Structure` and a `Trait`. - **` starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory): TypedExpression`**: From a Device and an `Event`. - **` starter(device: HomeDevice, deviceType: DeviceTypeFactory, trait: TraitFactory): TypedExpression`**: From a Device and a `Trait`. - **` starter(entityExpression: TypedExpression?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`**: From an `Expression` of `Entity` and a `Trait` with parameters. - **` starter(entityExpression: TypedExpression>?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`**: From an `Expression` of `Entity` list and a `Trait` with parameters. - **` starter(structure: Structure, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`**: From a `Structure` and an `Event` with parameters. - **` starter(unknownEntity: UnknownEntity, entityType: TypeFactory, event: EventFactory): TypedExpression`**: From an UnknownEntity and an `Event`. - **` starter(unknownEntity: UnknownEntity, entityType: TypeFactory, trait: TraitFactory): TypedExpression`**: From an UnknownEntity and a `Trait`. - **` starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`**: From a Device and a `Trait` with parameters. - **` starter(unknownEntity: UnknownEntity, deviceType: DeviceTypeFactory, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`**: From an `UnknownEntity` and an `Event` with parameters. ### Inherited Functions - From `AutomationFlowContributor`: **`flowBuilder(): AutomationFlowBuilder`** --- package: com.google.home.automation.UnknownField --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownField --- # class UnknownField : Field Represents an unknown field, which can be an attribute, or parameter, or a field in a struct, etc. ### Constructors - **`UnknownField(tag: UInt)`** ### Properties - **`descriptor: NoOpDescriptor`** - **`fieldName: String`** - **`tag: UInt`** - **`typeEnum: Type`** - **`typeName: String`** --- package: com.google.home.automation.BetweenTimes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BetweenTimes --- # class BetweenTimes : TernaryExpression The between times operator, which evaluates to `true` when `operand1` is between `operand2` and `operand3`. `val x = Between(LocalTime.of(10, 0), LocalTime.of(8, 0), LocalTime.of(12, 0))` ### Inherited Properties - From `TernaryExpression`: `operand1: Expression`, `operand2: Expression`, `operand3: Expression` --- package: com.google.home.automation.SequentialFlow --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow --- # class SequentialFlow : Node A set of one or more Automation nodes that execute sequentially. ### Constructors - **`SequentialFlow(nodes: List)`**: Create a `SequentialFlow` instance from a list of nodes. ### Properties - **`nodes: List`**: The `Node` instances within the `SequentialFlow`. ### Inherited Properties - From `Node`: `nodeId: String?` --- package: com.google.home.automation.UnsupportedStateReaderBehavior --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedStateReaderBehavior --- # class UnsupportedStateReaderBehavior : ValidationIssue The entity behavior type is not supported by the state reader node. ### Constructors - **`UnsupportedStateReaderBehavior(node: Node, severity: ValidationIssueSeverity, behaviorType: String)`** ### Properties - **`behaviorType: String`**: The behavior type. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.AttributeToUpdate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeToUpdate --- # class AttributeToUpdate Represents a single attribute to update. ### Constructors - **`AttributeToUpdate(fieldIdentifier: Field, newValue: Any?)`** ### Properties - **`fieldIdentifier: Field`**: The field ID. - **`newValue: Any?`**: The new value. --- package: com.google.home.automation.UnsupportedEntityCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityCommand --- # class UnsupportedEntityCommand : ValidationIssue The command is not supported by the entity. ### Constructors - **`UnsupportedEntityCommand(node: Node, severity: ValidationIssueSeverity, commandId: String, entityId: String, entityType: String, unsupportedReasons: List)`** ### Properties - **`commandId: String`**: The unique ID of the command. - **`entityId: String`**: The unique ID of the entity. - **`entityType: String`**: The type of the entity. - **`unsupportedReasons: List`**: List of reasons why the command is not supported. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.ValidationIssueSeverity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ValidationIssueSeverity --- # enum ValidationIssueSeverity : Enum Validation Error Severity Type. ### Enum Values - **`ERROR`**: Error - **`UNKNOWN`**: Unknown severity - **`WARNING`**: Warning ### Functions - **`valueOf(value: String): ValidationIssueSeverity`**: Returns the enum constant of this type with the specified name. - **`values(): Array`**: Returns an array containing the constants of this enum type. --- package: com.google.home.automation.ValidationIssueType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ValidationIssueType --- # enum ValidationIssueType : Enum Validation Issue Type ### Enum Values - **`AutomationTooLarge`**: The automation's serialized form is larger than allowed. - **`BlockedAction`**: The action could impact safety, security, or privacy. - **`ConditionDurationOutOfRange`**: Condition duration is outside the 1-30 minute range. - **`DelayDurationOutOfRange`**: Delay duration is outside the 5 second to 24 hour range. - **`DuplicateStarterNode`**: The `Starter` node listens to the same trait change or event as other `Starter` nodes. - **`InvalidArgumentCount`**: The expression contains an invalid number of arguments. - **`InvalidArgumentsForOperator`**: The arguments for the operator are not valid. - **`InvalidCommand`**: The command ID is not found in the event schema. - **`InvalidConditionType`**: The condition must evaluate to a boolean value. - **`InvalidDuration`**: The `seconds` or `nanos` field is out of range. - **`InvalidDurationExpressionType`**: The duration expression type is not valid. - **`InvalidEntity`**: The Entity (ID or name) does not exist or does not belong to the user. - **`InvalidEntityExpressionType`**: The entity expression type is not valid. - **`InvalidEvent`**: The event ID is not found in the event schema. - **`InvalidField`**: The `FIELD_SELECT` expression uses an invalid field. - **`InvalidNullParameterValue`**: The parameter value must not be null. - **`InvalidOperand`**: The expression uses an invalid operand. - **`InvalidParameter`**: The parameter name is not found in the behavior schema. - **`InvalidParameterType`**: The parameter type is not valid. - **`InvalidReference`**: The reference to an output from a preceding node is unknown. - **`InvalidTrait`**: The trait is not found in the event schema. - **`InvalidValue`**: The value is invalid. - **`MisplacedSelectFlow`**: The `Select` flow node must be the first node in an automation. - **`MisplacedStarterNode`**: The `Starter` node must be the first node in an automation or in a `select` flow. - **`MissingRequiredFields`**: The automation graph is missing required field(s). - **`MissingRequiredParameters`**: Required parameters are not set. - **`MissingStarterNode`**: The node cannot be reached without a preceding `Starter` node. - **`MultipleManualStarters`**: The automation has more than one `ManualStarter` node. - **`OutputNotAccessible`**: A reference used an inaccessible output. - **`OutputReinitialized`**: An output variable has been reinitialized in multiple nodes. - **`OutputTypeMismatch`**: An output variable has been defined in multiple nodes with different types. - **`ReadOnlyAttribute`**: The attribute is not modifiable without a command using `write`. - **`SuppressionDurationOutOfRange`**: Suppression duration is outside the 5 second to 24 hour range. - **`TooManyNodes`**: The automation has more nodes than allowed. - **`TooManyOperations`**: The expression has more operations than allowed. - **`Unknown`**: Unknown issue type. - **`UnsubscribableAttribute`**: The attribute is not subscribable and cannot be used in a `Starter` node. - **`UnsupportedActionBehavior`**: The entity behavior type is not supported by the `Action` node. - **`UnsupportedEntityCommand`**: The command is not supported by the entity. - **`UnsupportedEntityEvent`**: The event is not supported by the entity. - **`UnsupportedEntityParameter`**: The parameter is not supported by the entity. - **`UnsupportedEntityParameterValue`**: The parameter value is not supported by the entity. - **`UnsupportedEntityTrait`**: The trait is not supported by the entity. - **`UnsupportedEntityType`**: The entity type is not supported by the entity. - **`UnsupportedNodeOutput`**: This node type does not produce output. - **`UnsupportedOperator`**: The operator is unknown or unspecified. - **`UnsupportedStarterBehavior`**: The entity behavior type is not supported by the `Starter` node. - **`UnsupportedStateReaderBehavior`**: The entity behavior type is not supported by the `StateReader` node. - **`UnsupportedSubNodeType`**: The sub-node type is not allowed inside the parent node. ### Functions - **`valueOf(value: String): ValidationIssueType`**: Returns the enum constant of this type with the specified name. - **`values(): Array`**: Returns an array containing the constants of this enum type. --- package: com.google.home.automation.CommandFieldDetails --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/CommandFieldDetails --- # class CommandFieldDetails : FieldDetails A parameter belonging to a `Command`. ### Constructors - **`CommandFieldDetails(name: String, isOptional: Boolean, constraint: Constraint?, field: Field)`** ### Inherited Properties - From `FieldDetails`: `constraint: Constraint?`, `field: Field`, `isOptional: Boolean`, `name: String` --- package: com.google.home.automation.InvalidEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidEvent --- # class InvalidEvent : ValidationIssue The event ID is not found in the event schema. The optional `expectedBehaviorType` indicates it belongs to other schemas. ### Constructors - **`InvalidEvent(node: Node, severity: ValidationIssueSeverity, eventId: String, expectedBehaviorType: String)`** ### Properties - **`eventId: String`**: The unique ID of the event. - **`expectedBehaviorType: String`**: Description of the expected behavior. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.Reference --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Reference --- # class Reference : Expression Represents a reference to a previously defined node in the automation graph, or an list element for list comprehension expression. ### Constructors - **`Reference(referenceDeclaration: ReferenceDeclaration)`**: Create a `Reference` instance from a `ReferenceDeclaration`. - **`Reference(reference: HasOutput)`**: Create a `Reference` instance. ### Properties - **`reference: HasOutput?`** - **`referenceDeclaration: ReferenceDeclaration?`** --- package: com.google.home.automation.MissingStarterNode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingStarterNode --- # class MissingStarterNode : ValidationIssue The node cannot be reached without a preceding starter node. ### Constructors - **`MissingStarterNode(node: Node, severity: ValidationIssueSeverity)`** ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.UnknownExpression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownExpression --- # class UnknownExpression : ExpressionWithId Represents an unknown expression. This is created when the AutomationConverter fails to convert an expression, operand, or list comprehension. --- package: com.google.home.automation.ListConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListConstraint --- # class ListConstraint : Constraint Represents constraints on elements of a list. ### Constructors - **`ListConstraint(elementConstraint: Constraint)`** ### Properties - **`elementConstraint: Constraint`**: The allowed values for each element of the list. --- package: com.google.home.automation.UnknownEvent.UnknownEventFactory --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEvent.UnknownEventFactory --- # class UnknownEvent.UnknownEventFactory : EventFactory ### Constructors - **`UnknownEventFactory(id: String)`** ### Functions - **`equals(other: Any?): operator Boolean`** - **`hashCode(): Int`** ### Properties - **`id: String`** ### Inherited Properties - From `EventFactory`: `factory: InternalEventFactory` --- package: com.google.home.automation.AutomationDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationDsl --- # @DslMarker annotation AutomationDsl ### Constructors - **`AutomationDsl()`** --- package: com.google.home.automation.UnknownNode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownNode --- # class UnknownNode : Node An unknown node type converted from ADM proto. Cannot be constructed by clients. ### Inherited Properties - From `Node`: `nodeId: String?` --- package: com.google.home.automation.Delay --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Delay --- # class Delay : Node A `Node` that provides the ability to pause for a specified amount of time. ### Constructors - **`Delay(duration: Duration)`**: The duration may be as short as five seconds or as long as 24 hours. ### Properties - **`duration: Duration`**: How long the delay lasts. ### Inherited Properties - From `Node`: `nodeId: String?` --- package: com.google.home.automation.InvalidDuration --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidDuration --- # class InvalidDuration : ValidationIssue The duration is invalid. ### Constructors - **`InvalidDuration(node: Node, severity: ValidationIssueSeverity, duration: Duration)`** ### Properties - **`duration: Duration`**: The duration. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.SequentialDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialDsl --- # interface SequentialDsl : AutomationFlowContributor Interface for constructing Sequential nodes and contributing them to an automation flow. For example this can be used to construct and add a sequential node inside a select flow. **Known direct subclasses:** `ParallelFlowBuilder`, `SelectFlowBuilder` ### Functions - **`sequential(block: SequentialFlowBuilder.() -> Unit): Unit`** ### Inherited Functions - From `AutomationFlowContributor`: **`flowBuilder(): AutomationFlowBuilder`** --- package: com.google.home.automation.BitmapConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BitmapConstraint --- # @HomeExperimentalApi class BitmapConstraint : Constraint Represents constraints on a bitmap. ### Constructors - **`BitmapConstraint(combinedBits: List)`** ### Properties - **`combinedBits: List`** --- package: com.google.home.automation.UnsupportedEntityType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityType --- # class UnsupportedEntityType : ValidationIssue The entity type is not supported by the entity. ### Constructors - **`UnsupportedEntityType(node: Node, severity: ValidationIssueSeverity, entityType: String, entityId: String, supportedTypes: List)`** ### Properties - **`entityId: String`**: The unique ID of the entity. - **`entityType: String`**: The entity type. - **`supportedTypes: List`**: List of supported entity types. ### Inherited Properties - From `ValidationIssue`: `issueType: ValidationIssueType`, `node: Node`, `severity: ValidationIssueSeverity` --- package: com.google.home.automation.Suppression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Suppression --- # class Suppression : Node Terminates execution of all the following nodes if the automation is triggered again within the specified time range. ### Constructors - **`Suppression(duration: Duration)`**: The duration may be as short as five seconds or as long as 24 hours. ### Properties - **`duration: Duration`**: How long to ignore starters. ### Inherited Properties - From `Node`: `nodeId: String?` --- package: com.google.home.automation.UnknownTrait.UnknownTraitFactory --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownTrait.UnknownTraitFactory --- # class UnknownTrait.UnknownTraitFactory : TraitFactory ### Constructors - **`UnknownTraitFactory(id: String)`** ### Functions - **`equals(other: Any?): operator Boolean`** - **`hashCode(): Int`** ### Properties - **`id: String`** ### Inherited Properties - From `TraitFactory`: `factory: InternalTraitFactory` --- package: com.google.home.automation.Condition --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Condition --- # Condition `class Condition : Node` A logical state that controls whether an automation that has been triggered by a `Starter` or `StateReader`" should continue or stop executing. ### Public Properties - `val expression: Expression`: The expression that determines whether the condition passes or not. If the expression evaluates to `true`, the condition passes, otherwise, it fails and execution stops. - `val forDuration: Duration?`: How long the condition lasts. The duration may be as short as one minute or as long as 30 minutes. ### Public Functions - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.Node`**: - `val nodeId: String?`: String identifier of this node. --- package: com.google.home.automation.TypedEntity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedEntity --- # TypedEntity `abstract class TypedEntity` An entity with an associated entity type: T. --- package: com.google.home.automation.MisplacedSelectFlow --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MisplacedSelectFlow --- # MisplacedSelectFlow `class MisplacedSelectFlow : ValidationIssue` The select flow node must be the first node in an automation. ### Public Constructors - `MisplacedSelectFlow(node: Node, severity: ValidationIssueSeverity)`: Create an `MisplacedSelectFlow` instance. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.ByteConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ByteConstraint --- # ByteConstraint `class ByteConstraint : Constraint` ### Public Constructors - `ByteConstraint(minLength: UInt?, maxLength: UInt?)` ### Public Properties - `val maxLength: UInt?` - `val minLength: UInt?` --- package: com.google.home.automation.ParallelNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParallelNodeDsl --- # ParallelNodeDsl `interface ParallelNodeDsl : AutomationFlowContributor` Interface for constructing Parallel nodes and contributing them to an automation flow. For example this can be used to construct and add a parallel node inside a sequential flow. ### Known Direct Subclasses - `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions - `open fun parallel(block: ParallelFlowBuilder.() -> Unit): Unit` ### Inherited Functions - **From `com.google.home.automation.AutomationFlowContributor`**: - `fun flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.ListGet --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListGet --- # ListGet `class ListGet : ExpressionWithId` Represents the "get" operation on a list expression. ### Public Properties - `val index: Expression` - `val listExpression: Expression` --- package: com.google.home.automation.EventFieldDetails --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/EventFieldDetails --- # EventFieldDetails `class EventFieldDetails : FieldDetails` A field that belongs to an Event. ### Public Constructors - `EventFieldDetails(name: String, isOptional: Boolean, constraint: Constraint?, field: Field)`: Create an `EventFieldDetails` instance. ### Inherited Properties - **From `com.google.home.automation.FieldDetails`**: - `val constraint: Constraint?` - `val field: Field` - `val isOptional: Boolean` - `val name: String`: **This property is deprecated.** Use field.toString() instead --- package: com.google.home.automation.UnknownEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEvent --- # UnknownEvent `class UnknownEvent : Event` Represents an unknown Event. ### Nested Types - `class UnknownEvent.UnknownEventFactory : EventFactory` ### Public Constructors - `UnknownEvent(eventId: Id, eventName: String, timestamp: Instant, eventImportance: EventImportance, eventNumber: ULong)` ### Public Properties - `open val eventId: Id`: ID of the Event. - `open val eventImportance: EventImportance`: Importance of the event. - `open val eventName: String`: Event name. - `open val eventNumber: ULong`: Event number. - `open val timestamp: Instant`: Time of the event. --- package: com.google.home.automation.DelayNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/DelayNodeDsl --- # DelayNodeDsl `interface DelayNodeDsl : AutomationFlowContributor` Interface for constructing `Delay` nodes and contributing them to an automation flow. ### Known Direct Subclasses - `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions - `open fun delayFor(duration: Duration): Unit` ### Inherited Functions - **From `com.google.home.automation.AutomationFlowContributor`**: - `fun flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.ListIn --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListIn --- # ListIn `class ListIn : ExpressionWithId` Represents the "in" operation on a list expression. ### Public Properties - `val element: Expression` - `val listExpression: Expression` --- package: com.google.home.automation.ParametersBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ParametersBuilder --- # ParametersBuilder `@AutomationDsl` `class ParametersBuilder` Type-safe builder that builds a `Parameter`. ### Public Constructors - `ParametersBuilder()`: Create a `Parameter` instance. ### Public Functions - `fun build(): List`: Build a `List` of `Parameter` instances. - `fun parameter(parameter: Parameter): Unit`: Build a `Parameter`. ### Public Properties - `val parameters: `: `List` of `Parameter` instances. --- package: com.google.home.automation.UnsupportedEntityParameterValue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityParameterValue --- # UnsupportedEntityParameterValue `class UnsupportedEntityParameterValue : ValidationIssue` The parameter value is not supported by the entity. ### Public Constructors - `UnsupportedEntityParameterValue(node: Node, severity: ValidationIssueSeverity, parameterName: String, fieldId: Int, commandId: String?, eventId: String?, traitId: String?, entityId: String, entityType: String?, value: Any?, valueConstraint: Constraint?)`: Create an `UnsupportedEntityParameterValue` instance. ### Public Properties - `val commandId: String?`: The unique ID of the command. - `val entityId: String`: The unique ID of the entity. - `val entityType: String?`: The type of the entity. - `val eventId: String?`: The unique ID of the event. - `val fieldId: Int`: The ID of the field. - `val parameterName: String`: The name of the parameter. - `val traitId: String?`: The unique ID of the trait. - `val value: Any?`: The value. - `val valueConstraint: Constraint?`: The constraint that is violated by `value`. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.InvalidEntityExpressionType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidEntityExpressionType --- # InvalidEntityExpressionType `class InvalidEntityExpressionType : ValidationIssue` The entity expression type is not valid. ### Public Constructors - `InvalidEntityExpressionType(node: Node, severity: ValidationIssueSeverity, expected: List, actual: String)`: Create an `InvalidEntityExpressionType` instance. ### Public Properties - `val actual: String`: The actual entity expression type. - `val expected: List`: The expected entity expression type. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.OutputReinitialized --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/OutputReinitialized --- # OutputReinitialized `class OutputReinitialized : ValidationIssue` An output variable has been reinitialized in multiple nodes. ### Public Constructors - `OutputReinitialized(node: Node, severity: ValidationIssueSeverity, output: String, otherNodes: List)`: Create an `OutputReinitialized` instance. ### Public Properties - `val otherNodes: List`: A list of the nodes where the output variable is also defined. - `val output: String`: The output. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.ManualStarter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ManualStarter --- # ManualStarter `class ManualStarter : Node` A starter that allows the user to manually activate an automation. ### Public Constructors - `ManualStarter()` ### Public Functions - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.Node`**: - `val nodeId: String?`: String identifier of this node. --- package: com.google.home.automation.CombinedBitsDescriptor --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/CombinedBitsDescriptor --- # CombinedBitsDescriptor `class CombinedBitsDescriptor` Represents a group of bits in a bitmap. ### Public Constructors - `CombinedBitsDescriptor(startBit: UInt, endBit: UInt, name: String)` ### Public Properties - `val endBit: UInt` - `val name: String`: **This property is deprecated.** This field is deprecated and will be removed in a future version. - `val startBit: UInt` --- package: com.google.home.automation.AssignmentNodeDsl.Variable --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl.Variable --- # AssignmentNodeDsl.Variable `class AssignmentNodeDsl.Variable : TypedExpression` --- package: com.google.home.automation.LessThan --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThan --- # LessThan `class LessThan : BinaryExpression` The less-than operator, which evaluates to `true` when `operand1` `<` `operand2`. ### Inherited Properties - **From `com.google.home.automation.BinaryExpression`**: - `val operand1: Expression` - `val operand2: Expression` --- package: com.google.home.automation.SelectFlowBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SelectFlowBuilder --- # SelectFlowBuilder `@AutomationDsl` `class SelectFlowBuilder : AutomationFlowBuilder, StarterNodeDsl, ManualStarterNodeDsl, SequentialDsl` Type-safe builder that builds a `SelectFlow` node. ### Public Constructors - `SelectFlowBuilder(nodes: List = emptyList())`: Create a `SelectFlow` instance. ### Public Functions - `fun build(): SelectFlow`: Build a `SelectFlow`. ### Inherited Functions - **From `com.google.home.automation.AutomationFlowBuilder`**: - `open fun nodes(): List` - **From `com.google.home.automation.AutomationFlowContributor`**: - `open fun flowBuilder(): AutomationFlowBuilder` - **From `com.google.home.automation.ManualStarterNodeDsl`**: - `open fun manualStarter(): Unit` - **From `com.google.home.automation.SequentialDsl`**: - `open fun sequential(block: SequentialFlowBuilder.() -> Unit): Unit` - **From `com.google.home.automation.StarterNodeDsl`**: - `open fun starter(entityExpression: TypedExpression?>, event: EventFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` and an `Event` and add it. - `open fun starter(entityExpression: TypedExpression>?>, event: EventFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` list and an `Event` and add it. - `open fun starter(entityExpression: TypedExpression?>, trait: TraitFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` and a `Trait` and add it. - `open fun starter(entityExpression: TypedExpression>?>, trait: TraitFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` list and a `Trait` and add it. - `open fun starter(structure: Structure, event: EventFactory): TypedExpression`: Create a `Starter` from a `Structure` and an `Event` and add it. - `open fun starter(structure: Structure, trait: TraitFactory): TypedExpression`: Create a `Starter` from a `Structure` and a `Trait` and add it. - `open fun starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory): TypedExpression`: Create a `Starter` from a Device and an `Event` and add it. - `open fun starter(device: HomeDevice, deviceType: DeviceTypeFactory, trait: TraitFactory): TypedExpression`: Create a `Starter` from a Device and a `Trait` and add it. - `open fun starter(entityExpression: TypedExpression?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` and a `Trait` and add it. - `open fun starter(entityExpression: TypedExpression>?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` list and a `Trait` and add it. - `open fun starter(structure: Structure, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Create a `Starter` from a `Structure` and an `Event` and add it. - `open fun starter(unknownEntity: UnknownEntity, entityType: TypeFactory, event: EventFactory): TypedExpression`: Create a `Starter` from an UnknownEntity and an `Event` and add it. - `open fun starter(unknownEntity: UnknownEntity, entityType: TypeFactory, trait: TraitFactory): TypedExpression`: Create a `Starter` from an UnknownEntity and a `Trait` and add it. - `open fun starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Create a `Starter` from a Device and a `Trait` and add it. - `open fun starter(unknownEntity: UnknownEntity, deviceType: DeviceTypeFactory, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Create a `Starter` from an `UnknownEntity` and an `Event` and add it. --- package: com.google.home.automation.SuppressionDurationOutOfRange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SuppressionDurationOutOfRange --- # SuppressionDurationOutOfRange `class SuppressionDurationOutOfRange : ValidationIssue` The suppression duration is outside the accepted range of 5 seconds to 24 hours. ### Public Constructors - `SuppressionDurationOutOfRange(node: Node, severity: ValidationIssueSeverity, duration: Duration)`: Create an `SuppressionDurationOutOfRange` instance. ### Public Properties - `val duration: Duration`: The duration. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.UnsupportedEntityParameter --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityParameter --- # UnsupportedEntityParameter `class UnsupportedEntityParameter : ValidationIssue` The parameter is not supported by the entity. ### Public Constructors - `UnsupportedEntityParameter(node: Node, severity: ValidationIssueSeverity, parameterName: String, fieldId: Int, commandId: String?, eventId: String?, traitId: String?, entityId: String, entityType: String)`: Create an `UnsupportedEntityParameter` instance. ### Public Properties - `val commandId: String?`: The unique ID of the command. - `val entityId: String`: The unique ID of the entity. - `val entityType: String`: The type of the entity. - `val eventId: String?`: The unique ID of the event. - `val fieldId: Int`: The ID of the field. - `val parameterName: String`: The name of the parameter. - `val traitId: String?`: The unique ID of the trait. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.InvalidOperand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidOperand --- # InvalidOperand `class InvalidOperand : ValidationIssue` The expression uses an invalid operand. ### Public Constructors - `InvalidOperand(node: Node, severity: ValidationIssueSeverity, expression: Expression?, operator: String, operandIndex: Int, operandType: String, validOperandTypes: List)`: Create an `InvalidOperand` instance. ### Public Properties - `val expression: Expression?`: The expression. - `val operandIndex: Int`: The index of the operand in the expression. - `val operandType: String`: The operand type. - `val operator: String`: The operator. - `val validOperandTypes: List`: A list of valid operand types. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.ReferenceDeclaration --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ReferenceDeclaration --- # ReferenceDeclaration `class ReferenceDeclaration` Represents a reference declaration. Only valid in a list comprehension expression. ### Public Constructors - `ReferenceDeclaration(variable: String)`: Create a `ReferenceDeclaration` instance. ### Public Functions - `open operator fun equals(other: Any?): Boolean` ### Public Properties - `val variable: String`: The variable name. --- package: com.google.home.automation.StateReaderCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StateReaderCandidate --- # StateReaderCandidate `interface StateReaderCandidate : NodeCandidate` Every StateReaderCandidate should implement this interface ### Known Direct Subclasses - `TraitAttributesCandidate`: Represents automation candidate nodes corresponding to a trait's attributes. ### Inherited Properties - **From `com.google.home.automation.NodeCandidate`**: - `val entity: HasId` - `val fieldDetailsMap: Map` - `val fields: Map`: **This property is deprecated.** Use fieldDetails instead - `val trait: TraitFactory` - `val types: List>` - `val unsupportedReasons: List` --- package: com.google.home.automation.UnsupportedActionBehavior --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedActionBehavior --- # UnsupportedActionBehavior `class UnsupportedActionBehavior : ValidationIssue` The entity behavior type is not supported by the action node. ### Public Constructors - `UnsupportedActionBehavior(node: Node, severity: ValidationIssueSeverity, behaviorType: String)`: Create an `UnsupportedActionBehavior` instance. ### Public Properties - `val behaviorType: String`: A description of the behavior type. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.DelayDurationOutOfRange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/DelayDurationOutOfRange --- # DelayDurationOutOfRange `class DelayDurationOutOfRange : ValidationIssue` Delay duration is outside the accepted range of 5 seconds to 24 hours. ### Public Constructors - `DelayDurationOutOfRange(node: Node, severity: ValidationIssueSeverity, duration: Duration)`: Create an `DelayDurationOutOfRange` instance. ### Public Properties - `val duration: Duration`: The duration. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.TraitAttributesCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate --- # TraitAttributesCandidate `class TraitAttributesCandidate : StarterCandidate, StateReaderCandidate, ActionCandidate` Represents automation candidate nodes corresponding to a trait's attributes. These can be used in starters, state readers and actions. ### Public Constructors - `TraitAttributesCandidate(entity: HasId, types: List>, trait: TraitFactory, fields: Map, fieldDetailsMap: Map, unsupportedReasons: List)` ### Public Functions - `open operator fun equals(other: Any?): Boolean` - `open fun hashCode(): Int` - `open fun toString(): String` ### Public Properties - `open val entity: HasId` - `open val fieldDetailsMap: Map` - `open val fields: Map`: **This property is deprecated.** Use fieldDetailsMap instead - `open val trait: TraitFactory` - `open val types: List>` - `open val unsupportedReasons: List` --- package: com.google.home.automation.ConditionDurationOutOfRange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConditionDurationOutOfRange --- # ConditionDurationOutOfRange `class ConditionDurationOutOfRange : ValidationIssue` The condition duration is outside the accepted range of 1-30 minutes. ### Public Constructors - `ConditionDurationOutOfRange(node: Node, severity: ValidationIssueSeverity, duration: Duration)`: Create an `ConditionDurationOutOfRange` instance. ### Public Properties - `val duration: Duration`: The duration. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.AutomationFlowContributor --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowContributor --- # AutomationFlowContributor `interface AutomationFlowContributor` Interface for contributing nodes to an automation flow builder (e.g. sequential, parallel, etc). ### Known Direct Subclasses - `ActionNodeDsl`: Interface for constructing `Action` nodes and contributing them to an automation flow. - `AssignmentNodeDsl`: Interface for constructing `Assignment` nodes and contributing them to an automation flow. - `AutomationFlowBuilder`: Interface to build an automation flow. - `ConditionNodeDsl`: Interface for constructing `Condition` nodes and contributing them to an automation flow. - `DelayNodeDsl`: Interface for constructing `Delay` nodes and contributing them to an automation flow. - `ManualStarterNodeDsl`: Interface for constructing `ManualStarter` nodes and contributing them to an automation flow. - `ParallelNodeDsl`: Interface for constructing Parallel nodes and contributing them to an automation flow. - `SelectNodeDsl`: Interface for constructing Select nodes and contributing them to an automation flow. - `SequentialDsl`: Interface for constructing Sequential nodes and contributing them to an automation flow. - `StarterNodeDsl`: Interface for constructing `Starter` nodes and adding them to an automation flow. - `StateReaderNodeDsl`: Interface for constructing `StateReader` nodes and contributing them to an automation flow. - `SuppressionNodeDsl`: Interface for constructing `Suppression` nodes and contributing them to an automation flow. ### Known Indirect Subclasses - `ParallelFlowBuilder`: Type-safe builder that builds a `ParallelFlow` node. - `SelectFlowBuilder`: Type-safe builder that builds a `SelectFlow` node. - `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions - `fun flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.MissingRequiredFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingRequiredFields --- # MissingRequiredFields `class MissingRequiredFields : ValidationIssue` Missing required field(s) in the automation graph. ### Public Constructors - `MissingRequiredFields(node: Node, severity: ValidationIssueSeverity, missingFields: List)`: Create an `MissingRequiredFields` instance. ### Public Properties - `val missingFields: List`: A list of the missing required fields. ### Inherited Functions - **From `com.google.home.automation.ValidationIssue`**: - `open fun toString(): String` ### Inherited Properties - **From `com.google.home.automation.ValidationIssue`**: - `val issueType: ValidationIssueType`: The type of the validation issue. - `val node: Node`: The node for which validation is failing. - `val severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.DuplicateStarterNode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/DuplicateStarterNode --- # DuplicateStarterNode `class DuplicateStarterNode : ValidationIssue` The starter is listening to the same trait change or event as existing starter nodes. ### Public Constructors - `DuplicateStarterNode(node: Node, severity: ValidationIssueSeverity, otherDuplicatedStarterNodes: List)` ### Public Properties - `otherDuplicatedStarterNodes: List`: A list of nodes other than `node` that are listening to the same trait change or event. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.Entity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Entity --- # Entity `class Entity` An entity that consists of entity object and entity type. ### Public Properties - `entityObject: HasId` - `type: TypeFactory?` --- package: com.google.home.automation.BaseUnit --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseUnit --- # BaseUnit `enum BaseUnit : Enum` Represents the base unit of a measurement. ### Enum Values - `AIR_QUALITY_INDEX` - `AMPERE` - `BECQUEREL_PER_CUBIC_METER` - `CELSIUS` - `DEGREES` - `KELVIN` - `KG_PER_CUBIC_METER` - `METERS` - `MIRED` - `PARTICLES_PER_CUBIC_METER` - `PARTS_PER_MILLION` - `PERCENT` - `SECONDS` - `WATT` - `WATT_HOUR` ### Public Properties - `tagId: Int` --- package: com.google.home.automation.MissingStructureAddressSetup --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingStructureAddressSetup --- # MissingStructureAddressSetup `class MissingStructureAddressSetup : UnsupportedCandidateReason` Candidate is not supported due to missing structure address setup. ### Public Constructors - `MissingStructureAddressSetup(reason: String = "MISSING_STRUCTURE_ADDRESS_SETUP")` ### Public Properties - `reason: String` --- package: com.google.home.automation.StarterCandidate --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StarterCandidate --- # StarterCandidate `interface StarterCandidate : NodeCandidate` Every StarterCandidate should implement this interface. ### Known Direct Subclasses - `EventCandidate`: Represents automation candidate nodes corresponding to an event. - `TraitAttributesCandidate`: Represents automation candidate nodes corresponding to a trait's attributes. ### Inherited Properties - From `com.google.home.automation.NodeCandidate`: - `entity: HasId` - `fieldDetailsMap: Map` - `fields: Map`: **Deprecated.** Use fieldDetails instead. - `trait: TraitFactory` - `types: List>` - `unsupportedReasons: List` --- package: com.google.home.automation.StateReader --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/StateReader --- # StateReader `class StateReader : Node, HasOutput` A class that accesses a trait's state. ### Public Constructors - `StateReader(entityExpression: Expression, trait: TraitFactory, output: String)`: Create a `StateReader` instance from an entity expression, a `DeviceType`, and a `Trait`. - `StateReader(entity: HasId, trait: TraitFactory, output: String)`: Create a `StateReader` instance from an entity and a `Trait`. - `StateReader(entity: HasId, deviceType: DeviceTypeFactory?, trait: TraitFactory, output: String)`: Create a `StateReader` instance from an entity, a `DeviceType`, and a `Trait`. ### Public Properties - `deviceType: DeviceTypeFactory?`: The `DeviceType` associated with the `StateReader`. - `entity: HasId?`: The unique ID for the entity associated with the `StateReader`. - `entityExpression: Expression`: An expression that selects an entity or a list of entity associated with the `StateReader`. - `output: String`: The unique ID for the `StateReader` node output. - `trait: TraitFactory`: The `Trait` associated with the `StateReader`. - `traitId: String`: The unique ID for the trait associated with the `StateReader`. ### Inherited Properties - From `com.google.home.automation.Node`: - `nodeId: String?`: String identifier of this node. --- package: com.google.home.automation.Constant --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constant --- # Constant `class Constant : Expression` Represents a constant. ### Public Properties - `constant: Any?`: The constant. --- package: com.google.home.automation.ActionNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ActionNodeDsl --- # ActionNodeDsl `interface ActionNodeDsl : AutomationFlowContributor` Interface for constructing `Action` nodes and contributing them to an automation flow. ### Known Direct Subclasses - `ParallelFlowBuilder`: Type-safe builder that builds a `ParallelFlow` node. - `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions - `action(entityExpression: TypedExpression?>, block: ActionBuilder.() -> Unit)`: Build and add an `Action`. - ` action(entityExpression: TypedExpression>?>, block: ActionBuilder.() -> Unit)`: Build and add an `Action`. - `action(structure: Structure, block: ActionBuilder.() -> Unit)`: Build and add an `Action`. - `action(device: HomeDevice, deviceType: DeviceTypeFactory, block: ActionBuilder.() -> Unit)`: Build and add an `Action`. - `action(unknownEntity: UnknownEntity, entityType: TypeFactory, block: ActionBuilder.() -> Unit)`: Build an `Action` using an UnknownEntity. Automations created using this method will not be valid. ### Inherited Functions - From `com.google.home.automation.AutomationFlowContributor`: - `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.InvalidConditionType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidConditionType --- # InvalidConditionType `class InvalidConditionType : ValidationIssue` The condition type is not valid. ### Public Constructors - `InvalidConditionType(node: Node, severity: ValidationIssueSeverity, expression: Expression?, expected: String, actual: String)` ### Public Properties - `actual: String`: The actual condition type. - `expected: String`: The expected condition type. - `expression: Expression?`: The expression. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.UnsubscribableAttribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsubscribableAttribute --- # UnsubscribableAttribute `class UnsubscribableAttribute : ValidationIssue` The attribute is not subscribable thus cannot be used in a starter. ### Public Constructors - `UnsubscribableAttribute(node: Node, severity: ValidationIssueSeverity, traitId: String, attributeName: String)` ### Public Properties - `attributeName: String`: The attribute name. - `traitId: String` ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.Updater --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Updater --- # Updater `class Updater` Trait attribute updater that builds the list of attributes to be updated. ### Public Constructors - ` Updater()` ### Public Functions - `addUpdate(updaterBlock: Updater.() -> Unit): Updater`: Add an attribute update to the list of attributes to be updated. - `getUpdatesMap(): Map`: Get the map of attributes to be updated. ### Public Properties - `attributesToUpdate: MutableList` --- package: com.google.home.automation.package-summary --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/package-summary --- # com.google.home.automation ## Interfaces - `ActionBehavior`: Represents the behavior of an action. - `ActionCandidate`: Every ActionCandidate should implement this interface. - `ActionNodeDsl`: Interface for constructing `Action` nodes and contributing them to an automation flow. - `AssignmentNodeDsl`: Interface for constructing `Assignment` nodes and contributing them to an automation flow. - `Automation`: The main representation an automation. - `AutomationFlowBuilder`: Interface to build an automation flow. - `AutomationFlowContributor`: Interface for contributing nodes to an automation flow builder. - `BaseAutomation`: Interface that is common between `Automation` and `DraftAutomation`. - `ConditionNodeDsl`: Interface for constructing `Condition` nodes and contributing them to an automation flow. - `Constraint`: Constraints on a trait attribute, command parameter, or event field. - `DelayNodeDsl`: Interface for constructing `Delay` nodes and contributing them to an automation flow. - `Expression`: An expression which evaluates to a value. - `HasAutomations`: Interface that allows for `Automation` creation, retrieval, update, and deletion operations. - `HasCandidates`: Interface that provides discovery functions. - `HasOutput`: A node that can produce output, such as `Starter` or `Action`. - `ManualStarterNodeDsl`: Interface for constructing `ManualStarter` nodes and contributing them to an automation flow. - `MutableAutomation`: Mutable attributes for an `Automation`. - `NodeCandidate`: The interface that every automation candidate should implement. - `ParallelNodeDsl`: Interface for constructing Parallel nodes and contributing them to an automation flow. - `SelectNodeDsl`: Interface for constructing Select nodes and contributing them to an automation flow. - `SequentialDsl`: Interface for constructing Sequential nodes and contributing them to an automation flow. - `StarterCandidate`: Every StarterCandidate should implement this interface. - `StarterNodeDsl`: Interface for constructing `Starter` nodes and adding them to an automation flow. - `StateReaderCandidate`: Every StateReaderCandidate should implement this interface. - `StateReaderNodeDsl`: Interface for constructing `StateReader` nodes and contributing them to an automation flow. - `SuppressionNodeDsl`: Interface for constructing `Suppression` nodes and contributing them to an automation flow. - `UnsupportedCandidateReason`: Reasons why a candidate node is not supported. ## Classes - `Action`: Represents a command that the automation can issue. - `ActionBuilder`: Type-safe builder that builds an `Action` node. - `And`: The logical AND operator. - `Assignment`: A class that assigns a value to a variable. - `AssignmentNodeDsl.Variable` - `AttributeDetails`: Metadata pertaining to a trait attribute. - `AttributeToUpdate`: Represents a single attribute to update. - `AutomationBuilder`: Type-safe builder that builds an `Automation` node. - `AutomationTooLarge`: The automation's serialized form is larger than allowed. - `Between`: The between operator. - `BetweenTimes`: The between times operator. - `BinaryExpression`: Represents a binary expression: "`operand1` `operator` `operand2`". - `BitmapConstraint`: Represents constraints on a bitmap. - `BlockedAction`: The action could impact safety, security, or privacy. - `BooleanConstraint`: Constrains a field to boolean values. - `ByteConstraint` - `CombinedBitsDescriptor`: Represents a group of bits in a bitmap. - `Command`: A trait command used in an automation `Action`. - `CommandCandidate`: Represents automation candidate node for a command. - `CommandFieldDetails`: A parameter belonging to a `Command`. - `Comprehension`: Represents list comprehension expressions. - `Condition`: A logical state that controls automation execution. - `ConditionBuilder`: Type-safe builder that builds a `Condition` node. - `ConditionDurationOutOfRange`: Condition duration is outside the 1-30 minute range. - `Constant`: Represents a constant. - `ConstraintUnit`: Class representing a unit of measurement. - `Delay`: A `Node` that pauses for a specified time. - `DelayDurationOutOfRange`: Delay duration is outside the 5s to 24h range. - `Divide`: The DIVIDE operator (`operand1 / operand2`). - `DuplicateStarterNode`: The starter listens to the same trait change or event as existing starters. - `Entity`: An entity that consists of entity object and entity type. - `EnumConstraint`: Represents possible values a field can take. - `Equals`: The equality operator. - `EventCandidate`: Represents automation candidate nodes for an event. - `EventFieldDetails`: A field that belongs to an Event. - `ExpressionWithId`: Represents an expression with random UUID. - `FieldDetails`: Describes a Field with additional details. - `FieldSelect`: Select field(s) from a struct. - `GetDevicesOfType` - `GreaterThan`: The greater-than operator (`>`). - `GreaterThanOrEquals`: The greater-than-or-equal-to operator (`>=`). - `InvalidArgumentCount`: The expression has an invalid argument count. - `InvalidArgumentsForOperator`: Represents the data type of a value. - `InvalidCommand`: The command ID is not found in the command schema. - `InvalidConditionType`: The condition type is not valid. - `InvalidDuration`: The duration is invalid. - `InvalidDurationExpressionType`: The duration expression type is not valid. - `InvalidEntity`: The Entity (ID or name) does not exist or belong to the user. - `InvalidEntityExpressionType`: The entity expression type is not valid. - `InvalidEvent`: The event ID is not found in the event schema. - `InvalidField`: The FIELD_SELECT expression uses an invalid field. - `InvalidNullParameterValue`: The parameter value must not be null. - `InvalidOperand`: The expression uses an invalid operand. - `InvalidParameter`: The parameter name is not found in the behavior schema. - `InvalidParameterType`: The parameter type is not valid. - `InvalidReference`: The Reference is not valid. - `InvalidTrait`: The trait ID is not found in the trait schema. - `InvalidValue`: The value is invalid. - `LessThan`: The less-than operator (`<`). - `LessThanOrEquals`: The less-than-or-equal-to operator (`<=`). - `ListAllMatch`: Represents the "all match" operation on a list. - `ListAnyMatch`: Represents the "any match" operation on a list. - `ListConstraint`: Represents constraints on elements of a list. - `ListContains`: Represents the "contains" operation on a list. - `ListFilter`: Represents the "filter" operation on a list. - `ListGet`: Represents the "get" operation on a list. - `ListIn`: Represents the "in" operation on a list. - `ListMap`: Represents the map operation on a list. - `ListNoneMatch`: Represents the "none match" operation on a list. - `ListSize`: Represents the "size" operation on a list. - `ManualStarter`: A starter that allows manual activation of an automation. - `MapFilter`: Represents the "filter" operation on a map. - `MapKeys`: Represents the "keys" operation on a map. - `MapSize`: Represents the "size" operation on a map. - `MapValues`: Represents the "values" operation on a map. - `Minus`: The MINUS operator (`operand1 - operand2`). - `MisplacedSelectFlow`: The select flow node must be the first node. - `MisplacedStarterNode`: The starter node must be the first node. - `MissingPresenceSensingSetup`: Candidate not supported due to missing presence sensing setup. - `MissingRequiredFields`: Missing required field(s) in the automation graph. - `MissingRequiredParameters`: Required parameters not set. - `MissingStarterNode`: The node cannot be reached without a preceding starter node. - `MissingStructureAddressSetup`: Candidate not supported due to missing structure address setup. - `MissingSubscription`: Candidate not supported due to missing subscription setup. - `MultipleManualStarters`: The automation has more than one manual starter node. - `Multiply`: The MULTIPLY operator (`operand1 * operand2`). - `Node`: An Automation node. - `Not`: The logical NOT operator. - `NotEquals`: The not-equals operator. - `NumberRangeConstraint`: Represents a range of numbers. - `NumberSetConstraint`: Represents a set of numbers. - `Or`: The logical OR operator. - `OutputNotAccessible`: An output reference is not accessible. - `OutputReinitialized`: An output variable has been reinitialized. - `OutputTypeMismatch`: An output variable has been defined with different types. - `ParallelFlow`: A set of nodes that execute in parallel. - `ParallelFlowBuilder`: Type-safe builder for `ParallelFlow`. - `Parameter`: A command parameter. - `ParametersBuilder`: Type-safe builder for `Parameter`. - `Plus`: The PLUS operator (`operand1 + operand2`). - `ReadOnlyAttribute`: The attribute is not modifiable by write. - `Reference`: Represents a reference to a previously defined node. - `ReferenceDeclaration`: Represents a reference declaration. - `SelectFlow`: A `Node` that allows only one of its sub-nodes to execute. - `SelectFlowBuilder`: Type-safe builder for `SelectFlow`. - `SequentialFlow`: A set of nodes that execute sequentially. - `SequentialFlowBuilder`: Type-safe builder for `SequentialFlow`. - `Starter`: Defines initial triggers that activate an automation. - `StateReader`: A class that accesses a trait's state. - `StringConstraint`: Represents string constraints. - `StructConstraint`: Represents constraints on individual fields of a struct. - `Suppression`: Terminates execution if triggered again within a time range. - `SuppressionDurationOutOfRange`: Suppression duration is outside the 5s to 24h range. - `TernaryExpression`: Represents a ternary expression. - `TooManyNodes`: The automation has more nodes than allowed. - `TooManyOperations`: The expression has more operations than allowed. - `TraitAttributesCandidate`: Represents candidate nodes for a trait's attributes. - `TypedEntity`: An entity with an associated entity type. - `TypedExpression`: An expression with an associated type. - `UnaryExpression`: Represents a unary expression: "`operator` `operand`". - `UnknownCommand`: Represents an unknown Command. - `UnknownDeviceType`: Represents an unknown DeviceType. - `UnknownDeviceType.UnknownDeviceTypeFactory` - `UnknownEntity`: An unrecognized entity. - `UnknownEvent`: Represents an unknown Event. - `UnknownEvent.UnknownEventFactory` - `UnknownExpression`: Represents an unknown expression. - `UnknownField`: Represents an unknown field. - `UnknownIssue`: Default validation issue type. - `UnknownNode`: An unknown node type. - `UnknownTrait`: Represents an unknown Trait. - `UnknownTrait.UnknownTraitFactory` - `UnknownUnsupportedCandidateReason`: Represents an unknown UnsupportedCandidateReason. - `UnknownValue`: Represents an unknown value. - `UnsubscribableAttribute`: The attribute is not subscribable and cannot be used in a starter. - `UnsupportedActionBehavior`: The entity behavior type is not supported by the action node. - `UnsupportedEntityCommand`: The command is not supported by the entity. - `UnsupportedEntityEvent`: The event is not supported by the entity. - `UnsupportedEntityParameter`: The parameter is not supported by the entity. - `UnsupportedEntityParameterValue`: The parameter value is not supported by the entity. - `UnsupportedEntityTrait`: The trait is not supported by the entity. - `UnsupportedEntityType`: The entity type is not supported by the entity. - `UnsupportedNodeOutput`: This type of node does not produce output. - `UnsupportedOperator`: The expression uses an unsupported operator. - `UnsupportedStarterBehavior`: The entity behavior type is not supported by the starter node. - `UnsupportedStateReaderBehavior`: The entity behavior type is not supported by the state reader node. - `UnsupportedSubNodeType`: The sub-node type is not allowed inside the parent node. - `Update`: Trait attribute update used in automation action. - `Updater`: Trait attribute updater that builds the list of attributes to be updated. - `ValidationIssue`: The base class for validation issues. ## Annotations - `AutomationDsl` ## Enums - `BaseUnit`: Represents the base unit of a measurement. - `JoinSemanticType`: Ways of coordinating the execution of multiple concurrent operations. - `MissingPresenceSensingSetup.SetupType`: Type of presence sensing setup that is missing. - `ValidationIssueSeverity`: Validation Error Severity Type. - `ValidationIssueType`: Validation Issue Type. ## Type Aliases - `DraftAutomation`: Interface that represents the user-specifiable parts of the `Automation`. ## Top-level Functions - `automation(block: AutomationBuilder.() -> Unit): BaseAutomation`: Build an `Automation` from an `AutomationBuilder`. - `constant(constantValue: Duration): TypedExpression`: Represents a constant of `Duration` value. - `constant(constantValue: LocalTime): TypedExpression`: Represents a constant of `LocalTime` value. - ` entity(entityObject: HasId, type: TypeFactory): TypedExpression>`: Represents a typed entity. - ` fieldSelect(selectFrom: TypedExpression, selectedField: Field): TypedExpression`: Type-safe builder function that builds a `FieldSelect` expression. - `not(expr: TypedExpression): TypedExpression`: Allows the use of the `Not` operator. - `parallel(block: ParallelFlowBuilder.() -> Unit): ParallelFlow`: Build a `ParallelFlow` node from a `ParallelFlowBuilder`. - `parallel(nodes: List, joinSemantic: JoinSemanticType = JoinSemanticType.JsWhenAllFinished): ParallelFlow`: Build a `ParallelFlow` from a list of `Node` instances. - `select(block: SelectFlowBuilder.() -> Unit): SelectFlow`: Build a `SelectFlow` from a `SelectFlowBuilder`. - `select(nodes: List): SelectFlow`: Build a `SelectFlow` from a list of `Node` instances. - `sequential(block: SequentialFlowBuilder.() -> Unit): SequentialFlow`: Build a `SequentialFlow` node from a `SequentialFlowBuilder`. - `sequential(nodes: List): SequentialFlow`: Build a `SequentialFlow` from a list of `Node` instances. - ` starter(entityExpression: TypedExpression?>, event: EventFactory): TypedExpression`: Build a `Starter` from an `Expression` of `Entity` and `Event`. - ` starter(entityExpression: TypedExpression>?>, event: EventFactory): TypedExpression`: Build a `Starter` from an `Expression` of `Entity` list and `Event`. - ` starter(entityExpression: TypedExpression?>, trait: TraitFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` and a `Trait`. - ` starter(entityExpression: TypedExpression>?>, trait: TraitFactory): TypedExpression`: Create a `Starter` from an `Expression` of `Entity` list and a `Trait`. - ` starter(structure: Structure, event: EventFactory): TypedExpression`: Build a `Starter` from a `Structure` and a `Event`. - ` starter(structure: Structure, trait: TraitFactory): TypedExpression`: Build a `Starter` from a `Structure` and a `Trait`. - ` starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory): TypedExpression`: Build a `Starter` from a Device and `Event`. - ` starter(device: HomeDevice, deviceType: DeviceTypeFactory, trait: TraitFactory): TypedExpression`: Create a `Starter` from a Device and a `Trait`. - ` starter(entityExpression: TypedExpression?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Build a `Starter` from an `Expression` of `Entity` and `Event` with parameters. - ` starter(entityExpression: TypedExpression>?>, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Build a `Starter` from an `Expression` of `Entity` list and `Event` with parameters. - ` starter(structure: Structure, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Build a `Starter` from an `Event` with its parameters. - ` starter(device: HomeDevice, deviceType: DeviceTypeFactory, event: EventFactory, block: ParametersBuilder.() -> Unit): TypedExpression`: Build a `Starter` from a Device and `Event` with parameters. - ` stateReader(entityExpression: TypedExpression?>, trait: TraitFactory): TypedExpression`: Build a `StateReader` from an `Expression` of `Entity` and a `Trait`. - ` stateReader(entityExpression: TypedExpression>?>, trait: TraitFactory): TypedExpression, T>>`: Build a `StateReader` from an `Expression` of `Entity` list and a `Trait`. - ` stateReader(structure: Structure, trait: TraitFactory): TypedExpression`: Build a `StateReader` from a `Trait`. - ` stateReader(device: HomeDevice, deviceType: DeviceTypeFactory, trait: TraitFactory): TypedExpression`: Build a `StateReader` from a Device and `Trait`. ## Extension Functions - ` TypedExpression?>.all(body: (TypedExpression) -> TypedExpression): infix TypedExpression`: Performs All match operation on a list. - `TypedExpression.and(other: TypedExpression): infix TypedExpression`: Allows use of the `And` operator. - ` TypedExpression?>.any(body: (TypedExpression) -> TypedExpression): infix TypedExpression`: Performs Any match operation on a list. - `Structure.atExecutionTime(): TypedExpression>`: Produces a `TypedExpression` of a structure entity. - `Room.atExecutionTime(): TypedExpression>`: Produces a `TypedExpression` of a room entity. - `?> TypedExpression.between(param0: T, param1: T): TypedExpression`: Checks if a value is between two others. Multiple overloads exist for different types and `TypedExpression` arguments. - ` TypedExpression?>.contains(constant: T): infix TypedExpression`: Performs the `Contains` operation on a list with a constant. - ` TypedExpression?>.contains(element: TypedExpression): infix TypedExpression`: Performs the `Contains` operation on a list with an expression. - ` TypedExpression.div(param0: T): operator TypedExpression`: Division operator. Overloads exist for numeric types. - ` TypedExpression.equals(param0: T): infix TypedExpression`: Equality operator. - ` TypedExpression?>.filter(body: (TypedExpression) -> TypedExpression): infix TypedExpression?>`: Performs Filter operation on a list. - ` TypedExpression?>.get(constant: Int): operator TypedExpression`: Performs the `Get` operation on a list with a constant index. - ` TypedExpression?>.get(index: TypedExpression): operator TypedExpression`: Performs the `Get` operation on a list with an expression index. - ` TypedExpression>.getDevicesOfType(deviceType: DeviceTypeFactory?): TypedExpression>>`: Returns a list of entities of a given `DeviceType` under the `Structure`. - ` TypedExpression>.getDevicesOfType(deviceType: DeviceTypeFactory?): TypedExpression>>`: Returns a list of entities of a given `DeviceType` under the `Room`. - `?> TypedExpression.greaterThan(param0: T): infix TypedExpression`: Greater than operator. - `?> TypedExpression.greaterThanOrEquals(param0: T): infix TypedExpression`: Greater than or equals operator. - ` TypedExpression.inList(list: List): infix TypedExpression`: Performs In operation on a constant list. - ` TypedExpression.inList(listExpression: TypedExpression?>): infix TypedExpression`: Performs In operation on an expression list. - `?> TypedExpression.lessThan(param0: T): infix TypedExpression`: Less than operator. - `?> TypedExpression.lessThanOrEquals(param0: T): infix TypedExpression`: Less than or equals operator. - ` TypedExpression?>.map(body: (TypedExpression) -> TypedExpression): infix TypedExpression?>`: Performs Map operation on a list. - ` TypedExpression.minus(param0: T): operator TypedExpression`: Subtraction operator. - ` TypedExpression?>.none(body: (TypedExpression) -> TypedExpression): infix TypedExpression`: Performs None match operation on a list. - ` TypedExpression.notEquals(param0: T): infix TypedExpression`: Not equals operator. - `TypedExpression.or(other: TypedExpression): infix TypedExpression`: Allows use of the `Or` operator. - ` TypedExpression.plus(param0: T): operator TypedExpression`: Addition operator. - ` TypedExpression.times(param0: T): operator TypedExpression`: Multiplication operator. - `TypedExpression.toByte(): TypedExpression`: Type conversion functions (`toByte`, `toDouble`, `toFloat`, `toInt`, `toLong`, `toShort`, etc.) are available for numeric `TypedExpression` types. ## Extension Properties - `TypedExpression?>.size: TypedExpression`: Performs the `Size` operation on a list. --- package: com.google.home.automation.Constraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constraint --- # Constraint `interface Constraint` Constraints on a trait attribute, command parameter, or event field. Represents the possible values that an attribute, parameter, or field can have. ### Known Direct Subclasses - `BitmapConstraint`: Represents constraints on a bitmap. - `BooleanConstraint`: Constrains a field to boolean values. - `ByteConstraint` - `EnumConstraint`: Represents possible values a field can take. - `ListConstraint`: Represents constraints on elements of a list. - `NumberRangeConstraint`: Represents a range of numbers. - `NumberSetConstraint`: Represents a set of numbers. - `StringConstraint`: Represents string constraints, including length and allowed/disallowed values. - `StructConstraint`: Represents constraints on individual fields of a struct. --- package: com.google.home.automation.SequentialFlowBuilder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder --- # SequentialFlowBuilder `@AutomationDsl class SequentialFlowBuilder : AutomationFlowBuilder, StarterNodeDsl, ManualStarterNodeDsl, ConditionNodeDsl, StateReaderNodeDsl, ActionNodeDsl, ParallelNodeDsl, SelectNodeDsl, DelayNodeDsl, SuppressionNodeDsl, AssignmentNodeDsl` Type-safe builder that builds a `SequentialFlow` Node. ### Public Constructors - `SequentialFlowBuilder(nodes: List = emptyList())` ### Public Functions - `build(): SequentialFlow`: Build a `SequentialFlow`. ### Inherited Functions - From `ActionNodeDsl`: - `action(...)`: Build and add an `Action`. (Multiple overloads exist). - From `AssignmentNodeDsl`: - ` AssignmentNodeDsl.Variable.assign(expression: TypedExpression)`: Assigns a value to a variable. - ` variable()`: Declares a variable. - From `AutomationFlowBuilder`: - `nodes(): List` - From `AutomationFlowContributor`: - `flowBuilder(): AutomationFlowBuilder` - From `ConditionNodeDsl`: - `condition(block: ConditionBuilder.() -> Unit)` - From `DelayNodeDsl`: - `delayFor(duration: Duration)` - From `ManualStarterNodeDsl`: - `manualStarter()` - From `ParallelNodeDsl`: - `parallel(block: ParallelFlowBuilder.() -> Unit)` - From `SelectNodeDsl`: - `select(block: SelectFlowBuilder.() -> Unit)` - From `StarterNodeDsl`: - `starter(...)`: Create and add a `Starter`. (Multiple overloads exist for different entities, traits, and events). - From `StateReaderNodeDsl`: - `stateReader(...)`: Build a `StateReader`. (Multiple overloads exist). - From `SuppressionNodeDsl`: - `suppressFor(duration: Duration)` --- package: com.google.home.automation.UnknownValue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownValue --- # UnknownValue `class UnknownValue` Represents an unknown value. --- package: com.google.home.automation.Comprehension --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension --- # Comprehension `sealed class Comprehension : ExpressionWithId` Represents list comprehension expressions. ### Known Direct Subclasses - `ListAllMatch`: Represents the "all match" operation on a list expression. - `ListAnyMatch`: Represents the "any match" operation on a list expression. - `ListFilter`: Represents the "filter" operation on a list expression. - `ListMap`: Represents the map operation on a list expression. - `ListNoneMatch`: Represents the "none match" operation on a list expression. ### Protected Constructors - `Comprehension(rangeExpression: Expression, lambdaVar: ReferenceDeclaration, lambdaBody: Expression)` - `Comprehension(rangeExpression: Expression, lambdaVar: ReferenceDeclaration, lambdaBody: Expression, expressionId: String)` ### Public Properties - `lambdaBody: Expression` - `lambdaVar: ReferenceDeclaration` - `rangeExpression: Expression` --- package: com.google.home.automation.NumberSetConstraint --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint --- # NumberSetConstraint `class NumberSetConstraint : Constraint` Represents a set of numbers. ### Public Constructors - ` NumberSetConstraint(allowedSet: Set, unit: ConstraintUnit?)` ### Public Properties - `allowedSet: Set`: The allowed values. - `unit: ConstraintUnit?`: The measurement unit associated with the number set. --- package: com.google.home.automation.ValidationIssue --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ValidationIssue --- # ValidationIssue `sealed class ValidationIssue` The base class for validation issues. ### Known Direct Subclasses - `AutomationTooLarge`: The automation's serialized form is too large. - `BlockedAction`: The action could impact safety, security, or privacy. - `ConditionDurationOutOfRange`: Condition duration is outside the 1-30 minute range. - `DelayDurationOutOfRange`: Delay duration is outside the 5s to 24h range. - `DuplicateStarterNode`: The starter listens to the same trait change or event as existing starters. - `InvalidArgumentCount`: The expression has an invalid argument count. - `InvalidArgumentsForOperator`: Represents the data type of a value. - `InvalidCommand`: The command ID is not found. - `InvalidConditionType`: The condition type is not valid. - `InvalidDuration`: The duration is invalid. - `InvalidDurationExpressionType`: The duration expression type is not valid. - `InvalidEntity`: The Entity does not exist or belong to the user. - `InvalidEntityExpressionType`: The entity expression type is not valid. - `InvalidEvent`: The event ID is not found. - `InvalidField`: The expression uses an invalid field. - `InvalidNullParameterValue`: The parameter value must not be null. - `InvalidOperand`: The expression uses an invalid operand. - `InvalidParameter`: The parameter name is not found. - `InvalidParameterType`: The parameter type is not valid. - `InvalidReference`: The Reference is not valid. - `InvalidTrait`: The trait ID is not found. - `InvalidValue`: The value is invalid. - `MisplacedSelectFlow`: The select flow node must be the first node. - `MisplacedStarterNode`: The starter node must be the first node. - `MissingRequiredFields`: Missing required field(s) in the automation graph. - `MissingRequiredParameters`: Required parameters not set. - `MissingStarterNode`: The node is unreachable without a preceding starter. - `MultipleManualStarters`: The automation has more than one manual starter. - `OutputNotAccessible`: An output reference is not accessible. - `OutputReinitialized`: An output variable has been reinitialized. - `OutputTypeMismatch`: An output variable has been defined with different types. - `ReadOnlyAttribute`: The attribute is not modifiable by write. - `SuppressionDurationOutOfRange`: Suppression duration is outside the 5s to 24h range. - `TooManyNodes`: The automation has more nodes than allowed. - `TooManyOperations`: The expression has more operations than allowed. - `UnknownIssue`: Default validation issue type. - `UnsubscribableAttribute`: The attribute is not subscribable. - `UnsupportedActionBehavior`: The entity behavior type is not supported by the action node. - `UnsupportedEntityCommand`: The command is not supported by the entity. - `UnsupportedEntityEvent`: The event is not supported by the entity. - `UnsupportedEntityParameter`: The parameter is not supported by the entity. - `UnsupportedEntityParameterValue`: The parameter value is not supported by the entity. - `UnsupportedEntityTrait`: The trait is not supported by the entity. - `UnsupportedEntityType`: The entity type is not supported by the entity. - `UnsupportedNodeOutput`: This type of node does not produce output. - `UnsupportedOperator`: The expression uses an unsupported operator. - `UnsupportedStarterBehavior`: The entity behavior type is not supported by the starter node. - `UnsupportedStateReaderBehavior`: The entity behavior type is not supported by the state reader node. - `UnsupportedSubNodeType`: The sub-node type is not allowed inside the parent node. ### Protected Constructors - `ValidationIssue(node: Node, severity: ValidationIssueSeverity, issueType: ValidationIssueType)` ### Public Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.TooManyOperations --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TooManyOperations --- # TooManyOperations `class TooManyOperations : ValidationIssue` The expression has more operations than allowed by the abuse prevention config for the calling application. ### Public Constructors - `TooManyOperations(node: Node, severity: ValidationIssueSeverity, operationCount: Int, operationCountLimit: Int)` ### Public Properties - `operationCount: Int` - `operationCountLimit: Int` ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.UnsupportedStarterBehavior --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedStarterBehavior --- # UnsupportedStarterBehavior `class UnsupportedStarterBehavior : ValidationIssue` The entity behavior type is not supported by the starter node. ### Public Constructors - `UnsupportedStarterBehavior(node: Node, severity: ValidationIssueSeverity, behaviorType: String)` ### Public Properties - `behaviorType: String`: The behavior type. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.BinaryExpression --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression --- # BinaryExpression `sealed class BinaryExpression : ExpressionWithId` Represents a binary expression with two operands: "`operand1` `operator` `operand2`". ### Known Direct Subclasses - `And`: The logical AND operator. - `Divide`: The DIVIDE operator, which calculates `operand1 / operand2`. - `Equals`: The equality operator. - `GreaterThan`: The greater-than operator (`>`). - `GreaterThanOrEquals`: The greater-than-or-equal-to operator (`>=`). - `LessThan`: The less-than operator (`<`). - `LessThanOrEquals`: The less-than-or-equal-to operator (`<=`). - `Minus`: The MINUS operator, which calculates `operand1 - operand2`. - `Multiply`: The MULTIPLY operator, which calculates `operand1 * operand2`. - `NotEquals`: The not-equals operator. - `Or`: The logical OR operator. - `Plus`: The PLUS operator, which calculates `operand1 + operand2`. ### Protected Constructors - `BinaryExpression(operand1: Expression, operand2: Expression)` - `BinaryExpression(operand1: Expression, operand2: Expression, expressionId: String)` ### Public Properties - `operand1: Expression` - `operand2: Expression` --- package: com.google.home.automation.InvalidTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidTrait --- # InvalidTrait `class InvalidTrait : ValidationIssue` The trait ID is not found in the trait schema. Optional `expectedBehaviorType` indicates it belongs to other schemas. ### Public Constructors - `InvalidTrait(node: Node, severity: ValidationIssueSeverity, traitId: String, expectedBehaviorType: String)` ### Public Properties - `expectedBehaviorType: String`: Description of the expected behavior. - `traitId: String`: The unique ID of the trait. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.SuppressionNodeDsl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SuppressionNodeDsl --- # SuppressionNodeDsl `interface SuppressionNodeDsl : AutomationFlowContributor` Interface for constructing `Suppression` nodes and contributing them to an automation flow. ### Known Direct Subclasses - `SequentialFlowBuilder`: Type-safe builder that builds a `SequentialFlow` Node. ### Public Functions - `suppressFor(duration: Duration)` ### Inherited Functions - From `com.google.home.automation.AutomationFlowContributor`: - `flowBuilder(): AutomationFlowBuilder` --- package: com.google.home.automation.UnsupportedEntityEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedEntityEvent --- # UnsupportedEntityEvent `class UnsupportedEntityEvent : ValidationIssue` The event is not supported by the entity. ### Public Constructors - `UnsupportedEntityEvent(node: Node, severity: ValidationIssueSeverity, eventId: String, entityId: String, entityType: String, unsupportedReasons: List)` ### Public Properties - `entityId: String`: The unique ID of the entity. - `entityType: String`: The type of the entity. - `eventId: String`: The unique ID of the event. - `unsupportedReasons: List`: List of reasons why the event is not supported. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.MissingRequiredParameters --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingRequiredParameters --- # MissingRequiredParameters `class MissingRequiredParameters : ValidationIssue` Required parameters not set. Only one of the following fields is populated: `commandId`, `eventId` or `traitId`. ### Public Constructors - `MissingRequiredParameters(node: Node, severity: ValidationIssueSeverity, parameterNames: List, commandId: String? = null, eventId: String? = null, traitId: String? = null)` ### Public Properties - `commandId: String?`: The unique ID of the command. - `eventId: String?`: The unique ID of the event. - `parameterNames: List`: A list of the names of the missing required parameters. - `traitId: String?`: The unique ID of the trait. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.ReadOnlyAttribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ReadOnlyAttribute --- # ReadOnlyAttribute `class ReadOnlyAttribute : ValidationIssue` The attribute is not modifiable without a command, by write. ### Public Constructors - `ReadOnlyAttribute(node: Node, severity: ValidationIssueSeverity, traitId: String, attributeName: String)` ### Public Properties - `attributeName: String`: The name of the attribute. - `traitId: String`: The unique ID of the trait. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.home.automation.ExpressionWithId --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ExpressionWithId --- # ExpressionWithId `sealed class ExpressionWithId : Expression` Represents an expression with random UUID. ### Known Direct Subclasses - `BinaryExpression` - `Comprehension` - `FieldSelect` - `GetDevicesOfType` - `ListContains` - `ListGet` - `ListIn` - `ListSize` - `MapFilter` - `MapKeys` - `MapSize` - `MapValues` - `TernaryExpression` - `UnaryExpression` - `UnknownExpression` ### Known Indirect Subclasses - `And`, `Between`, `BetweenTimes`, `Divide`, `Equals`, `GreaterThan`, `GreaterThanOrEquals`, `LessThan`, `LessThanOrEquals`, `ListAllMatch`, `ListAnyMatch`, `ListFilter`, `ListMap`, `ListNoneMatch`, `Minus`, `Multiply`, `Not`, `NotEquals`, `Or`, `Plus` ### Protected Constructors - `ExpressionWithId()` - `ExpressionWithId(expressionId: String)` --- package: com.google.home.automation.NotEquals --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/NotEquals --- # NotEquals `class NotEquals : BinaryExpression` The not-equals operator, which evaluates to `true` when `operand1` is not equal to `operand2`. ### Inherited Properties - From `com.google.home.automation.BinaryExpression`: - `operand1: Expression` - `operand2: Expression` --- package: com.google.home.automation.MissingPresenceSensingSetup.SetupType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/MissingPresenceSensingSetup.SetupType --- # MissingPresenceSensingSetup.SetupType `enum MissingPresenceSensingSetup.SetupType : Enum` Type of presence sensing setup that is missing. ### Enum Values - `STRUCTURE_PRESENCE` - `UNSPECIFIED` - `USER_PRESENCE` --- package: com.google.home.automation.InvalidReference --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/automation/InvalidReference --- # InvalidReference `class InvalidReference : ValidationIssue` The Reference is not valid. ### Public Constructors - `InvalidReference(node: Node, severity: ValidationIssueSeverity, expression: Expression?, reference: String)` ### Public Properties - `expression: Expression?`: The expression. - `reference: String`: The reference. ### Inherited Properties - `issueType: ValidationIssueType`: The type of the validation issue. - `node: Node`: The node for which validation is failing. - `severity: ValidationIssueSeverity`: The severity of the validation issue. --- package: com.google.android.gms.home.matter.commissioning.Room --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/Room --- # Room `class Room : Parcelable` Representation of a Room (e.g. Kitchen, Living Room). ## Public functions ### create `java-static fun create(name: String!): Room!` Returns a Room with the given name. ### equals `fun equals(other: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### name `val name: String!` --- package: com.google.android.gms.home.matter.commissioning.CommissioningRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningRequest --- # CommissioningRequest `class CommissioningRequest : Parcelable` Request to commission a device, either for an uncommissioned device, or a device which has been opened for multi-administrator commissioning. ## Nested types - `interface CommissioningRequest.Builder`: Builder for constructing a `CommissioningRequest` instance. ## Public functions ### builder `java-static fun builder(): CommissioningRequest.Builder!` Returns an empty `CommissioningRequest.Builder` instance. ### equals `fun equals(other: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### commissioningService `val commissioningService: ComponentName?` ### deviceInfo `val deviceInfo: DeviceInfo?` ### deviceNameHint `val deviceNameHint: String?` ### onboardingPayload `val onboardingPayload: String?` --- package: com.google.android.gms.home.matter.commissioning.ShareDeviceRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/ShareDeviceRequest --- # ShareDeviceRequest `class ShareDeviceRequest : Parcelable` Request to share a device which has a commissioning window opened for multi-administrator commissioning. ## Nested types - `interface ShareDeviceRequest.Builder`: Builder class to generate `ShareDeviceRequest` instances. ## Public functions ### builder `java-static fun builder(): ShareDeviceRequest.Builder!` Returns an empty `Builder` instance. ### equals `fun equals(obj: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### commissioningWindow `val commissioningWindow: CommissioningWindow!` ### deviceDescriptor `val deviceDescriptor: DeviceDescriptor!` ### deviceName `val deviceName: String!` ### networkLocation `val networkLocation: NetworkLocation?` ### roomName `val roomName: String?` --- package: com.google.android.gms.home.matter.commissioning.CommissioningClient --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient --- # CommissioningClient `interface CommissioningClient : HasApiKey, OptionalModuleApi` Performs commissioning of Matter devices (both initial out of box commissioning, as well as multi-administrator commissioning flows). ## Public functions ### commissionDevice `@RequiresApi(value = VERSION_CODES.O_MR1) fun commissionDevice(request: CommissioningRequest!): Task!` Commission a new device into one or more fabrics. Devices commissioned using this API can later be managed from settings, using to launch a deeplink. In the `CommissioningRequest`, if a commissioning service is specified via `setCommissioningService`, then this service will be bound and a commissioning request will be dispatched to this service after the device has been initially onboarded onto an operational network. If you already know the particular device that you are looking for, then you can specify this via the `DeviceInfo` in the request to provide a hint as to which device will be set up during this commissioning process. Alternatively, if you already have an onboarding payload for a device (i.e. a manual pairing code, or QR code string) you can specify this in the request via `setOnboardingPayload` to target a specific device, and bypass the need to scan a QR code or enter a manual pairing code during commissioning. Note that this API can be used either to perform initial onboarding of a device (including operational network configuration) as well as multi-admin commissioning for shared devices. Upon success, the activity result will contain a `CommissioningResult` in the result data including details about the device which was commissioned. You can unpack the data using `fromIntentSenderResult`, providing the result code and result data. If this is called when `SDK_INT` is lower than `O_MR1`, then the `Task` will fail with an `ApiException` with the status code `DEVELOPER_ERROR`. ### shareDevice `@RequiresApi(value = VERSION_CODES.O_MR1) fun shareDevice(request: ShareDeviceRequest!): Task!` Returns an IntentSender which can be used to display a sharing UI, which allows the user to grant administrative control of a Matter device to another user (via text) or application via Intent sharing to applications registered to receive the `ACTION_COMMISSION_DEVICE` intent action. Upon receiving an IntentSender, it should be started for result. At this point, it is expected that the shared device already has an opened commissioning window, the details of which must be provided in the request. If the user chooses a sharing destination, then the result will be RESULT_OK, and no further action should be taken (note that this does not mean that the user has commissioned the device -- only that the information has been sent elsewhere). Upon receiving a result of RESULT_CANCELED, it is recommended that you then revoke the opened commissioning window on the device. If this is called when `SDK_INT` is lower than `O_MR1`, then the `Task` will fail with an `ApiException` with the status code `DEVELOPER_ERROR`. ### suppressHalfSheetNotification `fun suppressHalfSheetNotification(): Task!` Disables proactive commissionable discovery notifications for Matter devices. If your application provides its own Matter discovery or commissioning flow, you may wish to suppress these notifications to prevent interruptions. Notifications may be suppressed only while your application is in the foreground. Upon leaving the foreground, notifications will automatically be re-enabled. Given this requirement, it is recommended that you disable notifications in your application process onStart() lifecycle method. The suppression of the half sheet will be active for bounded time period. The default timeout 15 minutes." --- package: com.google.android.gms.home.matter.commissioning.SharedDeviceData --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData --- # SharedDeviceData `class SharedDeviceData : Parcelable` Class which provides a type-safe interpretation of the `Intent` that will be delivered when an application is selected from the share-sheet shown via `shareDevice`. The `android.app.Activity` component which is registered for the action: `com.google.android.gms.home.matter.ACTION_COMMISSION_DEVICE` will receive an `Intent` which can be parsed via `fromIntent`. If the `Intent` is missing information, an `InvalidSharedDeviceDataException` will be thrown. ## Nested types - `class SharedDeviceData.Builder`: A builder for `SharedDeviceData` instances. - `class SharedDeviceData.InvalidSharedDeviceDataException : Exception`: Exception thrown when parsing an `Intent` to retrieved a `SharedDeviceData`, if the given `Intent` is missing required data or is malformed. ## Constants ### EXTRA_COMMISSIONING_WINDOW_EXPIRATION `const val EXTRA_COMMISSIONING_WINDOW_EXPIRATION: String!` Intent extra key for `shareDevice` to retrieve the `getCommissioningWindowExpirationMillis` value. (Type: `Long`) ### EXTRA_DEVICE_NAME `const val EXTRA_DEVICE_NAME: String!` Intent extra key for `shareDevice` to retrieve the `getDeviceName` value. (Type: `String`) ### EXTRA_DEVICE_TYPE `const val EXTRA_DEVICE_TYPE: String!` **Deprecated:** this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type. Intent extra key for `shareDevice` to retrieve the `getDeviceType` value. (Type: `Integer`) ### EXTRA_MANUAL_PAIRING_CODE `const val EXTRA_MANUAL_PAIRING_CODE: String!` Intent extra key for `shareDevice` to retrieve the `getManualPairingCode` value. (Type: `String`) ### EXTRA_PRODUCT_ID `const val EXTRA_PRODUCT_ID: String!` Intent extra key for `shareDevice` to retrieve the `getProductId` value. (Type: `Integer`) ### EXTRA_ROOM_NAME `const val EXTRA_ROOM_NAME: String!` Intent extra key for `shareDevice` to retrieve the `getRoomName` value. (Type: `String`) ### EXTRA_VENDOR_ID `const val EXTRA_VENDOR_ID: String!` Intent extra key for `shareDevice` to retrieve the `getVendorId` value. (Type: `Integer`) ## Public functions ### builder `java-static fun builder(manualPairingCode: String!): SharedDeviceData.Builder!` Returns a new `SharedDeviceData.Builder` with the given `manualPairingCode` set. ### equals `fun equals(other: Any?): Boolean` ### fromIntent `java-static fun fromIntent(intent: Intent!): SharedDeviceData!` Returns a `SharedDeviceData` parsed from the given `intent`. - **Parameters**: - `intent: Intent!`: the intent data returned as a result from an `android.content.IntentSender` started for result from the `shareDevice` API. - **Throws**: - `InvalidSharedDeviceDataException`: if `intent` was malformed or missing required data. ### hashCode `fun hashCode(): Int` ### toIntent `fun toIntent(): Intent!` Converts this `SharedDeviceData` instance into an `Intent` that can be parsed into an equivalent instance as `fromIntent`. ### toString `fun toString(): String!` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### commissioningWindowExpirationMillis `val commissioningWindowExpirationMillis: Long` ### deviceName `val deviceName: String!` ### deviceType `val deviceType: Int` ### manualPairingCode `val manualPairingCode: String!` ### productId `val productId: Int` ### roomName `val roomName: String?` ### vendorId `val vendorId: Int` --- package: com.google.android.gms.home.matter.commissioning.CommissioningRequest.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder --- # CommissioningRequest.Builder `@AutoBuilder interface CommissioningRequest.Builder` Builder for constructing a `CommissioningRequest` instance. ## Public functions ### build `fun build(): CommissioningRequest!` Builds the request as configured in this builder. ### setCommissioningService `@CanIgnoreReturnValue fun setCommissioningService(commissioningService: ComponentName?): CommissioningRequest.Builder!` Set the `ComponentName` of an exported service which will return a in its `onBind` implementation. ### setDeviceInfo `@CanIgnoreReturnValue fun setDeviceInfo(deviceInfo: DeviceInfo?): CommissioningRequest.Builder!` Sets the information about the target device to be commissioned, if known. For example, if you already know the device's vendor/product ID and discriminator, it can be provided here to restrict which device should be set up in the flow. If not set, then a user can commission any Matter device. ### setDeviceNameHint `@CanIgnoreReturnValue fun setDeviceNameHint(deviceNameHint: String?): CommissioningRequest.Builder!` Sets a suggested name for the device, which will be shown to the user after commissioning completes, and the chosen value will be returned in `CommissioningResult`. This can be used in lieu of providing a commissioning service, if only a name suggestion is desired. If both are provided, the callback will still be queried for a name suggestion, but this hint will be used as a fallback if your callback does not return a suggestion. ### setOnboardingPayload `@CanIgnoreReturnValue fun setOnboardingPayload(onboardingPayload: String?): CommissioningRequest.Builder!` Sets the onboarding payload for the target device. This should be used if you already have established proof of possession, either via a manual pairing code, NFC tag, or QR code scan. If set, the user will not be required to scan the QR code, NFC tag, or enter a code to initiate commissioning. Note that the device information in this payload takes precedence over any information provided in `setDeviceInfo`. - **Parameters**: - `onboardingPayload: String?`: the text contents of the payload (e.g. QR code string or manual pairing code) ### setRoomNameHint `@CanIgnoreReturnValue fun setRoomNameHint(roomNameHint: String?): CommissioningRequest.Builder!` Sets a suggested room name for the device being commissioned and skips the room picker page. If the provided room name does not match any of the rooms in the structure, the hint will be ignored. - **Parameters**: - `roomNameHint: String?`: the suggested room name for the device being commissioned. ### setShareDeviceFlow `@CanIgnoreReturnValue fun setShareDeviceFlow(shareDeviceFlow: Boolean): CommissioningRequest.Builder!` Sets whether it is in share device flow or not. - **Parameters**: - `shareDeviceFlow: Boolean`: whether it is in share device flow or not. ### setStoreToGoogleFabric `@CanIgnoreReturnValue fun setStoreToGoogleFabric(storeToGoogleFabric: Boolean): CommissioningRequest.Builder!` Sets whether the device will be commissioned onto the Google fabric. - **Returns**: this builder --- package: com.google.android.gms.home.matter.commissioning.CommissioningWindow --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningWindow --- # CommissioningWindow `class CommissioningWindow : Parcelable` Representation of a commissioning window which has been opened for a device. ## Nested types - `class CommissioningWindow.Builder`: Builder class to generate `CommissioningWindow` instances. ## Public functions ### builder `java-static fun builder(): CommissioningWindow.Builder!` Returns an empty `Builder` instance. ### equals `fun equals(obj: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### discriminator `val discriminator: Discriminator!` ### durationSeconds `val durationSeconds: Long` ### passcode `val passcode: Long` ### windowOpenMillis `val windowOpenMillis: Long` --- package: com.google.android.gms.home.matter.commissioning.CommissioningService.CommissioningError --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningService.CommissioningError --- # CommissioningService.CommissioningError `@Retention(value = RetentionPolicy.SOURCE) @IntDef(...) annotation CommissioningService.CommissioningError` Enumeration of valid error code values for `sendCommissioningError`. ## Constants ### ATTESTATION_FAILED `const val ATTESTATION_FAILED = 1002: Int` Indicates a failure of device attestation. ### DEVICE_UNREACHABLE `const val DEVICE_UNREACHABLE = 1001: Int` Indicates a failure occurred because the device could not be reached on the network. ### OTHER `const val OTHER = 1000: Int` Indicates a failure that cannot be described by a more specific error code. --- package: com.google.android.gms.home.matter.commissioning.SharedDeviceData.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.Builder --- # SharedDeviceData.Builder `class SharedDeviceData.Builder` A builder for `SharedDeviceData` instances. Acquire an instance via `builder`. ## Public functions ### build `fun build(): SharedDeviceData!` Constructs an instance of `SharedDeviceData` from this builder. - **Throws**: - `java.lang.IllegalStateException`: if `setDeviceName` was not called. - `java.lang.IllegalStateException`: if `setCommissioningWindowExpirationMillis` was not called. ### setCommissioningWindowExpirationMillis `@CanIgnoreReturnValue fun setCommissioningWindowExpirationMillis(commissioningWindowExpirationMillis: @IntRange(from = 0) Long): SharedDeviceData.Builder!` Sets the expiration time of the opened commissioning window. The time basis must be `elapsedRealtime`. - **Returns**: this builder - **Throws**: - `java.lang.IllegalArgumentException`: if the value is less than zero. ### setDeviceName `@CanIgnoreReturnValue fun setDeviceName(deviceName: String!): SharedDeviceData.Builder!` Sets the user-facing name of this device. - **Returns**: this builder - **Throws**: - `java.lang.IllegalArgumentException`: if the device name is empty. ### setDeviceType `@CanIgnoreReturnValue fun ~~setDeviceType~~(deviceType: @IntRange(from = 0, to = 65535) Int): SharedDeviceData.Builder!` **Deprecated:** this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type. Sets the device's primary Matter device type. - **Returns**: this builder - **Throws**: - `java.lang.IllegalArgumentException`: if the value is not in [0,FFFF]. ### setProductId `@CanIgnoreReturnValue fun setProductId(productId: @IntRange(from = 0, to = 65535) Int): SharedDeviceData.Builder!` Sets the device's product ID. - **Returns**: this builder - **Throws**: - `java.lang.IllegalArgumentException`: if the value is not in [0,FFFF]. ### setRoomName `@CanIgnoreReturnValue fun setRoomName(roomName: String?): SharedDeviceData.Builder!` Sets the user-facing name of the room in which the device is located. This may be set to null if there is no room for the device. - **Returns**: this builder ### setVendorId `@CanIgnoreReturnValue fun setVendorId(vendorId: @IntRange(from = 0, to = 65535) Int): SharedDeviceData.Builder!` Sets the device's vendor ID. - **Returns**: this builder - **Throws**: - `java.lang.IllegalArgumentException`: if the value is not in [0,FFFF]. --- package: com.google.android.gms.home.matter.commissioning.CommissioningWindow.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningWindow.Builder --- # CommissioningWindow.Builder `class CommissioningWindow.Builder` Builder class to generate `CommissioningWindow` instances. ## Public constructors ### Builder `Builder()` ## Public functions ### build `fun build(): CommissioningWindow!` Builds a new instance of `CommissioningWindow`. - **Throws**: - `java.lang.IllegalStateException`: if the device discriminator, passcode, window opened timestamp, or duration are not set. ### setDiscriminator `@CanIgnoreReturnValue fun setDiscriminator(discriminator: Discriminator!): CommissioningWindow.Builder!` Sets the `Discriminator` of the device opened for commissioning. ### setDurationSeconds `@CanIgnoreReturnValue fun setDurationSeconds(durationSeconds: @IntRange(from = 1) Long): CommissioningWindow.Builder!` Sets the duration of the commissioning window. ### setPasscode `@CanIgnoreReturnValue fun setPasscode(passcode: @IntRange(from = 0, to = 99999998) Long): CommissioningWindow.Builder!` Sets the passcode of the device opened for commissioning. - **Throws**: - `java.lang.IllegalArgumentException`: if the given passcode is not in the range of 0-99999998, or is one of the specification-defined insecure passwords (1-8, 8-1, all same digits like 11111111). ### setWindowOpenMillis `@CanIgnoreReturnValue fun setWindowOpenMillis(windowOpenMillis: @IntRange(from = 1) Long): CommissioningWindow.Builder!` Sets the timestamp (in milliseconds) of when the commissioning window was opened. The time basis for this value must be `elapsedRealtime` rather than `currentTimeMillis`. --- package: com.google.android.gms.home.matter.commissioning.CommissioningResult --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningResult --- # CommissioningResult `class CommissioningResult : Parcelable` Response after commissioning a device, indicating the details of the commissioned device. ## Nested types - `class CommissioningResult.Builder`: Builder class to create instances of `CommissioningResult`. ## Public functions ### builder `java-static fun builder(): CommissioningResult.Builder!` Returns an empty builder. ### equals `fun equals(other: Any?): Boolean` ### fromIntentSenderResult `java-static fun fromIntentSenderResult(resultCode: Int, data: Intent?): CommissioningResult!` Parses out the data from the `commissionDevice` `android.content.IntentSender` result. This can be called for both success and failure cases to interpret the result data. In a successful commissioning, a `CommissioningResult` will be returned. For failure cases, an `ApiException` will be thrown, containing a `Status` which indicates the cause of the commissioning failure. - **Parameters**: - `resultCode: Int`: the result code, returned by the `android.content.IntentSender` returned by the `commissionDevice` API. - `data: Intent?`: the result data, returned by the `android.content.IntentSender` returned by the `commissionDevice` API. - **Throws**: - `com.google.android.gms.common.api.ApiException`: if the result data indicates a commissioning failure. ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### commissionedDeviceDescriptor `val commissionedDeviceDescriptor: DeviceDescriptor!` ### deviceIds `val deviceIds: (Mutable)List?` ### deviceName `val deviceName: String!` ### room `val room: Room?` ### token `val token: String?` --- package: com.google.android.gms.home.matter.commissioning.CommissioningService.Callback --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningService.Callback --- # CommissioningService.Callback `interface CommissioningService.Callback` Callback interface to be notified of requests coming from Google Play Services to your application. ## Public functions ### onCommissioningRequested `fun onCommissioningRequested(metadata: CommissioningRequestMetadata!): Unit` Invoked when a device is ready to be commissioned into your fabric. Upon completion, you must indicate success or failure via `sendCommissioningComplete` or `sendCommissioningError`. - **Parameters**: - `metadata: CommissioningRequestMetadata!`: metadata providing information about the device to be commissioned. --- package: com.google.android.gms.home.matter.commissioning.DeviceInfo.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/DeviceInfo.Builder --- # DeviceInfo.Builder `class DeviceInfo.Builder` Builder for constructing `DeviceInfo` instances. ## Public functions ### build `fun build(): DeviceInfo!` Constructs a `DeviceInfo` as configured by this builder. ### setDiscriminator `@CanIgnoreReturnValue fun setDiscriminator(discriminator: Discriminator?): DeviceInfo.Builder!` Set the 12-bit discriminator for the device to be commissioned. ### setProductId `@CanIgnoreReturnValue fun setProductId(productId: Int): DeviceInfo.Builder!` Set the 16-bit product identifier of the device to be commissioned. ### setVendorId `@CanIgnoreReturnValue fun setVendorId(vendorId: Int): DeviceInfo.Builder!` Set the 16-bit vendor identifier of the device to be commissioned. --- package: com.google.android.gms.home.matter.commissioning.CommissioningResult.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningResult.Builder --- # CommissioningResult.Builder `class CommissioningResult.Builder` Builder class to create instances of `CommissioningResult`. ## Public constructors ### Builder `Builder()` ## Public functions ### build `fun build(): CommissioningResult!` Builds an instance of `CommissioningResult` as configured in this builder. - **Throws**: - `java.lang.IllegalStateException`: if the device descriptor, or device name are not set. ## Public properties ### commissionedDeviceDescriptor `var commissionedDeviceDescriptor: DeviceDescriptor?` ### deviceIds `var deviceIds: (Mutable)List?` ### deviceName `var deviceName: String?` ### room `var room: Room?` ### token `var token: String?` --- package: com.google.android.gms.home.matter.commissioning.CommissioningCompleteMetadata.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningCompleteMetadata.Builder --- # CommissioningCompleteMetadata.Builder `class CommissioningCompleteMetadata.Builder` Builder class to generate `CommissioningCompleteMetadata` instances. ## Public constructors ### Builder `Builder()` ## Public functions ### build `fun build(): CommissioningCompleteMetadata` Builds a new instance of `CommissioningCompleteMetadata`. ## Public properties ### deviceNameHint `var deviceNameHint: String?` ### rooms `var rooms: (Mutable)List!` ### token `var token: String?` --- package: com.google.android.gms.home.matter.commissioning.package-summary --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/package-summary --- # com.google.android.gms.home.matter.commissioning ## Interfaces - `CommissioningClient`: Performs commissioning of Matter devices (both initial out of box commissioning, as well as multi-administrator commissioning flows). - `CommissioningRequest.Builder`: Builder for constructing a `CommissioningRequest` instance. - `CommissioningService`: Service implementation for Matter commissioning which facilitates communication between your application and Google Play Services. - `CommissioningService.Callback`: Callback interface to be notified of requests coming from Google Play Services to your application. - `ShareDeviceRequest.Builder`: Builder class to generate `ShareDeviceRequest` instances. ## Classes - `CommissioningCompleteMetadata`: Metadata to be returned after successfully commissioning a device. - `CommissioningCompleteMetadata.Builder`: Builder class to generate `CommissioningCompleteMetadata` instances. - `CommissioningRequest`: Request to commission a device, either for an uncommissioned device, or a device which has been opened for multi-administrator commissioning. - `CommissioningRequestMetadata`: Metadata providing information necessary to complete commissioning of a Matter device through a `CommissioningService`. - `CommissioningRequestMetadata.Builder`: Builder class to generate `CommissioningRequestMetadata` instances. - `CommissioningResult`: Response after commissioning a device, indicating the details of the commissioned device. - `CommissioningResult.Builder`: Builder class to create instances of `CommissioningResult`. - `CommissioningService.Builder`: A builder to create an implementation of `CommissioningService`. - `CommissioningWindow`: Representation of a commissioning window which has been opened for a device. - `CommissioningWindow.Builder`: Builder class to generate `CommissioningWindow` instances. - `DeviceInfo`: Encapsulating information about an individual Matter device. - `DeviceInfo.Builder`: Builder for constructing `DeviceInfo` instances. - `Room`: Representation of a Room (e.g. Kitchen, Living Room). - `ShareDeviceRequest`: Request to share a device which has a commissioning window opened for multi-administrator commissioning. - `SharedDeviceData`: Class which provides a type-safe interpretation of the `Intent` that will be delivered when an application is selected from the share-sheet shown via `shareDevice`. - `SharedDeviceData.Builder`: A builder for `SharedDeviceData` instances. ## Exceptions - `SharedDeviceData.InvalidSharedDeviceDataException`: Exception thrown when parsing an `Intent` to retrieved a `SharedDeviceData`, if the given `Intent` is missing required data or is malformed. ## Annotations - `CommissioningOptionalSteps`: Interface defining optional steps in the commissioning flow. - `CommissioningService.CommissioningError`: Enumeration of valid error code values for `sendCommissioningError`. --- package: com.google.android.gms.home.matter.commissioning.CommissioningCompleteMetadata --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningCompleteMetadata --- # CommissioningCompleteMetadata `class CommissioningCompleteMetadata : Parcelable` Metadata to be returned after successfully commissioning a device. ## Nested types - `class CommissioningCompleteMetadata.Builder`: Builder class to generate `CommissioningCompleteMetadata` instances. ## Public functions ### builder `java-static fun builder(): CommissioningCompleteMetadata.Builder!` Returns an empty `Builder` instance. ### equals `fun equals(other: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### deviceNameHint `val deviceNameHint: String?` ### rooms `val rooms: (Mutable)List!` ### token `val token: String?` --- package: com.google.android.gms.home.matter.commissioning.CommissioningRequestMetadata --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningRequestMetadata --- # CommissioningRequestMetadata `class CommissioningRequestMetadata : Parcelable` Metadata providing information necessary to complete commissioning of a Matter device through a `CommissioningService`. ## Nested types - `class CommissioningRequestMetadata.Builder`: Builder class to generate `CommissioningRequestMetadata` instances. ## Public functions ### builder `java-static fun builder(): CommissioningRequestMetadata.Builder!` Returns an empty `Builder` instance. ### equals `fun equals(other: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### deviceDescriptor `val deviceDescriptor: DeviceDescriptor!` ### networkLocation `val networkLocation: NetworkLocation!` ### passcode `val passcode: Long` --- package: com.google.android.gms.home.matter.commissioning.CommissioningRequestMetadata.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningRequestMetadata.Builder --- # CommissioningRequestMetadata.Builder `class CommissioningRequestMetadata.Builder` Builder class to generate `CommissioningRequestMetadata` instances. ## Public constructors ### Builder `Builder()` ## Public functions ### build `fun build(): CommissioningRequestMetadata!` Builds a new instance of `CommissioningRequestMetadata`. - **Throws**: - `java.lang.IllegalStateException`: if the network location, passcode, or device descriptor were not set. ## Public properties ### deviceDescriptor `var deviceDescriptor: DeviceDescriptor?` ### networkLocation `var networkLocation: NetworkLocation?` ### passcode `var passcode: Long` --- package: com.google.android.gms.home.matter.commissioning.SharedDeviceData.InvalidSharedDeviceDataException --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.InvalidSharedDeviceDataException --- # SharedDeviceData.InvalidSharedDeviceDataException `class SharedDeviceData.InvalidSharedDeviceDataException : Exception` Exception thrown when parsing an `Intent` to retrieved a `SharedDeviceData`, if the given `Intent` is missing required data or is malformed. ## Public constructors ### InvalidSharedDeviceDataException `InvalidSharedDeviceDataException(message: String!)` Constructs a new instance with the specified exception message. ### InvalidSharedDeviceDataException `InvalidSharedDeviceDataException(message: String!, cause: Throwable!)` Constructs a new instance with the specified exception message and causej. --- package: com.google.android.gms.home.matter.commissioning.CommissioningService.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningService.Builder --- # CommissioningService.Builder `class CommissioningService.Builder` A builder to create an implementation of `CommissioningService`. ## Public constructors ### Builder `Builder(context: Context!)` Creates a new builder. - **Parameters**: - `context: Context!`: the context of the `android.app.Service` to which this will be attached. ## Public functions ### build `fun build(): CommissioningService!` Constructs a new instance of `CommissioningService` as specified in this builder. - **Throws**: - `java.lang.IllegalStateException`: if no callback was specified via `setCallback`. ### setCallback `@CanIgnoreReturnValue fun setCallback(callback: CommissioningService.Callback!): CommissioningService.Builder!` Sets a callback to be notified when commissioning is ready. - **Parameters**: - `callback: CommissioningService.Callback!`: a callback to be notified when a device is ready for commissioning. - **Returns**: this builder ### setExecutor `@CanIgnoreReturnValue fun setExecutor(executor: Executor?): CommissioningService.Builder!` Optionally sets an executor on which callback methods will be executed. If not specified, an executor will be created on your behalf. - **Returns**: this builder --- package: com.google.android.gms.home.matter.commissioning.ShareDeviceRequest.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/ShareDeviceRequest.Builder --- # ShareDeviceRequest.Builder `@AutoBuilder interface ShareDeviceRequest.Builder` Builder class to generate `ShareDeviceRequest` instances. ## Public functions ### build `fun build(): ShareDeviceRequest!` Builds a new instance of `ShareDeviceRequest`. - **Throws**: - `java.lang.IllegalStateException`: if any of CommissioningWindow, DeviceDescriptor, or DeviceName are not specified. ### setCommissioningWindow `@CanIgnoreReturnValue fun setCommissioningWindow(commissioningWindow: CommissioningWindow!): ShareDeviceRequest.Builder!` Sets the `CommissioningWindow` opened for the device being shared. ### setDeviceDescriptor `@CanIgnoreReturnValue fun setDeviceDescriptor(deviceDescriptor: DeviceDescriptor!): ShareDeviceRequest.Builder!` Sets the `DeviceDescriptor` of the device being shared. ### setDeviceName `@CanIgnoreReturnValue fun setDeviceName(deviceName: String!): ShareDeviceRequest.Builder!` Sets the device name of the device being shared. ### setNetworkLocation `@CanIgnoreReturnValue fun setNetworkLocation(networkLocation: NetworkLocation?): ShareDeviceRequest.Builder!` Sets the network location of the device being shared. ### setRoomName `@CanIgnoreReturnValue fun setRoomName(roomName: String?): ShareDeviceRequest.Builder!` Sets the room name of the device being shared. --- package: com.google.android.gms.home.matter.commissioning.CommissioningService --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningService --- # CommissioningService `interface CommissioningService` Service implementation for Matter commissioning which facilitates communication between your application and Google Play Services. This `CommissioningService` must be returned by an exported `android.app.Service`, and that service specified in the in order to commission a device into your fabric. An example implementation may look like: ```kotlin class MatterCommissioningService : Service(), CommissioningService.Callback { private val commissioningServiceDelegate = CommissioningService.Builder(this) .setCallback(this) .build() override fun onBind(intent: Intent) = commissioningServiceDelegate.asBinder() override fun onCommissioningRequested(metadata: CommissioningRequestMetadata) { // perform commissioning commissioningServiceDelegate .sendCommissioningComplete( CommissioningCompleteMetadata.builder() .setToken(myInternalDeviceIdentifierString) .build() ) } } ``` If a token is specified in `CommissioningCompleteMetadata`, that token will be passed back to you in the activity result via `getToken`. ## Nested types - `class CommissioningService.Builder`: A builder to create an implementation of `CommissioningService`. - `interface CommissioningService.Callback`: Callback interface to be notified of requests coming from Google Play Services to your application. - `annotation CommissioningService.CommissioningError`: Enumeration of valid error code values for `sendCommissioningError`. ## Public functions ### asBinder `fun asBinder(): IBinder!` Returns the `IBinder` to return from your service. ### sendCommissioningComplete `fun sendCommissioningComplete(metadata: CommissioningCompleteMetadata!): Task!` Asynchronously sends a response to Google Play Services indicating that you have completed commissioning of a device supplied by `onCommissioningRequested`. - **Parameters**: - `metadata: CommissioningCompleteMetadata!`: additional metadata to send to complete the commissioning flow. - **Returns**: a task that will be completed when the response has been delivered. ### sendCommissioningError `fun sendCommissioningError(@CommissioningService.CommissioningError errorCode: Int): Task!` Asynchronously sends a response to Google Play Services indicating that you could not complete commissioning of a device supplied by `onCommissioningRequested`. - **Parameters**: - `@CommissioningService.CommissioningError errorCode: Int`: an error code from `CommissioningError` indicating the cause of the failure. - **Returns**: a task that will be completed when the response has been delivered. --- package: com.google.android.gms.home.matter.commissioning.DeviceInfo --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/DeviceInfo --- # DeviceInfo `class DeviceInfo : Parcelable` Encapsulating information about an individual Matter device. Instances can be constructed via the `DeviceInfo.Builder` class, acquired by `builder`. ## Nested types - `class DeviceInfo.Builder`: Builder for constructing `DeviceInfo` instances. ## Public functions ### builder `java-static fun builder(): DeviceInfo.Builder!` Returns a new `DeviceInfo.Builder` for constructing a `DeviceInfo`. ### equals `fun equals(other: Any?): Boolean` ### hashCode `fun hashCode(): Int` ### writeToParcel `fun writeToParcel(dest: Parcel!, flags: Int): Unit` ## Public properties ### discriminator `val discriminator: Discriminator?` ### productId `val productId: Int` ### vendorId `val vendorId: Int` --- package: com.google.android.gms.home.matter.common.NetworkLocation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/common/NetworkLocation --- # NetworkLocation `class NetworkLocation : Parcelable` Represents a network location at which a particular service can be reached. ### Properties * `port: Int` ### Functions * `static fun create(ipAddress: InetAddress!, port: Int): NetworkLocation!` Returns a new `NetworkLocation` instance. * `static fun create(ipAddress: String!, port: Int): NetworkLocation!` Returns a new `NetworkLocation` instance. If the IP address string includes a scope ID (e.g. `fe80::0:2%43`), it will be included. **Throws**: `java.lang.IllegalArgumentException` if the `ipAddress` is malformed. * `fun equals(other: Any?): Boolean` * `fun getFormattedIpAddress(): String!` Returns the IP address as a formatted string, including the scope ID if present (e.g. `fe80::0:2%47`). * `fun getIpAddress(): InetAddress!` Returns the IP address associated with this location. * `fun hashCode(): Int` * `fun toString(): String!` * `fun writeToParcel(dest: Parcel!, flags: Int): Unit` --- package: com.google.android.gms.home.matter.common.DeviceDescriptor --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/common/DeviceDescriptor --- # DeviceDescriptor `class DeviceDescriptor : Parcelable` Minimal representation of information about a Matter device to recognize the product and its purpose. ### Nested Types * `class DeviceDescriptor.Builder` Builder class to generate `DeviceDescriptor` instances. ### Properties * `deviceType: Int` * `productId: Int` * `vendorId: Int` ### Functions * `static fun builder(): DeviceDescriptor.Builder!` Returns an empty `Builder` instance. * `fun equals(other: Any?): Boolean` * `fun getNullableProductId(): @IntRange(from = 1, to = 65535) Int?` Like `getProductId` but returns `null` if the product is unspecified. * `fun getNullableVendorId(): @IntRange(from = 1, to = 65535) Int?` Like `getVendorId` but returns `null` if the vendor is unknown. * `fun hashCode(): Int` * `fun toString(): String!` * `fun writeToParcel(dest: Parcel!, flags: Int): Unit` --- package: com.google.android.gms.home.matter.common.DeviceDescriptor.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/common/DeviceDescriptor.Builder --- # DeviceDescriptor.Builder `class DeviceDescriptor.Builder` Builder class to generate `DeviceDescriptor` instances. ### Constructors * `Builder()` ### Functions * `fun build(): DeviceDescriptor!` Builds a new instance of `DeviceDescriptor`. **Throws**: `java.lang.IllegalStateException` if a product ID is specified without a vendor ID. * `fun ~~setDeviceType~~(deviceType: Int): DeviceDescriptor.Builder!` **Deprecated**: This field is not expected to be populated; use vendor and product ID to map to a device type. * `fun setProductId(productId: Int): DeviceDescriptor.Builder!` Sets the Product ID of the device. The vendor ID *must* also be specified via `setVendorId`. * `fun setVendorId(vendorId: @IntRange(from = 0, to = 65535) Int): DeviceDescriptor.Builder!` Sets the Vendor ID of the device. Valid IDs are 0 (unspecified) or in the range 0x1 - 0xFFFF. --- package: com.google.android.gms.home.matter.common.Discriminator --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/common/Discriminator --- # Discriminator `class Discriminator : Parcelable` Represents a Matter discriminator, which can be a long (12-bit) or short (4-bit) value. ### Properties * `value: Int` ### Functions * `fun equals(other: Any?): Boolean` * `static fun forLongValue(longDiscriminator: @IntRange(from = 0, to = 4095) Int): Discriminator!` Creates a new `Discriminator` for a full 12-bit value (e.g., from a QR code). **Throws**: `java.lang.IllegalArgumentException` if the value is out of the 12-bit range. * `static fun forShortValue(shortDiscriminator: @IntRange(from = 0, to = 4095) Int): Discriminator!` Creates a new `Discriminator` for an abbreviated value (e.g., from a manual pairing code), using only the upper 4 bits. **Throws**: `java.lang.IllegalArgumentException` if the value is out of the 12-bit range. * `fun hashCode(): Int` * `fun matches(other: Discriminator!): Boolean` Returns true if discriminators match. If one is a short discriminator, only the upper 4 bits are compared. This differs from `equals()`. * `fun toString(): String!` * `fun writeToParcel(dest: Parcel!, flags: Int): Unit` --- package: com.google.android.gms.home.matter.common.package-summary --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/common/package-summary --- # com.google.android.gms.home.matter.common ## Classes * **`DeviceDescriptor`**: Minimal representation of information about a Matter device. * **`DeviceDescriptor.Builder`**: Builder class to generate `DeviceDescriptor` instances. * **`Discriminator`**: Represents a Matter discriminator. * **`NetworkLocation`**: Represents a network location at which a particular service can be reached. --- package: com.google.android.gms.home.matter.discovery.ResolveServiceRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/ResolveServiceRequest --- ### `class ResolveServiceRequest : Parcelable` Request for DNS-SD resolution to indicate information about the service to be resolved. #### Constants * **`SERVICE_TYPE_COMMISSIONABLE`**: `String!` - `_matterc._udp`. DNS-SD service type for a commissionable Matter service. * **`SERVICE_TYPE_OPERATIONAL`**: `String!` - `_matter._tcp`. DNS-SD service type for an operational Matter service. #### Properties * **`instanceName`**: `String!` * **`serviceType`**: `String!` #### Public Functions * **`create(instanceName: String!, serviceType: String!)`**: `ResolveServiceRequest!` * Creates a new `ResolveServiceRequest`. * **Parameters**: * `instanceName`: The DNS-SD instance name of the service to resolve. * `serviceType`: The type of the service (`SERVICE_TYPE_COMMISSIONABLE` or `SERVICE_TYPE_OPERATIONAL`). * **Throws**: `IllegalArgumentException` if `serviceType` or `instanceName` are empty. * **`equals(o: Any?)`**: `Boolean` * **`hashCode()`**: `Int` * **`toString()`**: `String!` * **`writeToParcel(dest: Parcel!, flags: Int)`**: `Unit` --- package: com.google.android.gms.home.matter.discovery.DnsSdServiceInfo --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DnsSdServiceInfo --- ### `class DnsSdServiceInfo : Parcelable` Information about a resolved Matter DNS-SD service. #### Nested Types * **`DnsSdServiceInfo.Builder`**: Builder class to generate `DnsSdServiceInfo` instances. #### Properties * **`instanceName`**: `String!` * **`networkLocations`**: `(Mutable)List!` * **`serviceType`**: `String!` * **`txtRecords`**: `(Mutable)List!` #### Public Functions * **`builder()`**: `DnsSdServiceInfo.Builder!` - Returns an empty `Builder` instance. * **`getPrimaryNetworkLocation()`**: `NetworkLocation!` - Returns the highest priority `NetworkLocation` from `networkLocations`. * **`getTxtAttributeValue(key: String!)`**: `String?` - Returns the value of the `TxtRecord` that matches the given `key` (case-insensitive), or null if not present. * **`hasTxtAttribute(key: String!)`**: `Boolean` - Returns true if there is a TXT record for the given `key` (case-insensitive). * **`equals(o: Any?)`**: `Boolean` * **`hashCode()`**: `Int` * **`toString()`**: `String!` * **`writeToParcel(dest: Parcel!, flags: Int)`**: `Unit` --- package: com.google.android.gms.home.matter.discovery.DiscoveryClient --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient --- ### `interface DiscoveryClient` Client interface for discovering operational Matter devices on the local network. #### Public Functions * **`resolveService(request: ResolveServiceRequest!)`**: `Task!` * Resolves addresses and TXT records for the Matter DNS-SD service in the `ResolveServiceRequest`. * This API may only be used to resolve Matter commissionable (`_matterc._udp`) or operational (`_matter._tcp`) service records. * **On success**: The `Task` completes with a `DnsSdServiceInfo` instance. * **On failure**: The `Task` fails with an `ApiException`. The status code will be `TIMEOUT` if the service was not resolved, or `DEVELOPER_ERROR` for an unsupported service type or SDK version. --- package: com.google.android.gms.home.matter.discovery.DnsSdServiceInfo.Builder --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DnsSdServiceInfo.Builder --- ### `class DnsSdServiceInfo.Builder` Builder class to generate `DnsSdServiceInfo` instances. #### Public Constructors * `Builder()` #### Public Functions * **`build()`**: `DnsSdServiceInfo!` * Builds a new `DnsSdServiceInfo` instance. * **Throws**: `IllegalStateException` if instance name, service type, or network locations are missing or empty. * **`setInstanceName(instanceName: String!)`**: `DnsSdServiceInfo.Builder!` * Sets the DNS-SD instance name. * **Throws**: `IllegalArgumentException` if `instanceName` is empty. * **`setServiceType(serviceType: String!)`**: `DnsSdServiceInfo.Builder!` * Sets the DNS-SD service type. * **Throws**: `IllegalArgumentException` if `serviceType` is empty. * **`addNetworkLocation(networkLocation: NetworkLocation!)`**: `DnsSdServiceInfo.Builder!` - Adds a `NetworkLocation`. * **`addAllNetworkLocations(networkLocations: List!)`**: `DnsSdServiceInfo.Builder!` - Adds a list of `NetworkLocation`s. * **`addTxtRecord(txtRecord: TxtRecord!)`**: `DnsSdServiceInfo.Builder!` * Adds a `TxtRecord`. * **Throws**: `IllegalArgumentException` if a `TxtRecord` with the same key already exists. * **`addAllTxtRecords(txtRecords: Collection!)`**: `DnsSdServiceInfo.Builder!` * Adds a collection of `TxtRecord`s. * **Throws**: `IllegalArgumentException` if a `TxtRecord` with a duplicate key is found. --- package: com.google.android.gms.home.matter.discovery.ResolveServiceResult --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/ResolveServiceResult --- ### `class ResolveServiceResult : Parcelable` Result of a DNS-SD resolution request, encapsulating the resolved DNS-SD service info. #### Properties * **`serviceInfo`**: `DnsSdServiceInfo!` #### Public Functions * **`create(serviceInfo: DnsSdServiceInfo!)`**: `ResolveServiceResult!` * Returns a `ResolveServiceResult` for the given `serviceInfo`. * **Throws**: `NullPointerException` if `serviceInfo` is null. * **`equals(o: Any?)`**: `Boolean` * **`hashCode()`**: `Int` * **`toString()`**: `String!` * **`writeToParcel(dest: Parcel!, flags: Int)`**: `Unit` --- package: com.google.android.gms.home.matter.discovery.TxtRecord --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/TxtRecord --- ### `class TxtRecord : Parcelable` Represents a single TXT record. Keys are normalized to lowercase ASCII, so key matching should be case-insensitive. #### Properties * **`key`**: `String!` * **`value`**: `String!` #### Public Functions * **`create(key: String!, value: String!)`**: `TxtRecord!` * Creates a `TxtRecord` from the given key and value. * **Throws**: `IllegalArgumentException` if `key` is empty; `NullPointerException` if `key` or `value` are null. * **`equals(o: Any?)`**: `Boolean` * **`hashCode()`**: `Int` * **`toString()`**: `String!` * **`writeToParcel(dest: Parcel!, flags: Int)`**: `Unit` --- package: com.google.android.gms.home.matter.discovery.package-summary --- --- source: https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/package-summary --- ### `com.google.android.gms.home.matter.discovery` #### Interfaces | Name | Description | |---|---| | `DiscoveryClient` | Client interface for discovering operational Matter devices on the local network. | #### Classes | Name | Description | |---|---| | `DnsSdServiceInfo` | Information about a resolved Matter DNS-SD service. | | `DnsSdServiceInfo.Builder` | Builder class to generate `DnsSdServiceInfo` instances. | | `ResolveServiceRequest` | Request for DNS-SD resolution to indicate information about the service to be resolved. | | `ResolveServiceResult` | Result of a DNS-SD resolution request, encapsulating the resolved DNS-SD service info. | | `TxtRecord` | Represents a single TXT record. | --- package: com.google.home.google.TimerTrait.TimerResumeCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerResumeCommand --- # `TimerTrait.TimerResumeCommand` `object TimerTrait.TimerResumeCommand : CommandDescriptor` Resumes the device timer. Use this command from the `trait(Timer)` method. ### Nested types * `class TimerTrait.TimerResumeCommand.Request`: The request payload for the TimerResume command. ### Public properties * `open String commandId`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedOperationalStateTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait --- # `ExtendedOperationalStateTrait` `object ExtendedOperationalStateTrait` Attributes for ExtendedOperationalStateTrait. ### Nested types * `interface ExtendedOperationalStateTrait.Attributes`: Attributes for the ExtendedOperationalState cluster. * `data class ExtendedOperationalStateTrait.OperationalStateFeature`: ExtendedOperationalState cluster FeatureMap. * `interface ExtendedOperationalStateTrait.PauseUnpauseFollowUp`: Follow-up event for pause/unpause commands. * `interface ExtendedOperationalStateTrait.StartStopErrorFollowUp`: Follow-up event for generic command errors. * `interface ExtendedOperationalStateTrait.StartStopFollowUp`: Follow-up event for start and stop commands. * `object ExtendedOperationalStateTrait.StartWithDurationCommand : CommandDescriptor`: Start the device in one or more operation zones for the specified duration. * `class ExtendedOperationalStateTrait.StartWithDurationCommand.Request`: The request payload for the StartWithDuration command. * `object ExtendedOperationalStateTrait.StartWithOperationZonesCommand : CommandDescriptor`: Start the device in one or more operation zones. * `class ExtendedOperationalStateTrait.StartWithOperationZonesCommand.Request`: The request payload for the StartWithOperationZones command. * `enum ExtendedOperationalStateTrait.StatusEnum : Enum, ClusterEnum`: Status of the initial command and follow up response. ### Public properties * `ClusterId Id` --- package: com.google.home.google.GoogleGrillDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGrillDevice.StandardTraits --- # `GoogleGrillDevice.StandardTraits` `class GoogleGrillDevice.StandardTraits` Trait Container for Standard Traits. ### Public constructors * `StandardTraits(traitProvider: TraitProvider)` ### Public properties * `OnOff? onOff`: This trait provides an interface for turning devices on and off. * `OperationalState? operationalState`: This trait supports remote monitoring and allows the operational state of any device to be changed provided that a state machine is part of the operation. --- package: com.google.home.google.GoogleFryerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFryerDevice.GoogleTraits --- # `GoogleFryerDevice.GoogleTraits` `class GoogleFryerDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `Cook? cook`: This trait belongs to devices that can cook food according to various food presets and supported cooking modes. * `ExtendedOperationalState? extendedOperationalState`: This trait represents any device that supports operating in specific zones, and has an ongoing duration for its operation which can be queried. * `Timer? timer`: This trait can be used to control a built-in timer on a device, such as starting a new timer on a sprinkler, and pausing and canceling the timer. --- package: com.google.home.google.RotationTrait.RotateToPercentageCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.RotateToPercentageCommand.Request --- # `RotationTrait.RotateToPercentageCommand.Request` `class RotationTrait.RotateToPercentageCommand.Request` The request payload for the RotateToPercentage command. ### Public constructors * `Request(rotationPercent: Float)`: Creates a request payload for the RotateToPercentage command. ### Public properties * `Float rotationPercent`: An absolute value that sets the final clockwise rotation of the device in percentage of a full rotation. --- package: com.google.home.google.OpenCloseTrait.OpenFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.OpenFollowUp --- # `OpenCloseTrait.OpenFollowUp` `interface OpenCloseTrait.OpenFollowUp` Follow up response for the `open` command. --- package: com.google.home.google.LocatorTrait.LocatorFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorTrait.LocatorFeature --- # `LocatorTrait.LocatorFeature` `data class LocatorTrait.LocatorFeature` Map containing specific capabilities related to locating a device. ### Public constructors * `LocatorFeature(isSilenceable: Boolean, isRingable: Boolean, reportsLocation: Boolean)`: Creates the LocatorFeature data class. ### Public functions * `open ULong toRaw()`: Convert this ClusterBitmap to raw (bytes) format. ### Public properties * `String bitmapName`: Name of the Matter bitmap, in UpperCamelCase, e.g. "OnOffControlBitmap" from OnOff Cluster. * `Boolean isRingable`: The device can play audio to indicate its location. * `Boolean isSilenceable`: The device can be silenced while ringing. * `Boolean reportsLocation`: The device can provide its coordinates for vocalized location. * `String traitId`: Trait identifier of the Matter Cluster that defines the bitmap Data Type. --- package: com.google.home.google.TimeTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.Attributes --- # `TimeTrait.Attributes` `interface TimeTrait.Attributes` Attributes for the Time Trait. ### Public properties * `LocalDate? currentDate`: The current date. * `LocalTime? currentTime`: The current time. * `DayOfWeek? dayOfWeek`: The current day of the week. * `LocalTime? sunriseTime`: The time when sunrise occurs. * `LocalTime? sunsetTime`: The time when sunset occurs. --- package: com.google.home.google.AreaPresenceState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaPresenceState --- # `AreaPresenceState` `class AreaPresenceState : PlatformTrait, AreaPresenceStateTrait.Attributes, Updatable` ### Nested types * `enum AreaPresenceState.Attribute : Enum, Field`: Descriptor enum for this trait's attributes. ### Public functions * `open suspend AreaPresenceState update(optimisticReturn: (AreaPresenceState) -> Unit, init: AreaPresenceStateTrait.MutableAttributes.() -> Unit)`: Updater function to modify any writable attributes. ### Public properties * `open TraitFactory factory` --- package: com.google.home.google.ArmDisarm.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarm.Command --- # `ArmDisarm.Command` `enum ArmDisarm.Command : Enum` Descriptor enum for this trait's commands. ### Enum Values * `ArmDisarm`: The ArmDisarm.armDisarm trait command. ### Public properties * `UInt tag` --- package: com.google.home.google.GoogleSprinklerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSprinklerDevice.GoogleTraits --- # `GoogleSprinklerDevice.GoogleTraits` `class GoogleSprinklerDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `ExtendedOperationalState? extendedOperationalState`: This trait represents any device that supports operating in specific zones, and has an ongoing duration for its operation which can be queried. * `Timer? timer`: This trait can be used to control a built-in timer on a device, such as starting a new timer on a sprinkler, and pausing and canceling the timer. --- package: com.google.home.google.Volume --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Volume --- # `Volume` `interface Volume : VolumeTrait.Attributes, MatterTrait, VolumeCommands` API for the Volume trait. This trait provides a volume extension to the `LevelControl` trait and is only for use with the Automation API. ### Nested types * `enum Volume.Attribute : Enum, Field`: Descriptor enum for this trait's attributes. * `enum Volume.Command : Enum`: Descriptor enum for this trait's commands. ### Public functions * `Boolean supports(attribute: Volume.Attribute)` * `Boolean supports(command: Volume.Command)` ### Public properties * `open TraitFactory factory` --- package: com.google.home.google.ExtendedThermostatTrait.ExtendedThermostatFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.ExtendedThermostatFeature --- # `ExtendedThermostatTrait.ExtendedThermostatFeature` `data class ExtendedThermostatTrait.ExtendedThermostatFeature` ExtendedThermostat trait feature map. ### Public constructors * `ExtendedThermostatFeature(presets: Boolean, remoteTemperatureSensing: Boolean)`: Creates the ExtendedThermostatFeature data class. ### Public functions * `open ULong toRaw()`: Convert this ClusterBitmap to raw (bytes) format. ### Public properties * `String bitmapName`: Name of the Matter bitmap, in UpperCamelCase. * `Boolean presets`: Whether this device supports presets. * `Boolean remoteTemperatureSensing`: Whether this device supports remote temperature sensors. * `String traitId`: Trait identifier of the Matter Cluster that defines the bitmap Data Type. --- package: com.google.home.google.LocatorCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorCommands --- # `LocatorCommands` `interface LocatorCommands` ### Public functions * `suspend Unit locate(lang: String, reportLocation: Boolean)`: Locate the target device by generating a local alert. * **Parameters**: * `lang: String`: Current language of query or display. * `reportLocation: Boolean`: Indicates that coordinates are expected in the response and that the device should not ring. * `BatchableCommand locateBatchable(lang: String, reportLocation: Boolean)`: The batchable version of `locate` command. * **Parameters**: * `lang: String`: Current language of query or display. * `reportLocation: Boolean`: Indicates that coordinates are expected in the response and that the device should not ring. * `suspend Unit silence()`: Silence any in-progress alarms on devices that make an audible response for local alerts. * `BatchableCommand silenceBatchable()`: The batchable version of `silence` command. --- package: com.google.home.google.Toggles.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Toggles.Command --- # `Toggles.Command` `enum Toggles.Command : Enum` Descriptor enum for this trait's commands. ### Enum Values * `ChangeToggleSettings`: The `changeToggleSettings` trait command. ### Public properties * `UInt tag` --- package: com.google.home.google.ElevatorControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControl.Attribute --- # `ElevatorControl.Attribute` `enum ElevatorControl.Attribute : Enum, Field` Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList`: The `acceptedCommandList` trait attribute. * `attributeList`: The `attributeList` trait attribute. * `clusterRevision`: The `clusterRevision` trait attribute. * `featureMap`: The `featureMap` trait attribute. * `generatedCommandList`: The `generatedCommandList` trait attribute. * `supportedElevatorFloors`: The `supportedElevatorFloors` trait attribute. ### Public companion properties * `StructDescriptor StructDescriptor` ### Public properties * `open Descriptor descriptor` * `open String fieldName` * `Boolean isNullable` * `open UInt tag` * `open Type typeEnum` * `open String typeName` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.SearchAppCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.SearchAppCommand.Request --- # `ExtendedApplicationLauncherTrait.SearchAppCommand.Request` `class ExtendedApplicationLauncherTrait.SearchAppCommand.Request` The request payload for the SearchApp command. ### Public constructors * `Request(newApplicationName: String, newApplication: String)`: Creates a request payload for the SearchApp command. ### Public properties * `String newApplication`: Key of the application to search for. * `String newApplicationName`: Name of the application to search for. --- package: com.google.home.google.MediaActivityState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MediaActivityState --- # `MediaActivityState` `interface MediaActivityState : MediaActivityStateTrait.Attributes, MatterTrait` API for the MediaActivityState trait. ### Nested types * `enum MediaActivityState.Attribute : Enum, Field`: Descriptor enum for this trait's attributes. ### Public functions * `Boolean supports(attribute: MediaActivityState.Attribute)` ### Public properties * `open TraitFactory factory` --- package: com.google.home.google.AssistantFulfillmentTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.Attributes --- # `AssistantFulfillmentTrait.Attributes` `interface AssistantFulfillmentTrait.Attributes` Attributes for the AssistantFulfillment Trait. --- package: com.google.home.google.TimerTrait.TimerAdjustCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerAdjustCommand --- # `TimerTrait.TimerAdjustCommand` `object TimerTrait.TimerAdjustCommand : CommandDescriptor` Adjusts the device timer duration. Use this command from the `trait(Timer)` method. ### Nested types * `class TimerTrait.TimerAdjustCommand.Request`: The request payload for the TimerAdjust command. ### Public properties * `open String commandId`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedAirQuality --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQuality --- # `ExtendedAirQuality` `interface ExtendedAirQuality : ExtendedAirQualityTrait.Attributes, MatterTrait` API for the ExtendedAirQuality trait. This trait supports devices which provide an interface to air quality measurement and classification, with optional destinction between indoor and outdoor measurements. ### Nested types * `enum ExtendedAirQuality.Attribute : Enum, Field`: Descriptor enum for this trait's attributes. ### Public functions * `Boolean supports(attribute: ExtendedAirQuality.Attribute)` ### Public properties * `open TraitFactory factory` --- package: com.google.home.google.VoiceStarterTrait.OkGoogleEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarterTrait.OkGoogleEvent --- # `VoiceStarterTrait.OkGoogleEvent` `interface VoiceStarterTrait.OkGoogleEvent` ### Public properties * `String? query` --- package: com.google.home.google.ExtendedOperationalStateTrait.StartWithOperationZonesCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StartWithOperationZonesCommand.Request --- # `ExtendedOperationalStateTrait.StartWithOperationZonesCommand.Request` `class ExtendedOperationalStateTrait.StartWithOperationZonesCommand.Request` The request payload for the StartWithOperationZones command. ### Public constructors * `Request(operationZones: List)`: Creates a request payload for the StartWithOperationZones command. ### Public properties * `List operationZones`: Indicates one or more zones in which to start running. --- package: com.google.home.google.ExtendedColorControlTrait.MoveToColorNameCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.MoveToColorNameCommand --- # `ExtendedColorControlTrait.MoveToColorNameCommand` `object ExtendedColorControlTrait.MoveToColorNameCommand : CommandDescriptor` Moves the device to the color named. Use this command from the `trait(ExtendedColorControl)` method. ### Nested types * `class ExtendedColorControlTrait.MoveToColorNameCommand.Request`: The request payload for the MoveToColorName command. ### Public properties * `open String commandId`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedThermostatTrait.PresetScenario --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.PresetScenario --- # `ExtendedThermostatTrait.PresetScenario` `enum ExtendedThermostatTrait.PresetScenario : Enum, ClusterEnum` The type of preset. ### Enum Values * `Away`: Away, also known as Leave. * `Comfort`: Temperature is optimized for comfort. * `Eco`: Energy-saving mode. * `Home`: Home, also known as Return. * `Occupied`: For use when the space is occupied. * `Sleep`: Temperature is optimized for sleeping. * `UnknownValue`: The enum value is out of range. * `Unoccupied`: For use when the space is vacant. * `Unspecified`: Unspecified. * `UserDefined`: User-defined preset. * `Vacation`: Temperature is optimized for vacation. * `Wake`: Temperature is optimized for when the user is awake. ### Public properties * `open String traitId`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `open String typeName`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. * `open ULong value`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedThermostatTrait.SensorType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.SensorType --- # `ExtendedThermostatTrait.SensorType` `enum ExtendedThermostatTrait.SensorType : Enum, ClusterEnum` ### Enum Values * `CarbonMonoxide` * `Smoke` * `UnknownValue`: The enum value is out of range. * `Unspecified` ### Public properties * `open String traitId`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `open String typeName`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. * `open ULong value`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.LightEffectsTrait.PulseEffectSetCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.PulseEffectSetCommand.Request --- # `LightEffectsTrait.PulseEffectSetCommand.Request` `class LightEffectsTrait.PulseEffectSetCommand.Request` The request payload for the PulseEffectSet command. ### Public constructors * `Request(durationSeconds: UInt, color: LightEffectsTrait.Color)`: Creates a request payload for the PulseEffectSet command. ### Public properties * `LightEffectsTrait.Color color`: Color of the light for the duration of the effect. * `UInt durationSeconds`: Duration for the pulse effect, in seconds. --- package: com.google.home.google.MediaActivityStateTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MediaActivityStateTrait.Attributes --- # `MediaActivityStateTrait.Attributes` `interface MediaActivityStateTrait.Attributes` Attributes for the MediaActivityState cluster. ### Public properties * `List acceptedCommandList`: A list of client-generated commands which are supported by this cluster server instance. * `MediaActivityStateTrait.ActivityState? activityState` * `List attributeList`: A list of the attribute IDs of the attributes supported by the cluster instance. * `UShort clusterRevision`: The revision of the server cluster specification supported by the cluster instance. * `UInt featureMap`: Whether the server supports zero or more optional cluster features. * `List generatedCommandList`: A list of server-generated commands (server to client) which are supported by this cluster server instance. --- package: com.google.home.google.NetworkControlTrait.NetworkProfileState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.NetworkProfileState --- # `NetworkControlTrait.NetworkProfileState` `class NetworkControlTrait.NetworkProfileState : ClusterStruct` The state of one of the network profiles. ### Public constructors * `NetworkProfileState(networkProfileName: String, enabled: Boolean)`: Creates the NetworkProfileState class. ### Public functions * `open StructDescriptor getDescriptor()`: Returns the descriptor for the struct. * `open Any? getFieldValueById(tagId: UInt)`: Returns the value of the field for the given tag ID. ### Public properties * `Boolean enabled`: Network profile state. * `String networkProfileName`: Network profile name. --- package: com.google.home.google.Reboot --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Reboot --- # `Reboot` `interface Reboot : RebootTrait.Attributes, MatterTrait, RebootCommands` API for the Reboot trait. This trait belongs to devices that support rebooting as a single action. ### Nested types * `enum Reboot.Attribute : Enum, Field`: Descriptor enum for this trait's attributes. * `enum Reboot.Command : Enum`: Descriptor enum for this trait's commands. ### Public functions * `Boolean supports(attribute: Reboot.Attribute)` * `Boolean supports(command: Reboot.Command)` ### Public properties * `open TraitFactory factory` --- package: com.google.home.google.LockUnlockTrait.LockCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.LockCommand --- ### object LockUnlockTrait.LockCommand : CommandDescriptor Lock the device. Use this command from the `trait(LockUnlock)`. #### Nested types * `class LockUnlockTrait.LockCommand.Request` - The request payload for the Lock command. #### Public properties * `open String` | `commandId` - Unique id corresponding to the command. --- package: com.google.home.google.AssistantBroadcastTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantBroadcastTrait.Attributes --- ### interface AssistantBroadcastTrait.Attributes Attributes for the AssistantBroadcast Trait. **Known direct subclasses:** `AssistantBroadcast` --- package: com.google.home.google.ExtendedModeSelect.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelect.Command --- ### enum ExtendedModeSelect.Command Descriptor enum for this trait's commands. #### Enum Values * `ChangeModeSettings` - The `changeModeSettings` trait command. #### Public functions * `valueOf(value: String): ExtendedModeSelect.Command` * `values(): Array` #### Public properties * `UInt` | `tag` --- package: com.google.home.google.TimerTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait --- ### object TimerTrait Attributes for TimerTrait. #### Nested types * `interface TimerTrait.Attributes` - Attributes for the Timer cluster. * `object TimerTrait.TimerAdjustCommand : CommandDescriptor` - Adjusts the device timer duration. * `class TimerTrait.TimerAdjustCommand.Request` - The request payload for the TimerAdjust command. * `object TimerTrait.TimerCancelCommand : CommandDescriptor` - Cancels the device timer. * `class TimerTrait.TimerCancelCommand.Request` - The request payload for the TimerCancel command. * `object TimerTrait.TimerPauseCommand : CommandDescriptor` - Pauses the device timer. * `class TimerTrait.TimerPauseCommand.Request` - The request payload for the TimerPause command. * `object TimerTrait.TimerResumeCommand : CommandDescriptor` - Resumes the device timer. * `class TimerTrait.TimerResumeCommand.Request` - The request payload for the TimerResume command. * `object TimerTrait.TimerStartCommand : CommandDescriptor` - Starts a new device timer. * `class TimerTrait.TimerStartCommand.Request` - The request payload for the TimerStart command. #### Public properties * `ClusterId` | `Id` --- package: com.google.home.google.Dock.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Dock.Command --- ### enum Dock.Command Descriptor enum for this trait's commands. #### Enum Values * `Dock` - The Dock.dock trait command. #### Public functions * `valueOf(value: String): Dock.Command` * `values(): Array` #### Public properties * `UInt` | `tag` --- package: com.google.home.google.SpeedMeasurementTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SpeedMeasurementTrait.Attributes --- ### interface SpeedMeasurementTrait.Attributes Attributes for the SpeedMeasurement cluster. **Known direct subclasses:** `SpeedMeasurement` #### Public properties * `List` | `acceptedCommandList` - A list of client-generated commands supported by this cluster server instance. * `List` | `attributeList` - A list of the attribute IDs supported by the cluster instance. * `UShort` | `clusterRevision` - The revision of the server cluster specification. * `UInt` | `featureMap` - Indicates support for optional cluster features. * `List` | `generatedCommandList` - A list of server-generated commands supported by this cluster server instance. * `UInt?` | `maxMeasuredValue` - The maximum value of the current speed that can be measured. * `Int?` | `measuredValue` - The current speed value. * `SpeedMeasurementTrait.MeasurementUnit?` | `measurementUnit` - The measurement unit for the current speed value. * `UInt?` | `minMeasuredValue` - The minimum value of the current speed that can be measured. * `UInt?` | `tolerance` - The magnitude of possible error associated with the measured value. --- package: com.google.home.google.GoogleAudioVideoReceiverDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAudioVideoReceiverDevice.StandardTraits --- ### class GoogleAudioVideoReceiverDevice.StandardTraits Trait Container for Standard Traits. #### Public constructors * `StandardTraits(traitProvider: TraitProvider)` #### Public properties * `LevelControl?` | `levelControl` - Interface for controlling a characteristic that can be set to a level. * `MediaPlayback?` | `mediaPlayback` - Interface for controlling media playback (play, pause, etc.). * `OnOff?` | `onOff` - Interface for turning devices on and off. --- package: com.google.home.google.TogglesTrait.ToggleSynonyms --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TogglesTrait.ToggleSynonyms --- ### class TogglesTrait.ToggleSynonyms : ClusterStruct Synonyms of the toggle in a given language. #### Public constructors * `ToggleSynonyms(language: String = "", toggleSynonyms: List = emptyList())` - Creates the ToggleSynonyms class. #### Public functions * `open StructDescriptor` | `getDescriptor()` - Returns the descriptor for the struct. * `open Any?` | `getFieldValueById(tagId: UInt)` - Returns the value of the field for the given tag ID. #### Public properties * `String` | `language` - The language code in ISO 639-1. * `List` | `toggleSynonyms` - Synonyms of the toggle; the first string is the canonical name in that language. --- package: com.google.home.google.DispenseTrait.DispenseCommand.Response --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.DispenseCommand.Response --- ### class DispenseTrait.DispenseCommand.Response #### Public constructors * `Response()` --- package: com.google.home.google.GoogleDoorDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDoorDevice.StandardTraits --- ### class GoogleDoorDevice.StandardTraits Trait Container for Standard Traits. #### Public constructors * `StandardTraits(traitProvider: TraitProvider)` #### Public properties * `DoorLock?` | `doorLock` - Provides an interface to a generic way to secure a door. --- package: com.google.home.google.AssistantFulfillmentTrait.OkGoogleCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.OkGoogleCommand --- ### object AssistantFulfillmentTrait.OkGoogleCommand : CommandDescriptor #### Nested types * `class AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandRequest` - The request payload for the OkGoogleCommand command. * `class AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse` - The response payload for the OkGoogleCommand command. #### Public properties * `open String` | `commandId` - Unique id corresponding to the command. --- package: com.google.home.google.ExtendedPowerSource --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSource --- ### interface ExtendedPowerSource : ExtendedPowerSourceTrait.Attributes, MatterTrait, ExtendedPowerSourceCommands API for the ExtendedPowerSource trait. This trait belongs to devices which have a power source. #### Nested types * `enum ExtendedPowerSource.Attribute : Enum, Field` - Descriptor enum for this trait's attributes. * `enum ExtendedPowerSource.Command : Enum` - Descriptor enum for this trait's commands. #### Public functions * `supports(attribute: ExtendedPowerSource.Attribute): Boolean` * `supports(command: ExtendedPowerSource.Command): Boolean` #### Public properties * `open TraitFactory` | `factory` #### Inherited functions * `suspend Unit` | `startCharging()` * `BatchableCommand` | `startChargingBatchable()` * `suspend Unit` | `stopCharging()` * `BatchableCommand` | `stopChargingBatchable()` * `suspend Unit` | `forceRead()` #### Inherited properties * `List` | `acceptedCommandList` * `List` | `attributeList` * `Boolean?` | `batterySaverEnabled` * `List?` | `capacityRemaining` * `List?` | `capacityUntilFull` * `ExtendedPowerSourceTrait.ChargeSpeed?` | `chargeSpeed` * `UShort` | `clusterRevision` * `ExtendedPowerSourceTrait.DescriptiveCapacityRemaining?` | `descriptiveCapacityRemaining` * `ExtendedPowerSourceTrait.EnergySource?` | `energySource` * `ExtendedPowerSourceTrait.DistanceUnit?` | `energyStorageDistanceUnitForUx` * `UInt` | `featureMap` * `List` | `generatedCommandList` * `Boolean?` | `isPluggedIn` * `Boolean?` | `usingBackupEnergySource` * `Trait.TraitMetadata` | `metadata` --- package: com.google.home.google.NetworkControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControl.Attribute --- ### enum NetworkControl.Attribute : Enum, Field Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `guestNetworkEnabled` * `guestNetworkSettings` * `lastNetworkDownloadSpeedTest` * `lastNetworkUploadSpeedTest` * `networkEnabled` * `networkProfileStates` * `networkProfiles` * `networkSettings` * `networkSpeedTestInProgress` * `networkUsageLimitMb` * `networkUsageMb` * `networkUsageUnlimited` * `numConnectedDevices` #### Public companion properties * `StructDescriptor` | `StructDescriptor` #### Public functions * `valueOf(value: String): NetworkControl.Attribute` * `values(): Array` #### Public properties * `open Descriptor` | `descriptor` * `open String` | `fieldName` * `Boolean` | `isNullable` * `open UInt` | `tag` * `open Type` | `typeEnum` * `open String` | `typeName` --- package: com.google.home.google.ExtendedModeSelect.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelect.Attribute --- ### enum ExtendedModeSelect.Attribute : Enum, Field Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `currentModeSettings` * `featureMap` * `generatedCommandList` * `supportedModes` #### Public companion properties * `StructDescriptor` | `StructDescriptor` #### Public functions * `valueOf(value: String): ExtendedModeSelect.Attribute` * `values(): Array` #### Public properties * `open Descriptor` | `descriptor` * `open String` | `fieldName` * `Boolean` | `isNullable` * `open UInt` | `tag` * `open Type` | `typeEnum` * `open String` | `typeName` --- package: com.google.home.google.ExtendedDoorLockTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait --- ### object ExtendedDoorLockTrait Attributes for ExtendedDoorLockTrait. #### Nested types * `interface ExtendedDoorLockTrait.Attributes` - Attributes for the ExtendedDoorLock cluster. * `enum ExtendedDoorLockTrait.LockOperationSourceEnum : Enum, ClusterEnum` - The source of the lock operation. * `enum ExtendedDoorLockTrait.LockOperationTypeEnum : Enum, ClusterEnum` - The operation type of the lock. * `interface ExtendedDoorLockTrait.LockStateChange` - Event to indicate lock and unlock actions. * `class ExtendedDoorLockTrait.PrivacyModeActor : ClusterStruct` - Describes who and what last caused the privacy mode state to change. * `enum ExtendedDoorLockTrait.PrivacyModeActorMethodEnum : Enum, ClusterEnum` - The method of the privacy mode actor for changing a lock-related state. * `interface ExtendedDoorLockTrait.PrivacyModeStateChange` - Event to indicate privacy mode change. * `enum ExtendedDoorLockTrait.StructureMode : Enum, ClusterEnum` - The structure mode. #### Public properties * `ClusterId` | `Id` --- package: com.google.home.google.NetworkControlTrait.SpeedTestStatus --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.SpeedTestStatus --- ### enum NetworkControlTrait.SpeedTestStatus : Enum, ClusterEnum Whether the most recent network-download speed test succeeded or failed. #### Enum Values * `Failure` * `Success` * `UnknownValue` - The enum value is out of range. * `Unspecified` #### Public functions * `valueOf(value: String): NetworkControlTrait.SpeedTestStatus` * `values(): Array` #### Public properties * `open String` | `traitId` - Trait identifier of the Matter Cluster. * `open String` | `typeName` - Name of the Matter Data Type. * `open ULong` | `value` - Integer identifier of the enum value. --- package: com.google.home.google.GoogleRouterDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleRouterDevice --- ### class GoogleRouterDevice : DeviceType A network device that controls network traffic between networks. Routers can reboot, update, have QoS/parental controls, and perform network specific operations. #### Nested types * `class GoogleRouterDevice.GoogleTraits` - Trait Container for Google Traits. #### Public constructors * `GoogleRouterDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleRouterDevice.GoogleTraits)` #### Public properties * `open DeviceTypeFactory` | `factory` * `GoogleRouterDevice.GoogleTraits` | `googleTraits` * `open DeviceType.Metadata` | `metadata` #### Inherited functions * `open Flow` | `events()` - Gets a flow of all available Events. * `open Flow` | ` events(event: EventFactory)` - Gets a flow of a specific Event. * `open Flow` | ` events(trait: TraitFactory)` - Gets a flow of all Events by this `Trait`. * `open Trait.TraitMetadata?` | ` metadata(traitFactory: TraitFactory)` - Access a specific trait's metadata. * `open T?` | ` trait(traitFactory: TraitFactory)` - Access a specific trait. * `open Set` | `traits()` - Returns the set of available traits. --- package: com.google.home.google.GoogleChargerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleChargerDevice.GoogleTraits --- ### class GoogleChargerDevice.GoogleTraits Trait Container for Google Traits. #### Public constructors * `GoogleTraits(traitProvider: TraitProvider)` #### Public properties * `ExtendedPowerSource?` | `extendedPowerSource` - This trait belongs to devices which have a power source. --- package: com.google.home.google.ExtendedAirQualityTrait.MeasurementLocation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.MeasurementLocation --- ### enum ExtendedAirQualityTrait.MeasurementLocation : Enum, ClusterEnum The location of the measurement. #### Enum Values * `Indoor` - Measurement location is indoors. * `Outdoor` - Measurement location is outdoors. * `UnknownValue` - The enum value is out of range. * `Unspecified` - Measurement location is unspecified. #### Public functions * `valueOf(value: String): ExtendedAirQualityTrait.MeasurementLocation` * `values(): Array` #### Public properties * `open String` | `traitId` - Trait identifier of the Matter Cluster. * `open String` | `typeName` - Name of the Matter Data Type. * `open ULong` | `value` - Integer identifier of the enum value. --- package: com.google.home.google.SoilMoistureMeasurement.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SoilMoistureMeasurement.Attribute --- ### enum SoilMoistureMeasurement.Attribute : Enum, Field Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `maxMeasuredValue` * `measuredValue` * `minMeasuredValue` * `tolerance` #### Public companion properties * `StructDescriptor` | `StructDescriptor` #### Public functions * `valueOf(value: String): SoilMoistureMeasurement.Attribute` * `values(): Array` #### Public properties * `open Descriptor` | `descriptor` * `open String` | `fieldName` * `Boolean` | `isNullable` * `open UInt` | `tag` * `open Type` | `typeEnum` * `open String` | `typeName` --- package: com.google.home.google.VoiceStarter.OkGoogleEvent.EventFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarter.OkGoogleEvent.EventFields --- ### enum VoiceStarter.OkGoogleEvent.EventFields : Enum, Field #### Enum Values * `query` #### Public functions * `valueOf(value: String): VoiceStarter.OkGoogleEvent.EventFields` * `values(): Array` #### Public properties * `open Descriptor` | `descriptor` * `open String` | `fieldName` * `Boolean` | `isNullable` * `open UInt` | `tag` * `open Type` | `typeEnum` * `open String` | `typeName` --- package: com.google.home.google.ExtendedFanControlTrait.FanControlFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.FanControlFeature --- ### data class ExtendedFanControlTrait.FanControlFeature ExtendedFanControl trait feature map. #### Public constructors * `FanControlFeature(supportsFanSpeedPercent: Boolean = false)` #### Public functions * `open ULong` | `toRaw()` - Convert this ClusterBitmap to raw (bytes) format. #### Public properties * `String` | `bitmapName` - Name of the Matter bitmap. * `Boolean` | `supportsFanSpeedPercent` - Whether this device accepts commands for adjusting speed using a percentage. * `String` | `traitId` - Trait identifier of the Matter Cluster. --- package: com.google.home.google.ArmDisarmTrait.LevelCategory --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.LevelCategory --- ### enum ArmDisarmTrait.LevelCategory : Enum, ClusterEnum The security-level category, which influences how the level is displayed on devices with screens. #### Enum Values * `Away` * `Custom` * `Instant` * `Night` * `Stay` * `Unknown` * `UnknownValue` - The enum value is out of range. #### Public functions * `valueOf(value: String): ArmDisarmTrait.LevelCategory` * `values(): Array` #### Public properties * `open String` | `traitId` - Trait identifier of the Matter Cluster. * `open String` | `typeName` - Name of the Matter Data Type. * `open ULong` | `value` - Integer identifier of the enum value. --- package: com.google.home.google.LightEffectsTrait.WakeEffectSetCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.WakeEffectSetCommand --- ### object LightEffectsTrait.WakeEffectSetCommand : CommandDescriptor Activates the wake effect. Use this command from the `trait(LightEffects)`. #### Nested types * `class LightEffectsTrait.WakeEffectSetCommand.Request` - The request payload for the WakeEffectSet command. #### Public properties * `open String` | `commandId` - Unique id corresponding to the command. --- package: com.google.home.google.NotificationTrait.User --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait.User --- ### class NotificationTrait.User #### Public constructors * `User(name: String, email: String)` #### Public properties * `String` | `email` * `String` | `name` --- package: com.google.home.google.ExtendedPowerSourceTrait.DescriptiveCapacityRemaining --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.DescriptiveCapacityRemaining --- ### enum ExtendedPowerSourceTrait.DescriptiveCapacityRemaining : Enum, ClusterEnum The description of the remaining capacity. #### Enum Values * `CriticallyLow` * `Empty` * `Full` * `High` * `Low` * `Medium` * `Ok` * `UnknownValue` - The enum value is out of range. * `Unspecified` #### Public functions * `valueOf(value: String): ExtendedPowerSourceTrait.DescriptiveCapacityRemaining` * `values(): Array` #### Public properties * `open String` | `traitId` - Trait identifier of the Matter Cluster. * `open String` | `typeName` - Name of the Matter Data Type. * `open ULong` | `value` - Integer identifier of the enum value. --- package: com.google.home.google.GoogleFreezerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFreezerDevice --- ### class GoogleFreezerDevice : DeviceType A temperature-managing device which may be adjusted to various mode settings, and may allow temperature monitoring. #### Nested types * `class GoogleFreezerDevice.GoogleTraits` - Trait Container for Google Traits. * `class GoogleFreezerDevice.StandardTraits` - Trait Container for Standard Traits. #### Public constructors * `GoogleFreezerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleFreezerDevice.GoogleTraits, standardTraits: GoogleFreezerDevice.StandardTraits)` #### Public properties * `open DeviceTypeFactory` | `factory` * `GoogleFreezerDevice.GoogleTraits` | `googleTraits` * `open DeviceType.Metadata` | `metadata` * `GoogleFreezerDevice.StandardTraits` | `standardTraits` #### Inherited functions * `open Flow` | `events()` - Gets a flow of all available Events. * `open Flow` | ` events(event: EventFactory)` - Gets a flow of a specific Event. * `open T?` | ` trait(traitFactory: TraitFactory)` - Access a specific trait. * `open Set` | `traits()` - Returns the set of available traits. --- package: com.google.home.google.ExtendedModeSelectTrait.ModeSynonyms --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait.ModeSynonyms --- ### class ExtendedModeSelectTrait.ModeSynonyms : ClusterStruct #### Public constructors * `ModeSynonyms(language: String = "", modeSynonyms: List = emptyList())` #### Public functions * `open StructDescriptor` | `getDescriptor()` - Returns the descriptor for the struct. * `open Any?` | `getFieldValueById(tagId: UInt)` - Returns the value of the field for the given tag ID. #### Public properties * `String` | `language` * `List` | `modeSynonyms` --- package: com.google.home.google.GooglePressureCookerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePressureCookerDevice --- ### class GooglePressureCookerDevice : DeviceType A kitchen appliance that cooks food quickly at a high temperature using steam under pressure. Interactions may include starting/stopping, setting a timer, and adjusting modes or settings. #### Nested types * `class GooglePressureCookerDevice.GoogleTraits` - Trait Container for Google Traits. * `class GooglePressureCookerDevice.StandardTraits` - Trait Container for Standard Traits. #### Public constructors * `GooglePressureCookerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GooglePressureCookerDevice.GoogleTraits, standardTraits: GooglePressureCookerDevice.StandardTraits)` #### Public properties * `open DeviceTypeFactory` | `factory` * `GooglePressureCookerDevice.GoogleTraits` | `googleTraits` * `open DeviceType.Metadata` | `metadata` * `GooglePressureCookerDevice.StandardTraits` | `standardTraits` #### Inherited functions * `open Flow` | `events()` - Gets a flow of all available Events. * `open Flow` | ` events(event: EventFactory)` - Gets a flow of a specific Event. * `open T?` | ` trait(traitFactory: TraitFactory)` - Access a specific trait. * `open Set` | `traits()` - Returns the set of available traits. --- package: com.google.home.google.LeafWetnessMeasurement.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LeafWetnessMeasurement.Attribute --- ### enum LeafWetnessMeasurement.Attribute : Enum, Field Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `maxMeasuredValue` * `measuredValue` * `minMeasuredValue` * `tolerance` #### Public companion properties * `StructDescriptor` | `StructDescriptor` #### Public functions * `valueOf(value: String): LeafWetnessMeasurement.Attribute` * `values(): Array` #### Public properties * `open Descriptor` | `descriptor` * `open String` | `fieldName` * `Boolean` | `isNullable` * `open UInt` | `tag` * `open Type` | `typeEnum` * `open String` | `typeName` --- package: com.google.home.google.GoogleStreamingSoundbarDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingSoundbarDevice.StandardTraits --- ### `class GoogleStreamingSoundbarDevice.StandardTraits` Trait Container for Standard Traits. **Constructor** - `StandardTraits(traitProvider: TraitProvider)` **Properties** - `levelControl: LevelControl?` - Provides an interface for controlling a characteristic of a device that can be set to a level. - `mediaPlayback: MediaPlayback?` - Provides an interface for controlling media playback (play, pause, and so forth) on a media device. - `onOff: OnOff?` - Provides an interface for turning devices on and off. --- package: com.google.home.google.Timer.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Timer.Attribute --- ### `enum Timer.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `acceptedCommandList` - `attributeList` - `clusterRevision` - `commandOnlyTimer` - `featureMap` - `generatedCommandList` - `maxTimerLimitSeconds` - `timerPaused` - `timerRemainingSeconds` **Companion Properties** - `StructDescriptor: StructDescriptor` **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.SimplifiedThermostat.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedThermostat.Attribute --- ### `enum SimplifiedThermostat.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `acceptedCommandList` - `attributeList` - `clusterRevision` - `featureMap` - `generatedCommandList` - `systemMode` **Companion Properties** - `StructDescriptor: StructDescriptor` **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.ExtendedFanControlTrait.SpeedValues --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.SpeedValues --- ### `class ExtendedFanControlTrait.SpeedValues : ClusterStruct` Synonyms for the speed setting in each supported language. **Constructor** - `SpeedValues(lang: String = "", speedSynonym: List = emptyList())` **Functions** - `getDescriptor(): StructDescriptor` - Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?` - Returns the value of the field for the given tag ID. **Properties** - `lang: String` - ISO 639-1 language code, for example, `en` for English. - `speedSynonym: List` - The descriptive name of the speed setting. --- package: com.google.home.google.LockUnlockTrait.StatusEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.StatusEnum --- ### `enum LockUnlockTrait.StatusEnum : ClusterEnum` The status of the lock or unlock command. **Enum Values** - `Failure` - The command failed to complete successfully. - `Success` - The command completed successfully. - `UnknownValue` - The enum value is out of range. - `Unspecified` - The status is unspecified. **Properties** - `traitId: String` - Trait identifier of the Matter Cluster that defines the enum Data Type. - `typeName: String` - Name of the Matter Data Type that the enum belongs to. - `value: ULong` - Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.Notification.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Notification.Attribute --- ### `enum Notification.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `structureMembers` - Message to be broadcasted. **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.ExtendedDoorLock --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLock --- ### `interface ExtendedDoorLock : ExtendedDoorLockTrait.Attributes, MatterTrait, Updatable` API for the ExtendedDoorLock trait, for devices with extended door lock functionality. **Nested Types** - `enum Attribute`: Descriptor enum for this trait's attributes. **Functions** - `supports(attribute: ExtendedDoorLock.Attribute): Boolean` **Properties** - `factory: TraitFactory` **Inherited Functions** - From `Updatable`: `update(...)` - Creates a mutable copy, mutates it, and saves it. - From `TraitStateInvalidation`: `forceRead()` **Inherited Properties** - From `ExtendedDoorLockTrait.Attributes`: - `acceptedCommandList: List` - List of supported client-generated commands. - `attributeList: List` - List of supported attribute IDs. - `clusterRevision: UShort` - Revision of the server cluster specification. - `enableLockHomeAwayAssist: Boolean?` - Whether the device is enabled for home-away assist lock setting. - `featureMap: UInt` - Bitmap of supported optional cluster features. - `generatedCommandList: List` - List of supported server-generated commands. - `ignoreAutoRelockOnStructureMode: List?` - Structure modes for which the device should ignore auto relock settings. - From `Trait`: - `metadata: Trait.TraitMetadata` --- package: com.google.home.google.ExtendedOperationalStateTrait.StartWithOperationZonesCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StartWithOperationZonesCommand --- ### `object ExtendedOperationalStateTrait.StartWithOperationZonesCommand : CommandDescriptor` Start the device in one or more operation zones. **Nested Types** - `class Request`: The request payload for the StartWithOperationZones command. **Properties** - `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.GoogleShowerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleShowerDevice.GoogleTraits --- ### `class GoogleShowerDevice.GoogleTraits` Trait Container for Google Traits. **Constructor** - `GoogleTraits(traitProvider: TraitProvider)` **Properties** - `extendedOperationalState: ExtendedOperationalState?` - Represents a device that supports operating in specific zones and has a queryable operation duration. - `extendedTemperatureControl: ExtendedTemperatureControl?` - For devices, other than thermostats, that support controlling temperature. --- package: com.google.home.google.AssistantBroadcastTrait.BroadcastCommand.BroadcastCommandRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantBroadcastTrait.BroadcastCommand.BroadcastCommandRequest --- ### `class AssistantBroadcastTrait.BroadcastCommand.BroadcastCommandRequest` The request payload for the BroadcastCommand command. **Constructor** - `BroadcastCommandRequest(msg: String? = null)` **Properties** - `msg: String?` --- package: com.google.home.google.ExtendedThermostatTrait.NotifySensorStateChangeCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.NotifySensorStateChangeCommand --- ### `object ExtendedThermostatTrait.NotifySensorStateChangeCommand : CommandDescriptor` **Nested Types** - `class Request` **Properties** - `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.LeafWetnessMeasurement --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LeafWetnessMeasurement --- ### `interface LeafWetnessMeasurement : LeafWetnessMeasurementTrait.Attributes, MatterTrait` API for the LeafWetnessMeasurement trait, providing an interface to leaf wetness measurement. **Nested Types** - `enum Attribute`: Descriptor enum for this trait's attributes. **Functions** - `supports(attribute: LeafWetnessMeasurement.Attribute): Boolean` - `forceRead(): suspend Unit` (Inherited) **Properties** - `factory: TraitFactory` **Inherited Properties** - From `LeafWetnessMeasurementTrait.Attributes`: - `acceptedCommandList: List` - `attributeList: List` - `clusterRevision: UShort` - `featureMap: UInt` - `generatedCommandList: List` - `maxMeasuredValue: UInt?` - The maximum value of the measured value that can be measured. - `measuredValue: UInt?` - Leaf wetness measured in water content percentage. - `minMeasuredValue: UInt?` - The minimum value of the measured value that can be measured. - `tolerance: UInt?` - The magnitude of the possible error associated with the measured value. - From `Trait`: - `metadata: Trait.TraitMetadata` --- package: com.google.home.google.NetworkControlTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait --- ### `object NetworkControlTrait` Attributes for NetworkControlTrait. **Nested Types** - `interface Attributes`: Attributes for the NetworkControl cluster. - `object EnableDisableGuestNetworkCommand`: Enables or disables the guest network. - `class EnableDisableGuestNetworkCommand.Request`: Request payload. - `object EnableDisableNetworkProfileCommand`: Enables or disables a network profile. - `class EnableDisableNetworkProfileCommand.Request`: Request payload. - `object GetGuestNetworkPasswordCommand`: Gets the password of the guest network. - `class GetGuestNetworkPasswordCommand.Request`: Request payload. - `class GetGuestNetworkPasswordCommand.Response` - `class GuestNetworkSettings`: Settings of the guest network. - `class LastNetworkDownloadSpeedTest`: Results of the most recent network-download speed test. - `class LastNetworkUploadSpeedTest`: Results of the most recent network-upload speed test. - `data class NetworkControlFeature`: NetworkControl trait FeatureMap. - `class NetworkProfileState`: The state of one of the network profiles. - `class NetworkSettings`: Settings of the main network. - `enum SpeedTestStatus`: Whether the most recent network-download speed test succeeded or failed. - `object TestNetworkSpeedCommand`: Tests the network's download and upload speed. - `class TestNetworkSpeedCommand.Request`: Request payload. - `interface TestNetworkSpeedFollowUp`: The follow-up event for the `TestNetworkSpeed` command. **Properties** - `Id: ClusterId` --- package: com.google.home.google.VoiceStarter.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarter.Attribute --- ### `enum VoiceStarter.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `reservedQueriesList` **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.LaunchAppCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.LaunchAppCommand --- ### `object ExtendedApplicationLauncherTrait.LaunchAppCommand : CommandDescriptor` Launch the given application. **Nested Types** - `class Request`: The request payload for the LaunchApp command. **Properties** - `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.GoogleCoffeeMakerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleCoffeeMakerDevice --- ### `class GoogleCoffeeMakerDevice : DeviceType` A kitchen applicance device that makes coffee. **Nested Types** - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. **Constructor** - `GoogleCoffeeMakerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, ...)` **Properties** - `factory: DeviceTypeFactory` - `googleTraits: GoogleCoffeeMakerDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleCoffeeMakerDevice.StandardTraits` **Inherited Functions** - From `HasEvents`: `events(...)` - Gets a flow of events. - From `TraitProvider`: `metadata(...)`, `trait(...)`, `traits()` - Access traits and their metadata. --- package: com.google.home.google.GoogleFaucetDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFaucetDevice.StandardTraits --- ### `class GoogleFaucetDevice.StandardTraits` Trait Container for Standard Traits. **Constructor** - `StandardTraits(traitProvider: TraitProvider)` **Properties** - `operationalState: OperationalState?` - Supports remote monitoring and changing of the device's operational state. - `temperatureControl: TemperatureControl?` - Provides an interface to the setpoint temperature. - `temperatureMeasurement: TemperatureMeasurement?` - Provides an interface to temperature measurement capability. --- package: com.google.home.google.VoiceStarter.OkGoogleEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarter.OkGoogleEvent --- ### `class VoiceStarter.OkGoogleEvent : Event, VoiceStarterTrait.OkGoogleEvent` **Nested Types** - `enum EventFields` **Properties** - `eventImportance: EventImportance` - Importance of the event. - `eventName: String` - Event name. - `eventNumber: ULong` - Event number. **Inherited Properties** - From `Event`: - `eventId: Id` - `timestamp: Instant` - From `VoiceStarterTrait.OkGoogleEvent`: - `query: String?` --- package: com.google.home.google.GoogleGameConsoleDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGameConsoleDevice.StandardTraits --- ### `class GoogleGameConsoleDevice.StandardTraits` Trait Container for Standard Traits. **Constructor** - `StandardTraits(traitProvider: TraitProvider)` **Properties** - `levelControl: LevelControl?` - Interface for controlling a characteristic that can be set to a level. - `mediaPlayback: MediaPlayback?` - Interface for controlling media playback. - `onOff: OnOff?` - Interface for turning devices on and off. --- package: com.google.home.google.SpeedMeasurement.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SpeedMeasurement.Attribute --- ### `enum SpeedMeasurement.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `acceptedCommandList` - `attributeList` - `clusterRevision` - `featureMap` - `generatedCommandList` - `maxMeasuredValue` - `measuredValue` - `measurementUnit` - `minMeasuredValue` - `tolerance` **Companion Properties** - `StructDescriptor: StructDescriptor` **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.OpenClose --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenClose --- ### `interface OpenClose : OpenCloseTrait.Attributes, MatterTrait, OpenCloseCommands` API for devices that support opening and closing. **Nested Types** - `enum Attribute`: Descriptor enum for this trait's attributes. - `enum Command`: Descriptor enum for this trait's commands. **Functions** - `supports(attribute: OpenClose.Attribute): Boolean` - `supports(command: OpenClose.Command): Boolean` **Properties** - `factory: TraitFactory` **Inherited Functions** - From `OpenCloseCommands`: - `close()` / `closeBatchable()` - `goToOpenPercentage(...)` / `goToOpenPercentageBatchable(...)` - `open(...)` / `openBatchable(...)` - `step(...)` / `stepBatchable(...)` - From `TraitStateInvalidation`: `forceRead()` **Inherited Properties** - From `OpenCloseTrait.Attributes`: - `openPercent: Double?` - Percentage a device is opened (0-100). - `openState: List?` - `supportedDirections: List?` - `targetOpenPercent: Double?` - and other common attributes (`acceptedCommandList`, `featureMap`, etc.). - From `Trait`: `metadata: Trait.TraitMetadata` --- package: com.google.home.google.TogglesTrait.ChangeToggleSettingsCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TogglesTrait.ChangeToggleSettingsCommand.Request --- ### `class TogglesTrait.ChangeToggleSettingsCommand.Request` The request payload for the ChangeToggleSettings command. **Constructor** - `Request(updatedToggleSettings: List)` **Properties** - `updatedToggleSettings: List` - The list of toggles to change. --- package: com.google.home.google.DispenseTrait.DispensableItem --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.DispensableItem --- ### `class DispenseTrait.DispensableItem : ClusterStruct` The available dispensible items. **Constructor** - `DispensableItem(itemName: String, itemNameSynonyms: List<...>, supportedUnits: List<...>, defaultPortion: ...)` **Functions** - `getDescriptor(): StructDescriptor` - `getFieldValueById(tagId: UInt): Any?` **Properties** - `defaultPortion: DispenseTrait.Amount` - Typical amount of the item that may be dispensed. - `itemName: String` - Internal name for the dispensed item. - `itemNameSynonyms: List` - Synonym names for the item in each supported language. - `supportedUnits: List` - Set of units the device supports for that item. --- package: com.google.home.google.CookTrait.CookingMode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.CookingMode --- ### `enum CookTrait.CookingMode : ClusterEnum` The current cooking mode. **Enum Values** - `Bake`, `Beat`, `Blend`, `Boil`, `Brew`, `Broil`, `ConvectionBake`, `Cook`, `Defrost`, `Dehydrate`, `Ferment`, `Fry`, `Grill`, `Knead`, `Microwave`, `Mix`, `PressureCook`, `Puree`, `Roast`, `Saute`, `SlowCook`, `SousVide`, `Steam`, `Stew`, `Stir`, `Warm`, `Whip`, `UnknownCookingMode`, `UnknownValue` **Properties** - `traitId: String` - Trait identifier of the Matter Cluster. - `typeName: String` - Name of the Matter Data Type. - `value: ULong` - Integer identifier of the enum value. --- package: com.google.home.google.GoogleStandmixerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStandmixerDevice.GoogleTraits --- ### `class GoogleStandmixerDevice.GoogleTraits` Trait Container for Google Traits. **Constructor** - `GoogleTraits(traitProvider: TraitProvider)` **Properties** - `cook: Cook?` - For devices that can cook food according to various food presets and cooking modes. - `extendedOperationalState: ExtendedOperationalState?` - For devices that support operating in specific zones and have a queryable operation duration. --- package: com.google.home.google.Max2FilterMonitoring.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Max2FilterMonitoring.Attribute --- ### `enum Max2FilterMonitoring.Attribute` Descriptor enum for this trait's attributes. **Enum Values** - `acceptedCommandList` - `attributeList` - `changeIndication` - `clusterRevision` - `condition` - `featureMap` - `generatedCommandList` **Companion Properties** - `StructDescriptor: StructDescriptor` **Properties** - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` --- package: com.google.home.google.ExtendedPowerSourceTrait.UsingBackUpEnergySource --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.UsingBackUpEnergySource --- ### `interface ExtendedPowerSourceTrait.UsingBackUpEnergySource` **Properties** - `priority: UInt?` --- package: com.google.home.google.ArmDisarmTrait.ArmDisarmCommand.OptionalArgs --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.ArmDisarmCommand.OptionalArgs --- ### `interface ArmDisarmTrait.ArmDisarmCommand.OptionalArgs` Optional arguments for the ArmDisarmCommand Request. **Properties** - `armLevel: String` - The name of the arm level to use. - `cancel: Boolean` - Whether to cancel an ongoing arming or disarming operation. --- package: com.google.home.google.ExtendedTemperatureControlTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedTemperatureControlTrait.Attributes --- ### `interface ExtendedTemperatureControlTrait.Attributes` Attributes for the ExtendedTemperatureControl cluster. **Known direct subclasses:** `ExtendedTemperatureControl` **Properties** - `acceptedCommandList: List` - List of supported client-generated commands. - `attributeList: List` - List of supported attribute IDs. - `clusterRevision: UShort` - The revision of the server cluster specification. - `featureMap: UInt` - Bitmap of supported optional cluster features. - `generatedCommandList: List` - List of supported server-generated commands. - `temperatureDisplayMode: ExtendedTemperatureControlTrait.TemperatureDisplayMode?` - Units of temperature displayed on the thermostat screen. --- package: com.google.home.google.LockUnlockTrait.LockUnlockErrorFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.LockUnlockErrorFollowUp --- ### `interface LockUnlockTrait.LockUnlockErrorFollowUp` **Properties** - `errorCode: String?` ---END TEXT--- --- package: com.google.home.google.NetworkControlTrait.GuestNetworkSettings --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.GuestNetworkSettings --- ### `NetworkControlTrait.GuestNetworkSettings` A class for settings of the guest network. Inherits from `ClusterStruct`. #### Constructor * `GuestNetworkSettings(ssid: String = "")` #### Functions * `getDescriptor(): StructDescriptor` - Returns the struct descriptor. * `getFieldValueById(tagId: UInt): Any?` - Returns a field's value by its tag ID. #### Properties * `ssid: String` - SSID of the guest network. --- package: com.google.home.google.TimeTrait.SolarTimeType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.SolarTimeType --- ### `TimeTrait.SolarTimeType` An enum for solar time type. #### Enum Values * `Sunrise` - Sunrise. * `Sunset` - Sunset. #### Functions * `valueOf(value: String): TimeTrait.SolarTimeType` * `values(): Array` --- package: com.google.home.google.GoogleCoffeeMakerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleCoffeeMakerDevice.GoogleTraits --- ### `GoogleCoffeeMakerDevice.GoogleTraits` A trait container class for Google Traits. #### Constructor * `GoogleTraits(traitProvider: TraitProvider)` #### Properties * `cook: Cook?` - Trait for devices that can cook food. * `extendedTemperatureControl: ExtendedTemperatureControl?` - Trait for devices that control temperature. --- package: com.google.home.google.ArmDisarmTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.Attributes --- ### `ArmDisarmTrait.Attributes` An interface for attributes for the ArmDisarm cluster. *Known direct subclass: `ArmDisarm`* #### Properties * `acceptedCommandList: List` - List of supported client-generated commands. * `armState: ArmDisarmTrait.ArmState?` - Current arm state of the device. (Read-only) * `attributeList: List` - List of supported attribute IDs. * `availableArmLevels: ArmDisarmTrait.AvailableArmLevels?` - The supported security levels. (Read-only) * `clusterRevision: UShort` - The revision of the server cluster specification. * `currentArmLevel: String?` - The current security level. (Read-only) * `entryAllowanceEndTimeSeconds: Long?` - Epoch Unix timestamp for when an active entry allowance expires. (Read-only) * `exitAllowanceEndTimeSeconds: Long?` - Epoch Unix timestamp for when an active exit allowance expires. (Read-only) * `exitAllowanceSeconds: UInt?` - Number of seconds before the `currentArmLevel` takes effect. (Read-only) * `featureMap: UInt` - Bitmap of supported optional cluster features. * `generatedCommandList: List` - List of supported server-generated commands. * `isArmed: Boolean?` - Indicates if the device is currently armed. (Read-only) * `targetArmLevel: String?` - The level the device will enter after an exit countdown. (Read-only) --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ShuffleCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ShuffleCommand.Request --- ### `ExtendedMediaPlaybackTrait.ShuffleCommand.Request` A class for the Shuffle command request payload. #### Constructor * `Request()` --- package: com.google.home.google.ElevatorControlTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlTrait.Attributes --- ### `ElevatorControlTrait.Attributes` An interface for attributes for the ElevatorControl cluster. *Known direct subclass: `ElevatorControl`* #### Properties * `acceptedCommandList: List` - List of supported client-generated commands. * `attributeList: List` - List of supported attribute IDs. * `clusterRevision: UShort` - The revision of the server cluster specification. * `featureMap: ElevatorControlTrait.ElevatorControlFeature` - Bitmap of supported optional cluster features. * `generatedCommandList: List` - List of supported server-generated commands. * `supportedElevatorFloors: List?` - Information on the floors this elevator supports. (Read-only) --- package: com.google.home.google.Reboot.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Reboot.Attribute --- ### `Reboot.Attribute` An enum descriptor for the `Reboot` trait's attributes. Implements `Field`. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` #### Companion Properties * `StructDescriptor: StructDescriptor` #### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` #### Functions * `valueOf(value: String): Reboot.Attribute` * `values(): Array` --- package: com.google.home.google.TimeTrait.SolarTimeStruct --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.SolarTimeStruct --- ### `TimeTrait.SolarTimeStruct` A struct for SolarTime, representing an offset from a solar event. #### Nested Types * `enum StructFields` #### Constructors * `SolarTimeStruct(type: TimeTrait.SolarTimeType)` * `SolarTimeStruct(type: TimeTrait.SolarTimeType, offset: Duration)` #### Functions * `equals(other: Any?): Boolean` * `hashCode(): Int` * `toString(): String` #### Properties * `offset: Duration` * `type: TimeTrait.SolarTimeType` --- package: com.google.home.google.TimeTrait.SolarTimeStruct.StructFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.SolarTimeStruct.StructFields --- ### `TimeTrait.SolarTimeStruct.StructFields` An enum for the fields in `SolarTimeStruct`. Implements `Field`. #### Enum Values * `offset` * `type` #### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` #### Functions * `valueOf(value: String): TimeTrait.SolarTimeStruct.StructFields` * `values(): Array` --- package: com.google.home.google.ElevatorControlTrait.CallElevatorCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlTrait.CallElevatorCommand --- ### `ElevatorControlTrait.CallElevatorCommand` An object descriptor for the "Call the elevator" command. *See also: `callElevator`* #### Nested Types * `class Request`: The request payload for the command. #### Properties * `commandId: String` - Unique ID for the command. --- package: com.google.home.google.AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleRequest --- ### `AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleRequest` A class for the OkGoogle command request payload. #### Nested Types * `enum CommandFields` #### Constructor * `OkGoogleRequest(query: String)` #### Properties * `query: String` - The query to be executed. --- package: com.google.home.google.LightEffectsTrait.LightEffectsFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.LightEffectsFeature --- ### `LightEffectsTrait.LightEffectsFeature` A data class for capabilities related to light effects. #### Constructor * `LightEffectsFeature(pulse: Boolean = false, sleep: Boolean = false, wake: Boolean = false)` #### Functions * `toRaw(): ULong` - Converts the ClusterBitmap to raw format. #### Properties * `bitmapName: String` - Name of the Matter bitmap (e.g., "OnOffControlBitmap"). * `pulse: Boolean` - Device supports the pulse effect (ramping brightness up and down). * `sleep: Boolean` - Device supports the sleep effect (gradually lowering brightness). * `traitId: String` - Trait identifier of the Matter Cluster. * `wake: Boolean` - Device supports the wake effect (gradually increasing brightness). --- package: com.google.home.google.ExtendedThermostatTrait.PresetSynonyms --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.PresetSynonyms --- ### `ExtendedThermostatTrait.PresetSynonyms` A class for synonyms for a preset in a given language. Inherits from `ClusterStruct`. #### Constructor * `PresetSynonyms(language: String = "", synonyms: List = emptyList())` #### Functions * `getDescriptor(): StructDescriptor` * `getFieldValueById(tagId: UInt): Any?` #### Properties * `language: String` - ISO 639-1 language code (e.g., `en`). * `synonyms: List` - Synonyms for the preset. The first is the canonical name. --- package: com.google.home.google.Max2FilterMonitoringTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Max2FilterMonitoringTrait.Attributes --- ### `Max2FilterMonitoringTrait.Attributes` An interface for attributes for the Max2FilterMonitoring cluster. *Known direct subclass: `Max2FilterMonitoring`* #### Properties * `acceptedCommandList: List` - List of supported client-generated commands. * `attributeList: List` - List of supported attribute IDs. * `changeIndication: Max2FilterMonitoringTrait.ChangeIndication?` - The current requirement to change the Max2 filter. (Read-only) * `clusterRevision: UShort` - The revision of the server cluster specification. * `condition: UInt?` - The current condition of the Max2 filter as a percentage of use remaining. (Read-only) * `featureMap: UInt` - Bitmap of supported optional cluster features. * `generatedCommandList: List` - List of supported server-generated commands. --- package: com.google.home.google.NetworkControlTrait.GetGuestNetworkPasswordCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.GetGuestNetworkPasswordCommand.Request --- ### `NetworkControlTrait.GetGuestNetworkPasswordCommand.Request` A class for the GetGuestNetworkPassword command request payload. #### Constructor * `Request()` --- package: com.google.home.google.GoogleBlenderDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBlenderDevice.StandardTraits --- ### `GoogleBlenderDevice.StandardTraits` A trait container class for Standard Traits. #### Constructor * `StandardTraits(traitProvider: TraitProvider)` #### Properties * `onOff: OnOff?` - Trait for turning devices on and off. * `operationalState: OperationalState?` - Trait for monitoring and changing the device's operational state. --- package: com.google.home.google.ExtendedLevelControlTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedLevelControlTrait --- ### `ExtendedLevelControlTrait` An object containing attributes for `ExtendedLevelControlTrait`. #### Nested Types * `interface Attributes`: Attributes for the ExtendedLevelControl cluster. #### Properties * `Id: ClusterId` --- package: com.google.home.google.TimerTrait.TimerPauseCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerPauseCommand --- ### `TimerTrait.TimerPauseCommand` An object descriptor for the "Pauses the device timer" command. *See also: `timerPause`* #### Nested Types * `class Request`: The request payload for the command. #### Properties * `commandId: String` - Unique ID for the command. --- package: com.google.home.google.VolumeCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeCommands --- ### `VolumeCommands` An interface for volume commands. *Known direct subclass: `Volume`* #### Functions * `suspend fun moveToVolume(volumePercent: UByte)` - Moves the volume to a specified percentage (0-100). * Also available as `moveToVolumeBatchable(...)`. * `suspend fun mute()` - Mutes the device. * Also available as `muteBatchable()`. * `suspend fun unmute()` - Unmutes the device to the last non-zero volume. * Also available as `unmuteBatchable()`. * `suspend fun volumeStep(stepMode: VolumeTrait.VolumeStepModeEnum, step: UByte)` - Incremental step volume. * `stepMode`: Increase or decrease. * `step`: Increment amount (0-100). * Also available as `volumeStepBatchable(...)`. --- package: com.google.home.google.Brightness.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Brightness.Command --- ### `Brightness.Command` An enum descriptor for the `Brightness` trait's commands. #### Enum Values * `BrightnessStep` * `MoveToBrightness` #### Properties * `tag: UInt` #### Functions * `valueOf(value: String): Brightness.Command` * `values(): Array` --- package: com.google.home.google.OpenCloseTrait.StepCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.StepCommand.Request --- ### `OpenCloseTrait.StepCommand.Request` A class for the Step command request payload. #### Constructor * `Request(openRelativePercent: Double = 0.0, openDirection: OpenCloseTrait.Direction = Direction.Unspecified)` #### Properties * `openDirection: OpenCloseTrait.Direction` - The direction in which to open. * `openRelativePercent: Double` - The exact percentage to change the open-close state. --- package: com.google.home.google.GoogleFaucetDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFaucetDevice --- ### `GoogleFaucetDevice` A `DeviceType` that controls the flow of liquid. #### Nested Types * `GoogleFaucetDevice.GoogleTraits` - Trait Container for Google Traits. * `GoogleFaucetDevice.StandardTraits` - Trait Container for Standard Traits. #### Constructor * `GoogleFaucetDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleFaucetDevice.GoogleTraits, standardTraits: GoogleFaucetDevice.StandardTraits)` #### Properties * `factory: DeviceTypeFactory` * `googleTraits: GoogleFaucetDevice.GoogleTraits` * `metadata: DeviceType.Metadata` * `standardTraits: GoogleFaucetDevice.StandardTraits` #### Inherited Functionality * From `HasEvents`: `events()` to get flows of events. * From `TraitProvider`: `trait()` and `metadata()` to access specific traits. --- package: com.google.home.google.ExtendedPowerSourceTrait.EnergySource --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.EnergySource --- ### `ExtendedPowerSourceTrait.EnergySource` An enum for energy source type. Implements `ClusterEnum`. #### Enum Values * `Battery` * `Solar` * `UnknownValue` - The enum value is out of range. * `Unspecified` * `Wire` #### Properties * `traitId: String` - Trait identifier of the Matter Cluster. * `typeName: String` - Name of the Matter Data Type. * `value: ULong` - Integer identifier of the enum value. #### Functions * `valueOf(value: String): ExtendedPowerSourceTrait.EnergySource` * `values(): Array` --- package: com.google.home.google.TimerCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerCommands --- ### `TimerCommands` An interface for timer commands. *Known direct subclass: `Timer`* #### Functions * `suspend fun timerAdjust(adjustmentTimeSeconds: Int)` - Adjusts the timer duration. * Also available as `timerAdjustBatchable(...)`. * `suspend fun timerCancel()` - Cancels the timer. * Also available as `timerCancelBatchable()`. * `suspend fun timerPause()` - Pauses the timer. * Also available as `timerPauseBatchable()`. * `suspend fun timerResume()` - Resumes the timer. * Also available as `timerResumeBatchable()`. * `suspend fun timerStart(timerTimeSeconds: Int)` - Starts a new timer. * Also available as `timerStartBatchable(...)`. --- package: com.google.home.google.ExtendedOperationalStateCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateCommands --- ### `ExtendedOperationalStateCommands` An interface for extended operational state commands. *Known direct subclass: `ExtendedOperationalState`* #### Functions * `suspend fun startWithDuration(operationZones: List, durationSeconds: UInt)` - Starts the device in specified zones for a duration. * Also available as `startWithDurationBatchable(...)`. * `suspend fun startWithOperationZones(operationZones: List)` - Starts the device in specified zones. * Also available as `startWithOperationZonesBatchable(...)`. --- package: com.google.home.google.CookTrait.FoodPreset --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.FoodPreset --- ### `CookTrait.FoodPreset` A class for an internal food preset name. Inherits from `ClusterStruct`. #### Constructor * `FoodPreset(foodPresetName: String = "", supportedUnits: List = emptyList(), foodSynonyms: List = emptyList())` #### Functions * `getDescriptor(): StructDescriptor` * `getFieldValueById(tagId: UInt): Any?` #### Properties * `foodPresetName: String` - Synonyms for the preset. * `foodSynonyms: List` - Food name synonyms in each supported language. * `supportedUnits: List` - Units supported by the device for a specific food. --- package: com.google.home.google.SyntheticSwitch --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitch --- ### `SyntheticSwitch` An interface for the SyntheticSwitch trait, simplifying the standard Switch trait. Implements `SyntheticSwitchTrait.Attributes` and `MatterTrait`. #### Nested Types * `enum Attribute`: Descriptor for this trait's attributes. #### Functions * `supports(attribute: SyntheticSwitch.Attribute): Boolean` #### Properties * `factory: TraitFactory` #### Inherited * **Functions**: `forceRead()` from `TraitStateInvalidation`. * **Properties**: `acceptedCommandList`, `attributeList`, `clusterRevision`, `featureMap`, `generatedCommandList` from `SyntheticSwitchTrait.Attributes`, and `metadata` from `Trait`. --- package: com.google.home.google.VolumeTrait.MuteCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.MuteCommand.Request --- ### `VolumeTrait.MuteCommand.Request` A class for the Mute command request payload. #### Constructor * `Request()` --- package: com.google.home.google.GoogleMopDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMopDevice.GoogleTraits --- ### `GoogleMopDevice.GoogleTraits` A trait container class for Google Traits. #### Constructor * `GoogleTraits(traitProvider: TraitProvider)` #### Properties * `dock: Dock?` - Trait for self-mobile devices that can return for charging. * `extendedOperationalState: ExtendedOperationalState?` - Trait for devices supporting operation in specific zones with a queryable duration. * `extendedPowerSource: ExtendedPowerSource?` - Trait for devices with a power source. * `locator: Locator?` - Trait to locate devices via a local indicator (beep, flash). * `reboot: Reboot?` - Trait for devices that support rebooting. --- package: com.google.home.google.LockUnlockTrait.UnlockFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.UnlockFollowUp --- ### `LockUnlockTrait.UnlockFollowUp` An interface for the follow-up response for the `unlock` command. --- package: com.google.home.google.ElevatorControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControl --- # ElevatorControl `interface ElevatorControl : ElevatorControlTrait.Attributes, MatterTrait, ElevatorControlCommands` API for the ElevatorControl trait, designed for calling an elevator to a floor. ### Nested Types * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. ### Public Functions * `supports(attribute: ElevatorControl.Attribute): Boolean` * `supports(command: ElevatorControl.Command): Boolean` ### Public Properties * `factory: TraitFactory` ### Inherited Functions * `suspend callElevator(floorName: String): Unit`: Call the elevator. * `callElevatorBatchable(floorName: String): BatchableCommand`: The batchable version of `callElevator` command. * `suspend forceRead(): Unit` ### Inherited Properties * `acceptedCommandList: List`: A list of supported client-generated commands. * `attributeList: List`: A list of supported attribute IDs. * `clusterRevision: UShort`: The revision of the server cluster specification. * `featureMap: ElevatorControlTrait.ElevatorControlFeature`: Supported optional cluster features. * `generatedCommandList: List`: A list of supported server-generated commands. * `supportedElevatorFloors: List?`: Information on the floors this elevator supports. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.ExtendedPowerSourceTrait.StartChargingCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.StartChargingCommand --- # ExtendedPowerSourceTrait.StartChargingCommand `object ExtendedPowerSourceTrait.StartChargingCommand : CommandDescriptor` ### Nested Types * `class Request` ### Public Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.GoogleYogurtmakerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleYogurtmakerDevice.GoogleTraits --- # GoogleYogurtmakerDevice.GoogleTraits `class GoogleYogurtmakerDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `cook: Cook?`: Trait for devices that can cook food according to various food presets and supported cooking modes. * `extendedOperationalState: ExtendedOperationalState?`: Trait for devices that support operating in specific zones and have a queryable ongoing duration. * `timer: Timer?`: Trait to control a built-in timer on a device (start, pause, cancel). --- package: com.google.home.google.NetworkControlTrait.TestNetworkSpeedCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.TestNetworkSpeedCommand.Request --- # NetworkControlTrait.TestNetworkSpeedCommand.Request `class NetworkControlTrait.TestNetworkSpeedCommand.Request` Request payload for the `TestNetworkSpeed` command. ### Constructor * `Request(testUploadSpeed: Boolean = false, testDownloadSpeed: Boolean = false)` * `testDownloadSpeed: Boolean`: Whether the download speed should be tested. * `testUploadSpeed: Boolean`: Whether the upload speed should be tested. --- package: com.google.home.google.ExtendedOperationalStateTrait.StatusEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StatusEnum --- # ExtendedOperationalStateTrait.StatusEnum `enum ExtendedOperationalStateTrait.StatusEnum : Enum, ClusterEnum` Status of the initial command and follow up response. ### Enum Values * `Success`: Success. * `Failure`: Failure. * `Unspecified`: Unspecified. * `UnknownValue`: The enum value is out of range. ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum. * `typeName: String`: Name of the Matter Data Type that the enum belongs to. * `value: ULong`: Integer identifier of the enum value per the Matter spec. --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand.Request --- # ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand.Request `class ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand.Request` ### Constructor * `Request(userQueryLanguage: String = "", closedCaptioningLanguage: String = "")` * `userQueryLanguage: String` * `closedCaptioningLanguage: String` --- package: com.google.home.google.SimplifiedThermostatTrait.SystemModeEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedThermostatTrait.SystemModeEnum --- # SimplifiedThermostatTrait.SystemModeEnum `enum SimplifiedThermostatTrait.SystemModeEnum : Enum, ClusterEnum` Thermostat operating modes. ### Enum Values * `Off`: The thermostat is not set to engage any climate control functions. * `Heat`: Demand is only generated for heating. * `Cool`: Demand is only generated for cooling. * `Auto`: Demand is generated for either cooling or heating, as required. * `EmergencyHeat`: Second stage heating is in use. * `Precooling`: The thermostat is in precooling mode. * `FanOnly`: Demand is only generated for fan. * `Dry`: Demand is only generated for dehumidification. * `Sleep`: The thermostat is set to sleep mode. * `Eco`: The thermostat is in eco mode. * `Purifier`: The thermostat is in purifier mode. * `Unspecified`: The thermostat mode is unspecified. * `UnknownValue`: The enum value is out of range. ### Properties * `traitId: String`: Trait identifier of the Matter Cluster. * `typeName: String`: Name of the Matter Data Type. * `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.FilterMonitoringTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait --- # FilterMonitoringTrait `object FilterMonitoringTrait` Attributes for FilterMonitoringTrait. ### Nested Types * `interface Attributes`: Attributes for the FilterMonitoring cluster. * `enum ChangeIndication`: Describes the requirements for when to change the filter. * `interface FilterChangeIndicationCleanliness`: Proactive notification of the current filter-cleanliness state. * `interface FilterChangeIndicationLifetime`: Proactive notification of the current filter-lifetime state. * `data class FilterMonitoringFeature`: FilterMonitoring trait FeatureMap. * `interface FilterMonitoringSensorError`: Notification of a sensor error. ### Properties * `Id: ClusterId` --- package: com.google.home.google.CookTrait.CookCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.CookCommand.Request --- # CookTrait.CookCommand.Request `class CookTrait.CookCommand.Request` Request payload for the `Cook` command. ### Constructor * `Request(start: Boolean = false, cookingMode: CookTrait.CookingMode = CookingMode.UnknownCookingMode, foodPreset: String = "", quantity: Float = 0.0f, unit: CookTrait.Unit = Unit.UnknownUnits)` * `start: Boolean`: If `true`, start cooking; if `false`, stop current cooking mode. * `cookingMode: CookTrait.CookingMode`: Cooking mode for the device. * `foodPreset: String`: The food preset requested by the user. * `quantity: Float`: Quantity of the food requested by the user. * `unit: CookTrait.Unit`: Unit associated with the quantity. --- package: com.google.home.google.GoogleWindowDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWindowDevice.GoogleTraits --- # GoogleWindowDevice.GoogleTraits `class GoogleWindowDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `lockUnlock: LockUnlock?`: Belongs to devices that support locking and unlocking (not standard door locks). * `openClose: OpenClose?`: Belongs to devices that support opening and closing, sometimes partially or in multiple directions. --- package: com.google.home.google.ElevatorControlTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlTrait --- # ElevatorControlTrait `object ElevatorControlTrait` Attributes for ElevatorControlTrait. ### Nested Types * `interface Attributes`: Attributes for the ElevatorControl cluster. * `object CallElevatorCommand`: Command to call the elevator. * `class CallElevatorCommand.Request`: Request payload for the CallElevator command. * `data class ElevatorControlFeature`: Specific capabilities related to elevator controls. * `class ElevatorFloor`: Represents an elevator floor. * `class FloorNameSynonym`: Synonyms for this floor in a given language. ### Properties * `Id: ClusterId` --- package: com.google.home.google.GoogleMulticookerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMulticookerDevice.GoogleTraits --- # GoogleMulticookerDevice.GoogleTraits `class GoogleMulticookerDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `cook: Cook?`: Trait for devices that can cook food according to various food presets and supported cooking modes. * `extendedOperationalState: ExtendedOperationalState?`: Trait for devices that support operating in specific zones and have a queryable ongoing duration. * `timer: Timer?`: Trait to control a built-in timer on a device (start, pause, cancel). --- package: com.google.home.google.MotionDetectionTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MotionDetectionTrait --- # MotionDetectionTrait `object MotionDetectionTrait` Attributes for MotionDetectionTrait. ### Nested Types * `interface Attributes`: Attributes for the MotionDetection cluster. * `interface MotionDetected`: Proactive notification that occurs when the system detects motion. * `data class MotionDetectionFeature`: MotionDetection trait FeatureMap. ### Properties * `Id: ClusterId` --- package: com.google.home.google.DoorbellPressTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DoorbellPressTrait --- # DoorbellPressTrait `object DoorbellPressTrait` Attributes for DoorbellPressTrait. ### Nested Types * `interface Attributes`: Attributes for the DoorbellPress cluster. * `interface DoorbellPressed`: Data about the pressing of a doorbell. ### Properties * `Id: ClusterId` --- package: com.google.home.google.RelativeHumidityControlTrait.StepMode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlTrait.StepMode --- # RelativeHumidityControlTrait.StepMode `enum RelativeHumidityControlTrait.StepMode : Enum, ClusterEnum` Indicates the direction of a step change. ### Enum Values * `Up`: Step upwards. * `Down`: Step downwards. * `Unspecified`: Unspecified direction. * `UnknownValue`: The enum value is out of range. ### Properties * `traitId: String`: Trait identifier of the Matter Cluster. * `typeName: String`: Name of the Matter Data Type. * `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.TimeTrait.ScheduledTimeEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.ScheduledTimeEvent --- # TimeTrait.ScheduledTimeEvent `interface TimeTrait.ScheduledTimeEvent` An event sent at a pre-scheduled time. A structure address is required and must be added in the Google Home app. ### Properties * `clockTime: LocalTime?`: A point in time expressed in hours, minutes, seconds, and nanoseconds. * `data: ByteArray?` * `daysOfWeek: List`: A list of days of the week. * `solarTime: TimeTrait.SolarTimeStruct?`: The time of a daily solar event such as sunrise, noon, and sunset. --- package: com.google.home.google.Locator.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Locator.Command --- # Locator.Command `enum Locator.Command : Enum` Descriptor enum for this trait's commands. ### Enum Values * `Locate`: The `locate` trait command. * `Silence`: The `silence` trait command. ### Properties * `tag: UInt` --- package: com.google.home.google.VolumeTrait.VolumeStepCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.VolumeStepCommand.Request --- # VolumeTrait.VolumeStepCommand.Request `class VolumeTrait.VolumeStepCommand.Request` Request payload for the `VolumeStep` command. ### Constructor * `Request(stepMode: VolumeTrait.VolumeStepModeEnum = VolumeStepModeEnum.Increase, step: UByte)` * `stepMode: VolumeTrait.VolumeStepModeEnum`: Indicates whether to increase or decrease the volume. * `step: UByte`: The increment (0-100) by which to change the volume. --- package: com.google.home.google.CookTrait.CookCommand.Response --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.CookCommand.Response --- # CookTrait.CookCommand.Response `class CookTrait.CookCommand.Response` ### Constructor * `Response()` --- package: com.google.home.google.TimerTrait.TimerCancelCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerCancelCommand.Request --- # TimerTrait.TimerCancelCommand.Request `class TimerTrait.TimerCancelCommand.Request` Request payload for the `TimerCancel` command. ### Constructor * `Request()` --- package: com.google.home.google.AreaAttendanceStateTrait.MutableAttributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceStateTrait.MutableAttributes --- # AreaAttendanceStateTrait.MutableAttributes `class AreaAttendanceStateTrait.MutableAttributes : AreaAttendanceStateTrait.Attributes` ### Constructor * `MutableAttributes(attributes: AreaAttendanceStateTrait.Attributes)` ### Properties * `open attendanceState: AreaAttendanceStateTrait.AttendanceState?` --- package: com.google.home.google.GoogleBlenderDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBlenderDevice.GoogleTraits --- # GoogleBlenderDevice.GoogleTraits `class GoogleBlenderDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `cook: Cook?`: Trait for devices that can cook food according to various food presets and supported cooking modes. * `extendedOperationalState: ExtendedOperationalState?`: Trait for devices that support operating in specific zones and have a queryable ongoing duration. * `timer: Timer?`: Trait to control a built-in timer on a device (start, pause, cancel). --- package: com.google.home.google.GoogleSetTopBoxDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSetTopBoxDevice.StandardTraits --- # GoogleSetTopBoxDevice.StandardTraits `class GoogleSetTopBoxDevice.StandardTraits` Trait Container for Standard Traits. ### Constructor * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `channel: Channel?`: Provides an interface for selecting channels. * `levelControl: LevelControl?`: Provides an interface for controlling a characteristic that can be set to a level. * `mediaPlayback: MediaPlayback?`: Provides an interface for controlling media playback (play, pause, etc.). * `onOff: OnOff?`: Provides an interface for turning devices on and off. --- package: com.google.home.google.ExtendedChannel --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannel --- # ExtendedChannel `interface ExtendedChannel : ExtendedChannelTrait.Attributes, MatterTrait, ExtendedChannelCommands` API for the ExtendedChannel trait, which supports TV channels on a media device. ### Nested Types * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. ### Public Functions * `supports(attribute: ExtendedChannel.Attribute): Boolean` * `supports(command: ExtendedChannel.Command): Boolean` ### Public Properties * `factory: TraitFactory` ### Inherited Functions * `suspend returnChannel(): Unit`: Return to the last/previous channel. * `returnChannelBatchable(): BatchableCommand`: The batchable version of `returnChannel` command. * `suspend forceRead(): Unit` ### Inherited Properties * `acceptedCommandList: List`: List of supported client-generated commands. * `attributeList: List`: List of supported attribute IDs. * `channelCatalog: String?`: Identifier of a catalog with channels information. * `clusterRevision: UShort`: The revision of the server cluster specification. * `extendedChannelList: List?`: List of available media channels. * `featureMap: UInt`: Supported optional cluster features. * `generatedCommandList: List`: List of supported server-generated commands. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.GoogleBoilerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBoilerDevice.GoogleTraits --- # GoogleBoilerDevice.GoogleTraits `class GoogleBoilerDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `extendedTemperatureControl: ExtendedTemperatureControl?`: Trait for non-thermostat devices that support controlling temperature. --- package: com.google.home.google.GoogleDoorbellDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDoorbellDevice.GoogleTraits --- # GoogleDoorbellDevice.GoogleTraits `class GoogleDoorbellDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `cameraStream: CameraStream?` * `clip: Clip?`: Supports devices that can save a video clip or take a screenshot. * `doorbellPress: DoorbellPress?`: Represents the press of a doorbell. * `objectDetection: ObjectDetection?`: For devices that can detect objects/people and send notifications. * `record: Record?`: For media devices with a recording capability. --- package: com.google.home.google.SoilMoistureMeasurementTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SoilMoistureMeasurementTrait.Attributes --- # SoilMoistureMeasurementTrait.Attributes `interface SoilMoistureMeasurementTrait.Attributes` Attributes for the SoilMoistureMeasurement cluster. ### Properties * `acceptedCommandList: List`: A list of supported client-generated commands. * `attributeList: List`: A list of supported attribute IDs. * `clusterRevision: UShort`: The revision of the server cluster specification. * `featureMap: UInt`: Supported optional cluster features. * `generatedCommandList: List`: A list of supported server-generated commands. * `maxMeasuredValue: UInt?`: (Read-only) The maximum value of `measuredValue` that can be measured. * `measuredValue: UInt?`: (Read-only) The moisture level. * `minMeasuredValue: UInt?`: (Read-only) The minimum value of `measuredValue` that can be measured. * `tolerance: UInt?`: (Read-only) The magnitude of potential error associated with `measuredValue`. --- package: com.google.home.google.ExtendedChannelTrait.ReturnChannelCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannelTrait.ReturnChannelCommand --- # ExtendedChannelTrait.ReturnChannelCommand `object ExtendedChannelTrait.ReturnChannelCommand : CommandDescriptor` Command to return to the last/previous channel the user was on. ### Nested Types * `class Request`: The request payload for the ReturnChannel command. ### Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedChannelCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannelCommands --- # ExtendedChannelCommands `interface ExtendedChannelCommands` ### Public Functions * `suspend returnChannel(): Unit`: Return to the last/previous channel the user was on. * `returnChannelBatchable(): BatchableCommand`: The batchable version of `returnChannel` command. --- package: com.google.home.google.DockTrait.DockCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DockTrait.DockCommand.Request --- # DockTrait.DockCommand.Request `class DockTrait.DockCommand.Request` Request payload for the `Dock` command. ### Constructor * `Request()` --- package: com.google.home.google.RotationTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait --- # RotationTrait `object RotationTrait` Attributes for RotationTrait. ### Nested Types - `interface Attributes`: Attributes for the Rotation cluster. - `object RotateToDegreesCommand`: Sets the absolute rotation in degrees. - `class RotateToDegreesCommand.Request`: The request payload for the RotateToDegrees command. - `object RotateToPercentageCommand`: Sets the absolute rotation in percentage. - `class RotateToPercentageCommand.Request`: The request payload for the RotateToPercentage command. - `class RotationDegreesRange`: The number of degrees that a device can rotate. - `data class RotationFeature`: Rotation trait FeatureMap. ### Properties - `val Id: ClusterId` --- package: com.google.home.google.ExtendedThermostat.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostat.Attribute --- # ExtendedThermostat.Attribute `enum ExtendedThermostat.Attribute` Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList` - `activePresetHandle` - `activeRemoteTemperatureSensorIds` - `attributeList` - `averageLocalTemperature` - `clusterRevision` - `extendedProgrammingOperationMode` - `extendedRunningMode` - `extendedSetpointChangeSource` - `extendedSupportedModes` - `extendedSystemMode` - `featureMap` - `generatedCommandList` - `maxCoolSafetySetpointLimit` - `maxHeatSafetySetpointLimit` - `maxSetpointHoldSeconds` - `maxSettableThermostatTemperatureSensors` - `minCoolSafetySetpointLimit` - `minHeatSafetySetpointLimit` - `presets` - `remoteTemperatureSensorIds` - `targetTemperatureTimestampSeconds` - `temperatureSetpointHoldExpiryTimestampSeconds` ### Companion Properties - `val StructDescriptor: StructDescriptor` ### Functions - `fun valueOf(value: String): ExtendedThermostat.Attribute` - `fun values(): Array` ### Properties - `open val descriptor: Descriptor` - `open val fieldName: String` - `val isNullable: Boolean` - `open val tag: UInt` - `open val typeEnum: Type` - `open val typeName: String` --- package: com.google.home.google.NetworkControlTrait.NetworkSettings --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.NetworkSettings --- # NetworkControlTrait.NetworkSettings `class NetworkControlTrait.NetworkSettings : ClusterStruct` Settings of the main network. ### Constructor - `NetworkSettings(ssid: String = "")` ### Functions - `open fun getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `open fun getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties - `val ssid: String`: SSID of the main network. --- package: com.google.home.google.SyntheticSwitchTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitchTrait --- # SyntheticSwitchTrait `object SyntheticSwitchTrait` Attributes for SyntheticSwitchTrait. ### Nested Types - `interface Attributes`: Attributes for the SyntheticSwitch cluster. - `interface ButtonPress`: Indicates that the switch button was pressed. - `interface LongPressRelease`: Indicates that the switch button was released after a long press. - `interface LongPressStart`: Indicates that the switch has been depressed to start a long press. ### Properties - `val Id: ClusterId` --- package: com.google.home.google.Time.RecurringClockTimeScheduledEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Time.RecurringClockTimeScheduledEvent --- # Time.RecurringClockTimeScheduledEvent `class Time.RecurringClockTimeScheduledEvent : Event, TimeTrait.RecurringClockTimeScheduledEvent` An event sent at a pre-scheduled time, with recurrence determined by a cron expression. ### Nested Types - `enum EventFields` ### Properties - `open val eventImportance: EventImportance`: Importance of the event. - `open val eventName: String`: Event name. - `open val eventNumber: ULong`: Event number. ### Inherited Properties - From `com.google.home.Event`: - `open val eventId: Id`: ID of the Event. - `open val timestamp: Instant`: Time of the event. - From `com.google.home.google.TimeTrait.RecurringClockTimeScheduledEvent`: - `open val cronExpression: String?` --- package: com.google.home.google.ExtendedThermostatTrait.AlarmType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.AlarmType --- # ExtendedThermostatTrait.AlarmType `enum ExtendedThermostatTrait.AlarmType : Enum, ClusterEnum` ### Enum Values - `Critical` - `Ok` - `UnknownValue`: The enum value is out of range. - `Unspecified` - `Warning` ### Functions - `fun valueOf(value: String): ExtendedThermostatTrait.AlarmType` - `fun values(): Array` ### Properties - `open val traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. - `open val typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. - `open val value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedChannelTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannelTrait --- # ExtendedChannelTrait `object ExtendedChannelTrait` Attributes for ExtendedChannelTrait. ### Nested Types - `interface Attributes`: Attributes for the ExtendedChannel cluster. - `class ExtendedMediaChannel`: Media channel description. - `object ReturnChannelCommand`: Return to the last/previous channel the user was on. - `class ReturnChannelCommand.Request`: The request payload for the ReturnChannel command. ### Properties - `val Id: ClusterId` --- package: com.google.home.google.GoogleDoorDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDoorDevice --- # GoogleDoorDevice `class GoogleDoorDevice : DeviceType` A device consisting of a solid, movable barrier that controls access to an entrance, a closet, a cabinet, and so forth. A door can be opened and closed, potentially in more than one direction. ### Nested Types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Constructor - `GoogleDoorDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleDoorDevice.GoogleTraits, standardTraits: GoogleDoorDevice.StandardTraits)` ### Properties - `val factory: DeviceTypeFactory` - `val googleTraits: GoogleDoorDevice.GoogleTraits` - `open val metadata: DeviceType.Metadata` - `val standardTraits: GoogleDoorDevice.StandardTraits` --- package: com.google.home.google.GoogleStreamingStickDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingStickDevice --- # GoogleStreamingStickDevice `class GoogleStreamingStickDevice : DeviceType` A device having a small stick-like form factor, usually powered by a USB or HDMI cable, that is connected to a display such as a TV and is used to access digital streaming services for media and music. ### Nested Types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Constructor - `GoogleStreamingStickDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleStreamingStickDevice.GoogleTraits, standardTraits: GoogleStreamingStickDevice.StandardTraits)` ### Properties - `val factory: DeviceTypeFactory` - `val googleTraits: GoogleStreamingStickDevice.GoogleTraits` - `open val metadata: DeviceType.Metadata` - `val standardTraits: GoogleStreamingStickDevice.StandardTraits` --- package: com.google.home.google.ExtendedThermostatCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatCommands --- # ExtendedThermostatCommands `interface ExtendedThermostatCommands` ### Functions - `suspend fun notifySensorStateChange(sensorType: ExtendedThermostatTrait.SensorType, alarmType: ExtendedThermostatTrait.AlarmType): Unit` - `fun notifySensorStateChangeBatchable(sensorType: ExtendedThermostatTrait.SensorType, alarmType: ExtendedThermostatTrait.AlarmType): BatchableCommand` --- package: com.google.home.google.Time.ScheduledTimeEvent.EventFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Time.ScheduledTimeEvent.EventFields --- # Time.ScheduledTimeEvent.EventFields `enum Time.ScheduledTimeEvent.EventFields` ### Enum Values - `clockTime`: The current time. - `daysOfWeek`: The time when sunset occurs. - `solarTime`: The time when sunrise occurs. ### Functions - `fun valueOf(value: String): Time.ScheduledTimeEvent.EventFields` - `fun values(): Array` ### Properties - `open val descriptor: Descriptor` - `open val fieldName: String` - `val isNullable: Boolean` - `open val tag: UInt` - `open val typeEnum: Type` - `open val typeName: String` --- package: com.google.home.google.ExtendedThermostatTrait.Preset --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Preset --- # ExtendedThermostatTrait.Preset `class ExtendedThermostatTrait.Preset : ClusterStruct` Information about a preset. ### Constructor - `Preset(presetHandle: String = "", presetScenario: ExtendedThermostatTrait.PresetScenario = PresetScenario.Unspecified, presetMaxHoldSeconds: Int = 0, names: List = emptyList())` ### Functions - `open fun getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `open fun getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties - `val names: List`: Synonyms for the preset in each supported language. - `val presetHandle: String`: The internal handle of the temperature preset that is used in commands and states. - `val presetMaxHoldSeconds: Int`: The maximum number of seconds this preset can be held. A setting of `-1` means there is no limit. If unset, holding this preset is not supported. - `val presetScenario: ExtendedThermostatTrait.PresetScenario`: The type of this preset, which determines which icon will be used to represent this preset on touch surfaces. --- package: com.google.home.google.ExtendedPowerSourceTrait.BatteryStateChange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.BatteryStateChange --- # ExtendedPowerSourceTrait.BatteryStateChange `interface ExtendedPowerSourceTrait.BatteryStateChange` ### Properties - `val current: List?` - `val priority: UInt?` --- package: com.google.home.google.ExtendedColorControlTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlTrait --- # ExtendedColorControlTrait `object ExtendedColorControlTrait` Attributes for ExtendedColorControlTrait. ### Nested Types - `interface Attributes`: Attributes for the ExtendedColorControl cluster. - `object MoveToColorHsvCommand`: Moves a device to the color specified in HSV semantics. - `class MoveToColorHsvCommand.Request`: The request payload for the MoveToColorHSV command. - `object MoveToColorNameCommand`: Moves the device to the color named. - `class MoveToColorNameCommand.Request`: The request payload for the MoveToColorName command. - `object MoveToColorRgbCommand`: Moves a device to the color specified in RGB semantics. - `class MoveToColorRgbCommand.Request`: The request payload for the MoveToColorRGB command. ### Properties - `val Id: ClusterId` --- package: com.google.home.google.RotationTrait.RotationDegreesRange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.RotationDegreesRange --- # RotationTrait.RotationDegreesRange `class RotationTrait.RotationDegreesRange : ClusterStruct` The number of degrees that a device can rotate. ### Constructor - `RotationDegreesRange(rotationDegreesMin: Float = 0.0f, rotationDegreesMax: Float = 0.0f)` ### Functions - `open fun getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `open fun getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties - `val rotationDegreesMax: Float`: Maximum rotation in number of degrees. - `val rotationDegreesMin: Float`: Minimum rotation in number of degrees. --- package: com.google.home.google.ExtendedFanControlTrait.StepDirection --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.StepDirection --- # ExtendedFanControlTrait.StepDirection `enum ExtendedFanControlTrait.StepDirection : Enum, ClusterEnum` ### Enum Values - `Decrease` - `Increase` - `UnknownValue`: The enum value is out of range. - `Unspecified` ### Functions - `fun valueOf(value: String): ExtendedFanControlTrait.StepDirection` - `fun values(): Array` ### Properties - `open val traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. - `open val typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. - `open val value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedMediaPlaybackCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackCommands --- # ExtendedMediaPlaybackCommands `interface ExtendedMediaPlaybackCommands` ### Functions - `suspend fun closedCaptioningOff(): Unit` - `fun closedCaptioningOffBatchable(): BatchableCommand` - `suspend fun closedCaptioningOn(userQueryLanguage: String, closedCaptioningLanguage: String): Unit` - `fun closedCaptioningOnBatchable(userQueryLanguage: String, closedCaptioningLanguage: String): BatchableCommand` - `suspend fun setRepeat(isOn: Boolean, isSingle: Boolean): Unit` - `fun setRepeatBatchable(isOn: Boolean, isSingle: Boolean): BatchableCommand` - `suspend fun shuffle(): Unit` - `fun shuffleBatchable(): BatchableCommand` --- package: com.google.home.google.AssistantBroadcastTrait.BroadcastCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantBroadcastTrait.BroadcastCommand --- # AssistantBroadcastTrait.BroadcastCommand `object AssistantBroadcastTrait.BroadcastCommand : CommandDescriptor` ### Nested Types - `class BroadcastCommandRequest`: The request payload for the BroadcastCommand command. - `class BroadcastCommandResponse`: The response payload for the BroadcastCommand command. ### Properties - `open val commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.AudioInputTrait.AudioInputQuality --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AudioInputTrait.AudioInputQuality --- # AudioInputTrait.AudioInputQuality `enum AudioInputTrait.AudioInputQuality : Enum, ClusterEnum` The current audio input quality of the device. ### Enum Values - `MusicQuality`: Supports music quality. - `UnknownValue`: The enum value is out of range. - `Unspecified`: The input quality is unspecified. - `VoiceQuality`: Supports voice quality. ### Functions - `fun valueOf(value: String): AudioInputTrait.AudioInputQuality` - `fun values(): Array` ### Properties - `open val traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. - `open val typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. - `open val value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedFanControlCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlCommands --- # ExtendedFanControlCommands `interface ExtendedFanControlCommands` ### Functions - `suspend fun extendedStep(fanSpeedRelativeWeight: Long, direction: ExtendedFanControlTrait.StepDirection): Unit` Set the relative speed. - **fanSpeedRelativeWeight**: `Long` - The relative amount of the speed change. The absolute value indicates the scaled amount while the numerical sign indicates the direction of the change. - **direction**: `ExtendedFanControlTrait.StepDirection` - The direction in which the speed should change. - `fun extendedStepBatchable(fanSpeedRelativeWeight: Long, direction: ExtendedFanControlTrait.StepDirection): BatchableCommand` The batchable version of `extendedStep` command. - `suspend fun toggleAirflowDirection(): Unit` Reverse the current direction of the airflow. - `fun toggleAirflowDirectionBatchable(): BatchableCommand` The batchable version of `toggleAirflowDirection` command. --- package: com.google.home.google.RelativeHumidityControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControl --- # RelativeHumidityControl `interface RelativeHumidityControl : RelativeHumidityControlTrait.Attributes, MatterTrait, RelativeHumidityControlCommands` API for the RelativeHumidityControl trait. This trait belongs to devices that support humidity settings such as humidifiers and dehumidifiers. ### Nested Types - `enum Attribute`: Descriptor enum for this trait's attributes. - `enum Command`: Descriptor enum for this trait's commands. ### Properties - `open val factory: TraitFactory` ### Functions - `fun supports(attribute: RelativeHumidityControl.Attribute): Boolean` - `fun supports(command: RelativeHumidityControl.Command): Boolean` ### Inherited Attributes - `val acceptedCommandList: List`: A list of client-generated commands supported by this cluster. - `val attributeList: List`: A list of the attribute IDs supported by the cluster. - `val clusterRevision: UShort`: The revision of the server cluster specification. - `val featureMap: UInt`: Whether the server supports zero or more optional cluster features. - `val generatedCommandList: List`: A list of server-generated commands supported by this cluster. - `val maxRelativeHumidity: UInt?`: The maximum humidity level as a percentage. - `val minRelativeHumidity: UInt?`: The minimum humidity level as a percentage. - `val relativeHumiditySetpoint: UInt?`: The current target humidity percentage of the device. ### Inherited Commands - `suspend fun setRelativeHumidity(humidity: UInt): Unit`: Set the relative humidity level to a specific value. - `fun setRelativeHumidityBatchable(humidity: UInt): BatchableCommand` - `suspend fun stepRelativeHumidity(relativeHumidityPercent: UInt, relativeHumidityWeight: UInt, stepMode: RelativeHumidityControlTrait.StepMode): Unit`: Increase or decrease the relative humidity. - `fun stepRelativeHumidityBatchable(relativeHumidityPercent: UInt, relativeHumidityWeight: UInt, stepMode: RelativeHumidityControlTrait.StepMode): BatchableCommand` --- package: com.google.home.google.ExtendedAirQualityTrait.AirQualityLevel --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.AirQualityLevel --- # ExtendedAirQualityTrait.AirQualityLevel `enum ExtendedAirQualityTrait.AirQualityLevel : Enum, ClusterEnum` The air quality level. ### Enum Values - `ExtremelyPoor`: The air quality is extremely poor. - `Fair`: The air quality is fair. - `Good`: The air quality is good. - `Moderate`: The air quality is moderate. - `Poor`: The air quality is poor. - `UnknownValue`: The enum value is out of range. - `Unspecified`: The air quality is unknown. - `VeryPoor`: The air quality is very poor. ### Functions - `fun valueOf(value: String): ExtendedAirQualityTrait.AirQualityLevel` - `fun values(): Array` ### Properties - `open val traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. - `open val typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. - `open val value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.Reboot.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Reboot.Command --- # Reboot.Command `enum Reboot.Command` Descriptor enum for this trait's commands. ### Enum Values - `Reboot`: The Reboot.reboot trait command. ### Functions - `fun valueOf(value: String): Reboot.Command` - `fun values(): Array` ### Properties - `val tag: UInt` --- package: com.google.home.google.GoogleAudioVideoReceiverDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAudioVideoReceiverDevice.GoogleTraits --- # GoogleAudioVideoReceiverDevice.GoogleTraits `class GoogleAudioVideoReceiverDevice.GoogleTraits` Trait Container for Google Traits. ### Constructor - `GoogleTraits(traitProvider: TraitProvider)` ### Properties - `val extendedApplicationLauncher: ExtendedApplicationLauncher?`: This trait supports devices which are able to switch between applications. - `val extendedLevelControl: ExtendedLevelControl?`: This trait belongs to devices which have a volume control. - `val extendedMediaInput: ExtendedMediaInput?`: This trait is an extension of the Matter standard trait, `MediaInput`, and is used by devices that can switch inputs. - `val extendedMediaPlayback: ExtendedMediaPlayback?` - `val mediaActivityState: MediaActivityState?` --- package: com.google.home.google.ExtendedMediaInputTrait.SelectCustomInputCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.SelectCustomInputCommand --- # ExtendedMediaInputTrait.SelectCustomInputCommand `object ExtendedMediaInputTrait.SelectCustomInputCommand : CommandDescriptor` Set the media input. See also `selectCustomInput`. ### Nested Types - `class Request`: The request payload for the SelectCustomInput command. ### Properties - `open val commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.LockUnlockTrait.UnlockCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.UnlockCommand.Request --- # LockUnlockTrait.UnlockCommand.Request `class LockUnlockTrait.UnlockCommand.Request` The request payload for the Unlock command. ### Constructor - `Request(followUpToken: String = "")` ### Properties - `val followUpToken: String` --- package: com.google.home.google.ExtendedApplicationLauncher --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncher --- # ExtendedApplicationLauncher `interface ExtendedApplicationLauncher : ExtendedApplicationLauncherTrait.Attributes, MatterTrait, ExtendedApplicationLauncherCommands` API for the ExtendedApplicationLauncher trait. This trait supports devices which are able to switch between applications. ### Nested Types - `enum Attribute`: Descriptor enum for this trait's attributes. - `enum Command`: Descriptor enum for this trait's commands. ### Properties - `open val factory: TraitFactory` ### Functions - `fun supports(attribute: ExtendedApplicationLauncher.Attribute): Boolean` - `fun supports(command: ExtendedApplicationLauncher.Command): Boolean` ### Inherited Attributes - `val acceptedCommandList: List` - `val attributeList: List` - `val availableApplications: List?`: A list of applications. - `val clusterRevision: UShort` - `val currentApplicationKey: String?`: Key value of the current active application. - `val featureMap: UInt` - `val generatedCommandList: List` - `val globalApplicationCatalog: List?` - `val type: ExtendedApplicationLauncherTrait.ApplicationType?`: Launcher application's type. - `val useGlobalApplicationCatalog: Boolean?`: Use global application catalog. ### Inherited Commands - `suspend fun installApp(newApplicationName: String, newApplication: String): Unit`: Install the given application. - `fun installAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` - `suspend fun launchApp(newApplicationName: String, newApplication: String): Unit`: Launch the given application. - `fun launchAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` - `suspend fun searchApp(newApplicationName: String, newApplication: String): Unit`: Search for the given application. - `fun searchAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` --- package: com.google.home.google.ExtendedPowerSourceTrait.ChargeSpeed --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.ChargeSpeed --- # ExtendedPowerSourceTrait.ChargeSpeed `enum ExtendedPowerSourceTrait.ChargeSpeed : Enum, ClusterEnum` Charging speed. ### Enum Values - `Normal` - `Rapid` - `Slow` - `UnknownValue`: The enum value is out of range. - `Unspecified` ### Functions - `fun valueOf(value: String): ExtendedPowerSourceTrait.ChargeSpeed` - `fun values(): Array` ### Properties - `open val traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. - `open val typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. - `open val value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.LightEffects.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffects.Command --- # LightEffects.Command `enum LightEffects.Command` Descriptor enum for this trait's commands. ### Enum Values - `PulseEffectSet`: The `pulseEffectSet` trait command. - `SleepEffectSet`: The `sleepEffectSet` trait command. - `StopEffect`: The `stopEffect` trait command. - `WakeEffectSet`: The `wakeEffectSet` trait command. ### Functions - `fun valueOf(value: String): LightEffects.Command` - `fun values(): Array` ### Properties - `val tag: UInt` --- package: com.google.home.google.SyntheticSwitchTrait.LongPressStart --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitchTrait.LongPressStart --- # SyntheticSwitchTrait.LongPressStart `interface SyntheticSwitchTrait.LongPressStart` Indicates that the switch has been depressed to start a long press. --- package: com.google.home.google.DoorbellPress --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DoorbellPress --- ### `interface DoorbellPress` API for the DoorbellPress trait, which represents the press of a doorbell. Inherits from `DoorbellPressTrait.Attributes` and `MatterTrait`. #### Nested Types - `enum Attribute`: Descriptor for this trait's attributes. #### Functions - `supports(attribute: Attribute): Boolean` #### Properties - `factory: TraitFactory` #### Inherited Properties from `DoorbellPressTrait.Attributes` - `acceptedCommandList: List`: Supported client-generated commands. - `attributeList: List`: Supported attribute IDs. - `clusterRevision: UShort`: Server cluster specification revision. - `featureMap: UInt`: Supported optional cluster features. - `generatedCommandList: List`: Supported server-generated commands. --- package: com.google.home.google.ParkingLocationTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ParkingLocationTrait --- ### `object ParkingLocationTrait` Attributes for ParkingLocationTrait. #### Nested Types - `interface Attributes`: Attributes for the ParkingLocation cluster. - `class CurrentParkingLocation`: Locations of the user's parked vehicles. #### Properties - `Id: ClusterId` --- package: com.google.home.google.TogglesTrait.Toggle --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TogglesTrait.Toggle --- ### `class TogglesTrait.Toggle` A toggle available on the device. Inherits from `ClusterStruct`. #### Constructor - `Toggle(name: String, synonyms: List)` #### Properties - `name: String`: Internal name of the toggle for commands and states. - `synonyms: List`: Synonyms for the toggle in each supported language. --- package: com.google.home.google.Timer.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Timer.Command --- ### `enum Timer.Command` Descriptor enum for `Timer` trait's commands. #### Enum Values - `TimerAdjust`: The `timerAdjust` trait command. - `TimerCancel`: The `timerCancel` trait command. - `TimerPause`: The `timerPause` trait command. - `TimerResume`: The `timerResume` trait command. - `TimerStart`: The `timerStart` trait command. #### Properties - `tag: UInt` --- package: com.google.home.google.GoogleGarageDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGarageDevice.GoogleTraits --- ### `class GoogleGarageDevice.GoogleTraits` Trait Container for Google Traits. #### Constructor - `GoogleTraits(traitProvider: TraitProvider)` #### Properties - `lockUnlock: LockUnlock?`: For devices that support locking/unlocking, excluding standard door locks. --- package: com.google.home.google.ExtendedDoorLockTrait.PrivacyModeActorMethodEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.PrivacyModeActorMethodEnum --- ### `enum ExtendedDoorLockTrait.PrivacyModeActorMethodEnum` The method of the privacy mode actor for changing a lock-related state. Inherits from `ClusterEnum`. #### Enum Values - `Other`: Change by an unspecified entity. - `Physical`: Change by physical interaction with the lock. - `RemoteDelegate`: Change by a remote service with no user intent. - `RemoteReminderExplicit`: Change explicitly by a remote service confirmed by a user. - `RemoteReminderImplicit`: Change implicitly by a remote service confirmed by a user. - `RemoteUserExplicit`: Change by an actor using the app. - `RemoteUserImplicit`: Change by an actor with implicit intent. - `RemoteUserOther`: Change by a user not fitting other remote categories. - `UnknownValue`: The enum value is out of range. - `Unspecified`: Unspecified method. #### Properties - `traitId: String`: Trait identifier of the Matter Cluster. - `typeName: String`: Name of the Matter Data Type. - `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ExtendedModeSelect --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelect --- ### `interface ExtendedModeSelect` API for the ExtendedModeSelect trait. Inherits from `ExtendedModeSelectTrait.Attributes`, `MatterTrait`, and `ExtendedModeSelectCommands`. #### Nested Types - `enum Attribute`: Descriptor for this trait's attributes. - `enum Command`: Descriptor for this trait's commands. #### Functions - `supports(attribute: Attribute): Boolean` - `supports(command: Command): Boolean` #### Properties - `factory: TraitFactory` #### Inherited Commands - `suspend changeModeSettings(updateModeSettings: List): Unit` - `changeModeSettingsBatchable(...): BatchableCommand` #### Inherited Properties - `currentModeSettings: List?` - `supportedModes: List?` - Plus standard Matter attributes (`acceptedCommandList`, `attributeList`, etc.). --- package: com.google.home.google.ExtendedChannel.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannel.Attribute --- ### `enum ExtendedChannel.Attribute` Descriptor enum for `ExtendedChannel` trait's attributes. Inherits from `Field`. #### Enum Values - `acceptedCommandList` - `attributeList` - `channelCatalog` - `clusterRevision` - `extendedChannelList` - `featureMap` - `generatedCommandList` #### Companion Properties - `StructDescriptor: StructDescriptor` #### Properties - Includes standard `Field` properties like `descriptor`, `fieldName`, `isNullable`, `tag`, `typeEnum`, `typeName`. --- package: com.google.home.google.ExtendedFanControl.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControl.Command --- ### `enum ExtendedFanControl.Command` Descriptor enum for `ExtendedFanControl` trait's commands. #### Enum Values - `ExtendedStep`: The `extendedStep` trait command. - `ToggleAirflowDirection`: The `toggleAirflowDirection` trait command. #### Properties - `tag: UInt` --- package: com.google.home.google.LightEffectsCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsCommands --- ### `interface LightEffectsCommands` Interface for light effect commands. #### Functions - `suspend pulseEffectSet(durationSeconds: UInt, color: LightEffectsTrait.Color): Unit`: Activates the pulse effect. - `pulseEffectSetBatchable(durationSeconds: UInt, color: LightEffectsTrait.Color): BatchableCommand`: Batchable version of `pulseEffectSet`. - `suspend sleepEffectSet(durationSeconds: UInt): Unit`: Activates the sleep effect. - `sleepEffectSetBatchable(durationSeconds: UInt): BatchableCommand`: Batchable version of `sleepEffectSet`. - `suspend stopEffect(): Unit`: Stops the active effect. - `stopEffectBatchable(): BatchableCommand`: Batchable version of `stopEffect`. - `suspend wakeEffectSet(durationSeconds: UInt): Unit`: Activates the wake effect. - `wakeEffectSetBatchable(durationSeconds: UInt): BatchableCommand`: Batchable version of `wakeEffectSet`. --- package: com.google.home.google.SimplifiedThermostatTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedThermostatTrait --- ### `object SimplifiedThermostatTrait` Attributes for SimplifiedThermostatTrait. #### Nested Types - `interface Attributes`: Attributes for the SimplifiedThermostat cluster. - `object SetSystemModeCommand`: Command to set the system mode. - `class Request`: Payload for the SetSystemMode command. - `enum SystemModeEnum`: Thermostat operating modes. #### Properties - `Id: ClusterId` --- package: com.google.home.google.OpenCloseTrait.GoToOpenPercentageFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.GoToOpenPercentageFollowUp --- ### `interface OpenCloseTrait.GoToOpenPercentageFollowUp` Follow-up response for the `goToOpenPercentage` command. #### Properties - `openPercent: Double?`: Percentage a device is opened (0=closed, 100=fully open). --- package: com.google.home.google.ExtendedMediaInputTrait.InputNames --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.InputNames --- ### `class ExtendedMediaInputTrait.InputNames` Input names for a given available language. Inherits from `ClusterStruct`. #### Constructor - `InputNames(lang: String, nameSynonym: List)` #### Properties - `lang: String`: Language code. - `nameSynonym: List`: User-friendly names for the input in the given language. --- package: com.google.home.google.LocatorTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorTrait --- ### `object LocatorTrait` Attributes for LocatorTrait. #### Nested Types - `interface Attributes`: Attributes for the Locator cluster. - `object LocateCommand`: Command to locate the device by generating a local alert. - `class Request`: Payload for the Locate command. - `data class LocatorFeature`: Map of capabilities for locating a device. - `object SilenceCommand`: Command to silence in-progress alarms. - `class Request`: Payload for the Silence command. #### Properties - `Id: ClusterId` --- package: com.google.home.google.SpeedMeasurementTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SpeedMeasurementTrait --- ### `object SpeedMeasurementTrait` Attributes for SpeedMeasurementTrait. #### Nested Types - `interface Attributes`: Attributes for the SpeedMeasurement cluster. - `enum MeasurementUnit`: The speed measurement unit. #### Properties - `Id: ClusterId` --- package: com.google.home.google.TimeTrait.RecurringSolarTimeScheduledEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait.RecurringSolarTimeScheduledEvent --- ### `interface TimeTrait.RecurringSolarTimeScheduledEvent` An event sent at a pre-scheduled solar time, with recurrence determined by a cron expression. #### Properties - `cronExpression: String?` - `solarTime: TimeTrait.SolarTimeStruct?` --- package: com.google.home.google.ExtendedFanControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControl --- ### `interface ExtendedFanControl` API for the ExtendedFanControl trait for devices with extended fan controls. Inherits from `ExtendedFanControlTrait.Attributes`, `MatterTrait`, `Updatable`, and `ExtendedFanControlCommands`. #### Nested Types - `enum Attribute`: Descriptor for this trait's attributes. - `enum Command`: Descriptor for this trait's commands. #### Functions - `supports(attribute: Attribute): Boolean` - `supports(command: Command): Boolean` #### Properties - `factory: TraitFactory` #### Inherited Commands - `suspend extendedStep(fanSpeedRelativeWeight: Long, direction: ExtendedFanControlTrait.StepDirection): Unit`: Set the relative speed. - `extendedStepBatchable(...): BatchableCommand` - `suspend toggleAirflowDirection(): Unit`: Reverse the current airflow direction. - `toggleAirflowDirectionBatchable(): BatchableCommand` #### Inherited Properties - `customFanMode: String?`: The currently selected custom speed setting. - `customFanModes: ExtendedFanControlTrait.AvailableFanSpeeds?`: Supported custom speed settings. - Plus standard Matter attributes (`acceptedCommandList`, `attributeList`, etc.). --- package: com.google.home.google.ArmDisarm.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarm.Attribute --- ### `enum ArmDisarm.Attribute` Descriptor enum for `ArmDisarm` trait's attributes. Inherits from `Field`. #### Enum Values - `acceptedCommandList` - `armState` - `attributeList` - `availableArmLevels` - `clusterRevision` - `currentArmLevel` - `entryAllowanceEndTimeSeconds` - `exitAllowanceEndTimeSeconds` - `exitAllowanceSeconds` - `featureMap` - `generatedCommandList` - `isArmed` - `targetArmLevel` #### Companion Properties - `StructDescriptor: StructDescriptor` #### Properties - Includes standard `Field` properties like `descriptor`, `fieldName`, `tag`, etc. --- package: com.google.home.google.LightEffectsTrait.StopEffectCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.StopEffectCommand --- ### `object LightEffectsTrait.StopEffectCommand` Command to stop the active light effect. #### Nested Types - `class Request`: The request payload for the StopEffect command. #### Properties - `commandId: String`: Unique id for the command. --- package: com.google.home.google.GoogleBoilerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBoilerDevice --- ### `class GoogleBoilerDevice` A device that generates steam or vapor to supply heat (e.g., a boiler). Inherits from `DeviceType`. #### Nested Types - `class GoogleTraits`: Container for Google Traits. - `class StandardTraits`: Container for Standard Traits. #### Constructor - `GoogleBoilerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleTraits, standardTraits: StandardTraits)` #### Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: StandardTraits` --- package: com.google.home.google.FilterMonitoringTrait.ChangeIndication --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait.ChangeIndication --- ### `enum FilterMonitoringTrait.ChangeIndication` Describes the requirements for when to change the filter. Inherits from `ClusterEnum`. #### Enum Values - `Critical`: Filter is exhausted, immediate intervention required. - `Ok`: Filter is in good condition. - `UnknownValue`: The enum value is out of range. - `Unspecified`: Filter condition is not specified. - `Warning`: Filter will be exhausted soon. #### Properties - `traitId: String`: Trait identifier of the Matter Cluster. - `typeName: String`: Name of the Matter Data Type. - `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ExtendedTemperatureControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedTemperatureControl --- ### `interface ExtendedTemperatureControl` API for devices (other than thermostats) that support controlling temperature. Inherits from `ExtendedTemperatureControlTrait.Attributes` and `MatterTrait`. #### Nested Types - `enum Attribute`: Descriptor for this trait's attributes. #### Functions - `supports(attribute: Attribute): Boolean` #### Properties - `factory: TraitFactory` #### Inherited Properties - `temperatureDisplayMode: ExtendedTemperatureControlTrait.TemperatureDisplayMode?`: Units of temperature displayed on the screen. - Plus standard Matter attributes (`acceptedCommandList`, `attributeList`, etc.). --- package: com.google.home.google.FilterMonitoringTrait.FilterMonitoringSensorError --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait.FilterMonitoringSensorError --- ### `interface FilterMonitoringTrait.FilterMonitoringSensorError` Notification of a sensor error. #### Properties - `errorCode: String?`: The error code of the sensor. - `priority: Int?`: Notification level (e.g., `0` for spoken notification). --- package: com.google.home.google.VolumeTrait.VolumeStepModeEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.VolumeStepModeEnum --- ### `enum VolumeTrait.VolumeStepModeEnum` Step values indicating whether to increase or decrease the volume. Inherits from `ClusterEnum`. #### Enum Values - `Decrease`: Decrease the device's volume. - `Increase`: Increase the device's volume. - `UnknownValue`: The enum value is out of range. #### Properties - `traitId: String`: Trait identifier of the Matter Cluster. - `typeName: String`: Name of the Matter Data Type. - `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ExtendedApplicationLauncherTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait --- ### `object ExtendedApplicationLauncherTrait` Attributes for ExtendedApplicationLauncherTrait. #### Nested Types - `class ApplicationNames`: Application names and language-specific synonyms. - `enum ApplicationType`: The type of an application. - `interface Attributes`: Attributes for the ExtendedApplicationLauncher cluster. - `class AvailableApplication`: Represents an application users can interact with. - `object InstallAppCommand`: Command to install an application. - `class Request`: Payload for the InstallApp command. - `object LaunchAppCommand`: Command to launch an application. - `class Request`: Payload for the LaunchApp command. - `object SearchAppCommand`: Command to search for an application. - `class Request`: Payload for the SearchApp command. #### Properties - `Id: ClusterId` --- package: com.google.home.google.GoogleAutoDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAutoDevice.StandardTraits --- ### `class GoogleAutoDevice.StandardTraits` Trait Container for Standard Traits. #### Constructor - `StandardTraits(traitProvider: TraitProvider)` #### Properties - `operationalState: OperationalState?`: Supports remote monitoring and changing of the device's operational state. - `powerSource: PowerSource?` --- package: com.google.home.google.ArmDisarmTrait.StatusEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.StatusEnum --- ### `enum ArmDisarmTrait.StatusEnum` The result status of the `ArmDisarm` command. Inherits from `ClusterEnum`. #### Enum Values - `Failure`: The command failed. - `Success`: The command succeeded. - `UnknownValue`: The enum value is out of range. - `Unspecified`: The result of the command is not provided. #### Properties - `traitId: String`: Trait identifier of the Matter Cluster. - `typeName: String`: Name of the Matter Data Type. - `value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ObjectDetectionTrait.ObjectDetected --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ObjectDetectionTrait.ObjectDetected --- ### `interface ObjectDetectionTrait.ObjectDetected` Detection notification event. #### Properties - `detectionTimestampMillis: Long?`: Unix Epoch timestamp (ms) of detection. - `objects: ObjectDetectionTrait.Objects?`: The objects detected, listed by category. - `priority: Int?`: Notification level (e.g., `0` for spoken notification). --- package: com.google.home.google.ExtendedFanControlTrait.ToggleAirflowDirectionCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.ToggleAirflowDirectionCommand --- ### `object ExtendedFanControlTrait.ToggleAirflowDirectionCommand` Command to reverse the current direction of the airflow. #### Nested Types - `class Request`: The request payload for the ToggleAirflowDirection command. #### Properties - `commandId: String`: Unique id for the command. --- package: com.google.home.google.CookTrait.FoodSynonym --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.FoodSynonym --- ### `class CookTrait.FoodSynonym` Available food synonyms for a language. Inherits from `ClusterStruct`. #### Constructor - `FoodSynonym(synonym: List, lang: String)` #### Properties - `lang: String`: ISO 639-1 language code (e.g., `en`). - `synonym: List`: Synonyms for the preset, including singular and plural forms. --- package: com.google.home.google.ExtendedDoorLockTrait.LockOperationTypeEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.LockOperationTypeEnum --- # enum `ExtendedDoorLockTrait.LockOperationTypeEnum` > The operation type of the lock. ### Enum Values * `ForcedUserEvent`: A forced user event occurred. * `Lock`: The lock is in the locked state. * `NonAccessUserEvent`: A non-access user event occurred. * `UnknownValue`: The enum value is out of range. * `Unlatch`: The lock is in the unlatched state. * `Unlock`: The lock is in the unlocked state. * `Unspecified`: Unspecified. ### Functions * `valueOf(value: String): ExtendedDoorLockTrait.LockOperationTypeEnum` * `values(): Array` ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. * `value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedPowerSource.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSource.Command --- # enum `ExtendedPowerSource.Command` > Descriptor enum for this trait's commands. ### Enum Values * `StartCharging`: The `startCharging` trait command. * `StopCharging`: The `stopCharging` trait command. ### Functions * `valueOf(value: String): ExtendedPowerSource.Command` * `values(): Array` ### Properties * `tag: UInt` --- package: com.google.home.google.ElevatorControlTrait.CallElevatorCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlTrait.CallElevatorCommand.Request --- # class `ElevatorControlTrait.CallElevatorCommand.Request` > The request payload for the CallElevator command. ### Constructors * `Request(floorName: String = "")`: Creates a request payload for the CallElevator command. ### Properties * `floorName: String`: The floor name of where to send the elevator. --- package: com.google.home.google.GoogleSprinklerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSprinklerDevice.StandardTraits --- # class `GoogleSprinklerDevice.StandardTraits` > Trait Container for Standard Traits. ### Constructors * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `operationalState: OperationalState?`: This trait supports remote monitoring and allows the operational state of any device to be changed provided that a state machine is part of the operation. --- package: com.google.home.google.LocatorTrait.SilenceCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorTrait.SilenceCommand --- # object `LocatorTrait.SilenceCommand` > Silence any in-progress alarms on devices that make an audible response for local alerts. ### Nested Types * `class Request`: The request payload for the Silence command. ### Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.Max2FilterMonitoringTrait.FilterMonitoringFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Max2FilterMonitoringTrait.FilterMonitoringFeature --- # data class `Max2FilterMonitoringTrait.FilterMonitoringFeature` > Max2FilterMonitoring trait feature map. ### Constructors * `FilterMonitoringFeature(warning: Boolean = false, condition: Boolean = false)` ### Functions * `toRaw(): ULong`: Convert this ClusterBitmap to raw (bytes) format. ### Properties * `bitmapName: String`: Name of the Matter bitmap, in UpperCamelCase, e.g. "OnOffControlBitmap" from OnOff Cluster. * `condition: Boolean`: The device supports monitoring the condition of the filter in terms of percentage of use remaining. * `traitId: String`: Trait identifier of the Matter Cluster that defines the bitmap Data Type. * `warning: Boolean`: The device supports a warning indication. --- package: com.google.home.google.ExtendedColorControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControl.Attribute --- # enum `ExtendedColorControl.Attribute` > Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `colorLoopEndTimestampSeconds` * `currentBlue` * `currentGreen` * `currentHue` * `currentName` * `currentRed` * `currentSaturation` * `currentValue` * `featureMap` * `generatedCommandList` ### Companion Properties * `StructDescriptor: StructDescriptor` ### Functions * `valueOf(value: String): ExtendedColorControl.Attribute` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.ExtendedColorControlCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlCommands --- # interface `ExtendedColorControlCommands` ### Functions * `suspend moveToColorHsv(hue: Float, saturation: Float, value: Float)`: Moves a device to the color specified in HSV semantics. * `hue`: Range is 0 to 360. * `saturation`: Range is 0 to 1. * `value`: Range is 0 to 1. * `moveToColorHsvBatchable(hue: Float, saturation: Float, value: Float): BatchableCommand`: The batchable version of `moveToColorHsv` command. * `suspend moveToColorName(colorName: String)`: Moves the device to the color named. * `moveToColorNameBatchable(colorName: String): BatchableCommand`: The batchable version of `moveToColorName` command. * `suspend moveToColorRgb(red: UByte, green: UByte, blue: UByte)`: Moves a device to the color specified in RGB semantics. The device may approximate the requested color. * `red`: Range is 0 to 155. * `green`: Range is 0 to 155. * `blue`: Range is 0 to 155. * `moveToColorRgbBatchable(red: UByte, green: UByte, blue: UByte): BatchableCommand`: The batchable version of `moveToColorRgb` command. --- package: com.google.home.google.GoogleWaterPurifierDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWaterPurifierDevice.StandardTraits --- # class `GoogleWaterPurifierDevice.StandardTraits` > Trait Container for Standard Traits. ### Constructors * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `onOff: OnOff?`: This trait provides an interface for turning devices on and off. --- package: com.google.home.google.NetworkControlTrait.LastNetworkDownloadSpeedTest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.LastNetworkDownloadSpeedTest --- # class `NetworkControlTrait.LastNetworkDownloadSpeedTest` > Results of the most recent network-download speed test. ### Constructors * `LastNetworkDownloadSpeedTest(downloadSpeedMbps: Float = 0.0f, unixTimestampSeconds: Long = 0, status: NetworkControlTrait.SpeedTestStatus = SpeedTestStatus.Unspecified)` ### Functions * `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties * `downloadSpeedMbps: Float`: The download speed in megabits per second of the most recent network speed test. * `status: NetworkControlTrait.SpeedTestStatus`: Whether the most recent network-download speed test succeeded or failed. * `unixTimestampSeconds: Long`: The Unix Epoch timestamp of when the most recent network-download speed test was run. --- package: com.google.home.google.DockTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DockTrait --- # object `DockTrait` > Attributes for DockTrait. ### Nested Types * `interface Attributes`: Attributes for the Dock cluster. * `object DockCommand`: Docks the device. * `class DockCommand.Request`: The request payload for the Dock command. ### Properties * `Id: ClusterId` --- package: com.google.home.google.NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest.CommandFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest.CommandFields --- # enum `NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest.CommandFields` ### Enum Values * `body` * `optInMemberEmails` * `title` ### Functions * `valueOf(value: String): NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest.CommandFields` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.ArmDisarmTrait.AvailableArmLevels --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.AvailableArmLevels --- # class `ArmDisarmTrait.AvailableArmLevels` > The supported security levels of the device. If this attribute is not reported, the device supports only one level. ### Constructors * `AvailableArmLevels(levels: List = emptyList(), ordered: Boolean = false)` ### Functions * `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties * `levels: List`: The available security levels supported by the device. * `ordered: Boolean`: If `true`, additional grammar for increase or decrease logic applies, in the order of the levels array. --- package: com.google.home.google.ExtendedMediaInput --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInput --- # interface `ExtendedMediaInput` > API for the ExtendedMediaInput trait. This trait is an extension of the Matter standard trait, `MediaInput`, and is used by devices that can switch inputs. ### Nested Types * `enum Attribute`: Descriptor enum for this trait's attributes. * `enum Command`: Descriptor enum for this trait's commands. ### Functions * `supports(attribute: ExtendedMediaInput.Attribute): Boolean` * `supports(command: ExtendedMediaInput.Command): Boolean` ### Properties * `factory: TraitFactory` ### Inherited Functions * `suspend nextInput()`: Select the next input. * `nextInputBatchable(): BatchableCommand`: The batchable version of `nextInput` command. * `suspend previousInput()`: Select the previous input. * `previousInputBatchable(): BatchableCommand`: The batchable version of `previousInput` command. * `suspend selectCustomInput(newInput: String)`: Set the media input. * `selectCustomInputBatchable(newInput: String): BatchableCommand`: The batchable version of `selectCustomInput` command. * `suspend forceRead()` ### Inherited Properties * `acceptedCommandList: List`: A list of client-generated commands supported by this cluster server instance. * `attributeList: List`: A list of the attribute IDs supported by the cluster instance. * `clusterRevision: UShort`: The revision of the server cluster specification. * `currentCustomInput: String?`: Key of the input currently in use. * `customInputsList: List?`: List of objects representing input audio or video feeds. * `customInputsOrdered: Boolean?`: If `true`, the list of outputs is ordered, and next/previous functionality is available. * `featureMap: UInt`: Whether the server supports zero or more optional cluster features. * `generatedCommandList: List`: A list of server-generated commands supported by this cluster server instance. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.ObjectDetection --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ObjectDetection --- # interface `ObjectDetection` > API for the ObjectDetection trait. This trait belongs to devices that can detect objects or people, and sends a notification to the user. By default, these notifications are announced on smart displays and speakers by Google Assistant following a doorbell ring chime. ### Nested Types * `enum Attribute`: Descriptor enum for this trait's attributes. ### Functions * `supports(attribute: ObjectDetection.Attribute): Boolean` ### Properties * `factory: TraitFactory` ### Inherited Functions * `suspend forceRead()` ### Inherited Properties * `acceptedCommandList: List`: A list of client-generated commands supported by this cluster server instance. * `attributeList: List`: A list of the attribute IDs supported by the cluster instance. * `clusterRevision: UShort`: The revision of the server cluster specification. * `featureMap: ObjectDetectionTrait.ObjectDetectionFeature`: Whether the server supports zero or more optional cluster features. * `generatedCommandList: List`: A list of server-generated commands supported by this cluster server instance. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.RelativeHumidityControlTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlTrait --- # object `RelativeHumidityControlTrait` > Attributes for RelativeHumidityControlTrait. ### Nested Types * `interface Attributes`: Attributes for the RelativeHumidityControl cluster. * `object SetRelativeHumidityCommand`: Set the relative humidity level to a specific value. * `class SetRelativeHumidityCommand.Request`: The request payload for the SetRelativeHumidity command. * `enum StepMode`: Indicates the direction of a step change. * `object StepRelativeHumidityCommand`: Increase or decrease the relative humidity. * `class StepRelativeHumidityCommand.Request`: The request payload for the StepRelativeHumidity command. ### Properties * `Id: ClusterId` --- package: com.google.home.google.AreaAttendanceStateTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceStateTrait.Attributes --- # interface `AreaAttendanceStateTrait.Attributes` > Attributes for the AreaAttendanceState Trait. ### Properties * `attendanceState: AreaAttendanceStateTrait.AttendanceState?` --- package: com.google.home.google.ExtendedChannelTrait.ExtendedMediaChannel --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannelTrait.ExtendedMediaChannel --- # class `ExtendedChannelTrait.ExtendedMediaChannel` > Media channel description. ### Constructors * `ExtendedMediaChannel(number: String = "", key: String = "", names: List = emptyList())` ### Functions * `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties * `key: String`: Unique identifier for this channel. Not exposed to users. * `names: List`: List of user-visible names for this channel. * `number: String`: Optional numeric identifier for this channel, for example `256` or `13.1`. --- package: com.google.home.google.SimplifiedOnOffTrait.OnOffEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedOnOffTrait.OnOffEnum --- # enum `SimplifiedOnOffTrait.OnOffEnum` > The on or off state of the device. ### Enum Values * `Off`: The device is off. * `On`: The device is on. * `UnknownValue`: The enum value is out of range. * `Unspecified`: The device's on or off state is unspecified. ### Functions * `valueOf(value: String): SimplifiedOnOffTrait.OnOffEnum` * `values(): Array` ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String`: Name of the Matter Data Type that the enum belongs to, in UpperCamelCase. * `value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.NotificationTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait --- # class `NotificationTrait` ### Nested Types * `object SendNotificationsCommand`: Send a notification to structure members. * `interface SendNotificationsCommand.OptionalArgs`: Optional arguments for the SendNotificationsCommand.Request. * `class SendNotificationsCommand.SendNotificationsCommandRequest`: The request payload for the Notification command. * `enum SendNotificationsCommand.SendNotificationsCommandRequest.CommandFields` * `class User` ### Constructors * `NotificationTrait()` --- package: com.google.home.google.Time.ScheduledTimeEvent --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Time.ScheduledTimeEvent --- # class `Time.ScheduledTimeEvent` > An event which is sent at a pre-scheduled time. A structure address is required and must be added in the Google Home app. ### Nested Types * `enum EventFields` ### Properties * `eventImportance: EventImportance`: Importance of the event. * `eventName: String`: Event name. * `eventNumber: ULong`: Event number. ### Inherited Properties * `eventId: Id`: ID of the Event. * `timestamp: Instant`: Time of the event. * `clockTime: LocalTime?`: A point in time expressed in hours, minutes, seconds, and nanoseconds. * `data: ByteArray?` * `daysOfWeek: List`: A list of days of the week. * `solarTime: TimeTrait.SolarTimeStruct?`: The time of a daily solar event such as sunrise, noon, and sunset. --- package: com.google.home.google.OpenCloseTrait.OpenCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.OpenCommand --- # object `OpenCloseTrait.OpenCommand` > Fully open the device. ### Nested Types * `class Request`: The request payload for the Open command. ### Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.GoogleStreamingSoundbarDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingSoundbarDevice.GoogleTraits --- # class `GoogleStreamingSoundbarDevice.GoogleTraits` > Trait Container for Google Traits. ### Constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `extendedApplicationLauncher: ExtendedApplicationLauncher?`: Supports devices which are able to switch between applications. * `extendedLevelControl: ExtendedLevelControl?`: Belongs to devices which have a volume control. * `extendedMediaInput: ExtendedMediaInput?`: An extension of the Matter standard trait, `MediaInput`, used by devices that can switch inputs. * `extendedMediaPlayback: ExtendedMediaPlayback?` * `mediaActivityState: MediaActivityState?` --- package: com.google.home.google.AssistantBroadcastTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantBroadcastTrait --- # class `AssistantBroadcastTrait` ### Nested Types * `interface Attributes`: Attributes for the AssistantBroadcast Trait. * `object BroadcastCommand` * `class BroadcastCommand.BroadcastCommandRequest`: The request payload for the BroadcastCommand command. * `class BroadcastCommand.BroadcastCommandResponse`: The response payload for the BroadcastCommand command. ### Constructors * `AssistantBroadcastTrait()` --- package: com.google.home.google.GoogleWaterPurifierDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWaterPurifierDevice.GoogleTraits --- # class `GoogleWaterPurifierDevice.GoogleTraits` > Trait Container for Google Traits. ### Constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `filterMonitoring: FilterMonitoring?`: Provides an interface for monitoring the current condition of a filter. * `preFilterMonitoring: PreFilterMonitoring?`: Provides an interface to pre-filter state monitoring. --- package: com.google.home.google.ExtendedOperationalStateTrait.StartStopFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StartStopFollowUp --- # interface `ExtendedOperationalStateTrait.StartStopFollowUp` > Follow-up event for start and stop commands. ### Properties * `isRunning: Boolean?`: Indicates whether the device was successfully started or stopped. --- package: com.google.home.google.GoogleDrawerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDrawerDevice.GoogleTraits --- # class `GoogleDrawerDevice.GoogleTraits` > Trait Container for Google Traits. ### Constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `openClose: OpenClose?`: Belongs to devices that support opening and closing, and in some cases partially or in more than one direction. --- package: com.google.home.google.GoogleGateDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGateDevice --- # class `GoogleGateDevice` > A device consisting of a solid, movable barrier that controls access to an outside area through a fence or wall. Gates can be opened and closed, potentially in more than one direction. ### Nested Types * `class GoogleTraits`: Trait Container for Google Traits. ### Constructors * `GoogleGateDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleGateDevice.GoogleTraits)` ### Properties * `factory: DeviceTypeFactory` * `googleTraits: GoogleGateDevice.GoogleTraits` * `metadata: DeviceType.Metadata` ### Inherited Functions * `events(): Flow`: Gets a flow of all Events for the object. * ` events(event: EventFactory): Flow`: Gets a flow of a specific Event. * ` events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * ` metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Accesses specific trait metadata. * ` trait(traitFactory: TraitFactory): T?`: Accesses a specific trait. * `traits(): Set`: Returns a subset of traits that are present. ### Inherited Properties * `traitProvider: TraitProvider` --- package: com.google.home.google.FillTrait.FillCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait.FillCommand.Request --- # class `FillTrait.FillCommand.Request` > The request payload for the Fill command. ### Constructors * `Request(fill: Boolean = false, fillLevel: String = "", fillPercent: Float = 0.0f)` ### Properties * `fill: Boolean`: Set to `true` to fill, `false` to drain. * `fillLevel: String`: The `levelName` from the `availableFillLevels` attribute to set. If unspecified, fills to the default level. * `fillPercent: Float`: The requested level percentage. --- package: com.google.home.google.GoogleMulticookerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMulticookerDevice --- # class `GoogleMulticookerDevice` > A device used to cook food using various methods including slow cooking, sauteing, steaming, or pressure cooking, typically while unattended. Interactions may include starting/stopping, setting a timer, or adjusting non-cooking modes. ### Nested Types * `class GoogleTraits`: Trait Container for Google Traits. * `class StandardTraits`: Trait Container for Standard Traits. ### Constructors * `GoogleMulticookerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleMulticookerDevice.GoogleTraits, standardTraits: GoogleMulticookerDevice.StandardTraits)` ### Properties * `factory: DeviceTypeFactory` * `googleTraits: GoogleMulticookerDevice.GoogleTraits` * `metadata: DeviceType.Metadata` * `standardTraits: GoogleMulticookerDevice.StandardTraits` ### Inherited Functions * `events(): Flow`: Gets a flow of all Events for the object. * ` events(event: EventFactory): Flow`: Gets a flow of a specific Event. * ` events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * ` metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Accesses specific trait metadata. * ` trait(traitFactory: TraitFactory): T?`: Accesses a specific trait. * `traits(): Set`: Returns a subset of traits that are present. ### Inherited Properties * `traitProvider: TraitProvider` --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand --- ### `object ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand` A command descriptor. * **Nested Types**: * `class Request` * **Properties**: * `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.OpenCloseTrait.CloseCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.CloseCommand.Request --- ### `class OpenCloseTrait.CloseCommand.Request` The request payload for the `Close` command. * **Constructors**: * `Request()` --- package: com.google.home.google.GoogleMopDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMopDevice.StandardTraits --- ### `class GoogleMopDevice.StandardTraits` A container for standard traits. * **Constructor**: * `StandardTraits(traitProvider: TraitProvider)` * **Properties**: * `onOff: OnOff?` - Trait for turning devices on and off. * `operationalState: OperationalState?` - Trait for remote monitoring and changing the operational state of a device. * `powerSource: PowerSource?` --- package: com.google.home.google.Dock --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Dock --- ### `interface Dock` API for the Dock trait, for self-mobile devices that can return for charging. Implements `DockTrait.Attributes`, `MatterTrait`, `DockCommands`. * **Nested Types**: * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. * **Functions**: * `supports(attribute: Dock.Attribute): Boolean` * `supports(command: Dock.Command): Boolean` * **Properties**: * `factory: TraitFactory` * **Inherited Functions**: * `dock(): suspend Unit` - Docks the device. * `dockBatchable(): BatchableCommand` - Batchable version of the `dock` command. * `forceRead(): suspend Unit` * **Inherited Properties**: * `acceptedCommandList: List` - Supported client-generated commands. * `attributeList: List` - Supported attribute IDs. * `clusterRevision: UShort` - Supported server cluster specification revision. * `featureMap: UInt` - Supported optional cluster features. * `generatedCommandList: List` - Supported server-generated commands. * `isDocked: Boolean?` - Indicates if the device is connected to the docking station. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.NetworkControlTrait.EnableDisableNetworkProfileCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.EnableDisableNetworkProfileCommand.Request --- ### `class NetworkControlTrait.EnableDisableNetworkProfileCommand.Request` The request payload for the `EnableDisableNetworkProfile` command. * **Constructor**: * `Request(enable: Boolean, networkProfileName: String)` * **Properties**: * `enable: Boolean` - `true` enables the profile, `false` disables it. * `networkProfileName: String` - The profile name from the list of available profiles. --- package: com.google.home.google.ExtendedModeSelectTrait.ChangeModeSettingsCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait.ChangeModeSettingsCommand --- ### `object ExtendedModeSelectTrait.ChangeModeSettingsCommand` A command descriptor. * **Nested Types**: * `class Request` * **Properties**: * `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.GoogleCoffeeMakerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleCoffeeMakerDevice.StandardTraits --- ### `class GoogleCoffeeMakerDevice.StandardTraits` A container for standard traits. * **Constructor**: * `StandardTraits(traitProvider: TraitProvider)` * **Properties**: * `onOff: OnOff?` - Trait for turning devices on and off. * `temperatureControl: TemperatureControl?` - Trait for controlling setpoint temperature. * `temperatureMeasurement: TemperatureMeasurement?` - Trait for temperature measurement capability. --- package: com.google.home.google.GoogleKettleDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleKettleDevice.GoogleTraits --- ### `class GoogleKettleDevice.GoogleTraits` A container for Google traits. * **Constructor**: * `GoogleTraits(traitProvider: TraitProvider)` * **Properties**: * `extendedTemperatureControl: ExtendedTemperatureControl?` - Trait for devices that support controlling temperature. --- package: com.google.home.google.GoogleStreamingBoxDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingBoxDevice.GoogleTraits --- ### `class GoogleStreamingBoxDevice.GoogleTraits` A container for Google traits. * **Constructor**: * `GoogleTraits(traitProvider: TraitProvider)` * **Properties**: * `extendedApplicationLauncher: ExtendedApplicationLauncher?` - Supports devices that can switch between applications. * `extendedChannel: ExtendedChannel?` - Supports devices with TV channels. * `extendedLevelControl: ExtendedLevelControl?` - For devices with a volume control. * `extendedMediaInput: ExtendedMediaInput?` - Extension of `MediaInput` for devices that can switch inputs. * `extendedMediaPlayback: ExtendedMediaPlayback?` * `mediaActivityState: MediaActivityState?` --- package: com.google.home.google.SyntheticTraitRegistry --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticTraitRegistry --- ### `object SyntheticTraitRegistry` * **Properties**: * `traits: ` --- package: com.google.home.google.GoogleKettleDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleKettleDevice.StandardTraits --- ### `class GoogleKettleDevice.StandardTraits` A container for standard traits. * **Constructor**: * `StandardTraits(traitProvider: TraitProvider)` * **Properties**: * `onOff: OnOff?` - Trait for turning devices on and off. * `temperatureControl: TemperatureControl?` - Trait for controlling setpoint temperature. * `temperatureMeasurement: TemperatureMeasurement?` - Trait for temperature measurement capability. --- package: com.google.home.google.FillTrait.LevelSynonym --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait.LevelSynonym --- ### `class FillTrait.LevelSynonym` A `ClusterStruct` representing synonyms of a fill level in a given language. * **Constructor**: * `LevelSynonym(levelSynonym: List, lang: String)` * **Functions**: * `getDescriptor(): StructDescriptor` - Returns the struct descriptor. * `getFieldValueById(tagId: UInt): Any?` - Returns a field's value by its tag ID. * **Properties**: * `lang: String` - ISO 639-1 language code (e.g., `en`). * `levelSynonym: List` - Synonyms of the level. The first is the canonical name. --- package: com.google.home.google.NetworkControlTrait.EnableDisableNetworkProfileCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.EnableDisableNetworkProfileCommand --- ### `object NetworkControlTrait.EnableDisableNetworkProfileCommand` A command descriptor to enable or disable a network profile, requiring secondary user verification. * **Nested Types**: * `class Request`: The request payload. * **Properties**: * `commandId: String` - Unique id for the command. --- package: com.google.home.google.ExtendedMediaPlaybackTrait.SetRepeatCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.SetRepeatCommand.Request --- ### `class ExtendedMediaPlaybackTrait.SetRepeatCommand.Request` Request payload for the `SetRepeat` command. * **Constructor**: * `Request(isOn: Boolean, isSingle: Boolean)` * **Properties**: * `isOn: Boolean` * `isSingle: Boolean` --- package: com.google.home.google.GoogleStreamingStickDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingStickDevice.GoogleTraits --- ### `class GoogleStreamingStickDevice.GoogleTraits` A container for Google traits. * **Constructor**: * `GoogleTraits(traitProvider: TraitProvider)` * **Properties**: * `extendedApplicationLauncher: ExtendedApplicationLauncher?` - Supports devices that can switch between applications. * `extendedLevelControl: ExtendedLevelControl?` - For devices with a volume control. * `extendedMediaPlayback: ExtendedMediaPlayback?` * `mediaActivityState: MediaActivityState?` --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ExtendedPlaybackState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ExtendedPlaybackState --- ### `enum ExtendedMediaPlaybackTrait.ExtendedPlaybackState` An enum representing extended playback states. * **Enum Values**: * `FastForwarding` * `Rewinding` * `Standard` * `UnknownValue` - The enum value is out of range. * **Functions**: * `valueOf(value: String): ExtendedPlaybackState` * `values(): Array` * **Properties**: * `traitId: String` - Trait identifier of the Matter Cluster. * `typeName: String` - Name of the Matter Data Type. * `value: ULong` - Integer identifier of the enum value. --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand --- ### `object ExtendedMediaPlaybackTrait.ClosedCaptioningOnCommand` A command descriptor. * **Nested Types**: * `class Request` * **Properties**: * `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.BrightnessTrait.MoveToBrightnessCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/BrightnessTrait.MoveToBrightnessCommand.Request --- ### `class BrightnessTrait.MoveToBrightnessCommand.Request` The request payload for the `MoveToBrightness` command. * **Constructor**: * `Request(brightnessPercent: UByte)` * **Properties**: * `brightnessPercent: UByte` - The desired brightness percentage (0-100). --- package: com.google.home.google.ExtendedApplicationLauncherCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherCommands --- ### `interface ExtendedApplicationLauncherCommands` Defines commands for launching, installing, and searching for applications. * **Functions**: * `installApp(newApplicationName: String, newApplication: String): suspend Unit` - Installs the given application. * `installAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` - Batchable version of `installApp`. * `launchApp(newApplicationName: String, newApplication: String): suspend Unit` - Launches the given application. * `launchAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` - Batchable version of `launchApp`. * `searchApp(newApplicationName: String, newApplication: String): suspend Unit` - Searches for the given application. * `searchAppBatchable(newApplicationName: String, newApplication: String): BatchableCommand` - Batchable version of `searchApp`. --- package: com.google.home.google.TimeTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimeTrait --- ### `class TimeTrait` Represents a point in time, as a Unix timestamp, or as a solar time (sunrise/sunset). * **Constructor**: * `TimeTrait()` * **Nested Types**: * `interface Attributes` * `interface RecurringClockTimeScheduledEvent` * `interface RecurringSolarTimeScheduledEvent` * `interface ScheduledTimeEvent` * `class SolarTimeStruct` * `enum SolarTimeStruct.StructFields` * `enum SolarTimeType` --- package: com.google.home.google.ExtendedFanControlTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.Attributes --- ### `interface ExtendedFanControlTrait.Attributes` Attributes for the `ExtendedFanControl` cluster. * **Properties**: * `acceptedCommandList: List` - Supported client-generated commands. * `attributeList: List` - Supported attribute IDs. * `clusterRevision: UShort` - Supported server cluster specification revision. * `customFanMode: String?` - (Write) The currently selected custom speed setting. * `customFanModes: ExtendedFanControlTrait.AvailableFanSpeeds?` - (Read) The custom speed settings supported by this device. * `featureMap: UInt` - Supported optional cluster features. * `generatedCommandList: List` - Supported server-generated commands. --- package: com.google.home.google.LightEffectsTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait --- ### `object LightEffectsTrait` Attributes and commands for `LightEffectsTrait`. * **Properties**: * `Id: ClusterId` * **Nested Types**: * `interface Attributes`: Attributes for the LightEffects cluster. * `class Color`: Color of the light for the effect duration. * `data class LightEffectsFeature`: Capabilities related to light effects. * `object PulseEffectSetCommand`: Activates the pulse effect. * `class PulseEffectSetCommand.Request` * `object SleepEffectSetCommand`: Activates the sleep effect. * `class SleepEffectSetCommand.Request` * `class SpectrumHsv`: Represents a color using the HSV model. * `object StopEffectCommand`: Stops the active effect. * `class StopEffectCommand.Request` * `object WakeEffectSetCommand`: Activates the wake effect. * `class WakeEffectSetCommand.Request` --- package: com.google.home.google.AreaAttendanceState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceState --- ### `class AreaAttendanceState` Implements `PlatformTrait`, `AreaAttendanceStateTrait.Attributes`, `Updatable`. * **Nested Types**: * `enum Attribute`: Descriptor for this trait's attributes. * **Functions**: * `update(optimisticReturn: (AreaAttendanceState) -> Unit, init: AreaAttendanceStateTrait.MutableAttributes.() -> Unit): open suspend AreaAttendanceState` - Updater function to modify writable attributes. * **Properties**: * `factory: TraitFactory` * **Inherited Properties**: * `attendanceState: AreaAttendanceStateTrait.AttendanceState?` --- package: com.google.home.google.ObjectDetection.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ObjectDetection.Attribute --- ### `enum ObjectDetection.Attribute` Descriptor enum for `ObjectDetection` trait's attributes. * **Enum Values**: * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * **Companion Properties**: * `StructDescriptor: StructDescriptor` * **Properties**: * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.DispenseTrait.Amount --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.Amount --- ### `class DispenseTrait.Amount` A `ClusterStruct` representing available dispensible item amounts. * **Constructor**: * `Amount(amount: Float, unit: DispenseTrait.Unit)` * **Functions**: * `getDescriptor(): StructDescriptor` - Returns the struct descriptor. * `getFieldValueById(tagId: UInt): Any?` - Returns a field's value by its tag ID. * **Properties**: * `amount: Float` - Amount of the specified unit. * `unit: DispenseTrait.Unit` - Unit for the amount. --- package: com.google.home.google.RelativeHumidityControlTrait.SetRelativeHumidityCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlTrait.SetRelativeHumidityCommand --- ### `object RelativeHumidityControlTrait.SetRelativeHumidityCommand` A command descriptor to set the relative humidity level to a specific value. * **Nested Types**: * `class Request`: The request payload. * **Properties**: * `commandId: String` - Unique id for the command. --- package: com.google.home.google.BrightnessCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/BrightnessCommands --- ### `interface BrightnessCommands` Defines commands for controlling device brightness. * **Functions**: * `brightnessStep(stepMode: BrightnessTrait.BrightnessStepModeEnum, step: UByte): suspend Unit` - Incrementally steps brightness. * `brightnessStepBatchable(stepMode: BrightnessTrait.BrightnessStepModeEnum, step: UByte): BatchableCommand` - Batchable version of `brightnessStep`. * `moveToBrightness(brightnessPercent: UByte): suspend Unit` - Moves brightness to a specified percentage. * `moveToBrightnessBatchable(brightnessPercent: UByte): BatchableCommand` - Batchable version of `moveToBrightness`. --- package: com.google.home.google.ExtendedMediaInput.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInput.Command --- ### `enum ExtendedMediaInput.Command` Descriptor enum for `ExtendedMediaInput` trait's commands. * **Enum Values**: * `NextInput` * `PreviousInput` * `SelectCustomInput` * **Properties**: * `tag: UInt` --- package: com.google.home.google.ObjectDetectionTrait.ObjectType --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ObjectDetectionTrait.ObjectType --- ### `enum ObjectDetectionTrait.ObjectType` An enum representing detected object types. * **Enum Values**: * `Animal` * `FaceFamiliar` - A recognized person has been detected. * `FaceUnfamiliar` - An unrecognized person has been detected. * `PackageDelivered` - A package has been delivered. * `Person` - A person has been detected. * `Unknown` - A person or object detected, but with no more information. * `UnknownValue` - The enum value is out of range. * `Vehicle` * **Properties**: * `traitId: String` - Trait identifier of the Matter Cluster. * `typeName: String` - Name of the Matter Data Type. * `value: ULong` - Integer identifier of the enum value. --- package: com.google.home.google.RelativeHumidityControl.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControl.Command --- ### `enum RelativeHumidityControl.Command` Descriptor enum for `RelativeHumidityControl` trait's commands. * **Enum Values**: * `SetRelativeHumidity` * `StepRelativeHumidity` * **Properties**: * `tag: UInt` --- package: com.google.home.google.GoogleStandmixerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStandmixerDevice --- # GoogleStandmixerDevice `class GoogleStandmixerDevice : DeviceType` A kitchen appliance for blending ingredients. Interactions include on/off, start/stop, and adjusting cooking or non-cooking modes. ### Nested Types * `class GoogleTraits`: Container for Google Traits. * `class StandardTraits`: Container for Standard Traits. ### Constructors * `GoogleStandmixerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleTraits, standardTraits: StandardTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleStandmixerDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` * `standardTraits`: `GoogleStandmixerDevice.StandardTraits` ### Inherited Functions * **From `com.google.home.HasEvents`**: * `events()`: `open Flow` - Gets a flow of all available Events. * `events(event: EventFactory)`: `open Flow` - Gets a flow of a specific Event. * `events(trait: TraitFactory)`: `open Flow` - Gets a flow of all Events by this `Trait`. * **From `com.google.home.TraitProvider`**: * `metadata(traitFactory: TraitFactory)`: `open Trait.TraitMetadata?` - Accesses a specific trait's metadata. * `trait(traitFactory: TraitFactory)`: `open T?` - Accesses a specific trait. * `traits()`: `open Set` - Returns a set of available traits. ### Inherited Properties * **From `com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.ElevatorControlCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlCommands --- # ElevatorControlCommands `interface ElevatorControlCommands` API for the ElevatorControl trait. **Known direct subclasses:** `ElevatorControl` ### Functions * `suspend fun callElevator(floorName: String)`: Call the elevator. * `floorName`: The floor name of where to send the elevator. * `fun callElevatorBatchable(floorName: String): BatchableCommand`: The batchable version of `callElevator`. * `floorName`: The floor name of where to send the elevator. --- package: com.google.home.google.NetworkControlTrait.GetGuestNetworkPasswordCommand.Response --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.GetGuestNetworkPasswordCommand.Response --- # NetworkControlTrait.GetGuestNetworkPasswordCommand.Response `class NetworkControlTrait.GetGuestNetworkPasswordCommand.Response` ### Constructors * `Response(guestNetworkPassword: String = "")` ### Properties * `guestNetworkPassword`: `String` --- package: com.google.home.google.NetworkControlTrait.GetGuestNetworkPasswordCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.GetGuestNetworkPasswordCommand --- # NetworkControlTrait.GetGuestNetworkPasswordCommand `object NetworkControlTrait.GetGuestNetworkPasswordCommand : CommandDescriptor` Gets the password of the guest network. Use this command from the `trait(NetworkControl)` method. ### Nested Types * `class Request`: The request payload for the GetGuestNetworkPassword command. * `class Response` ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.DispenseTrait.ItemNameSynonym --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.ItemNameSynonym --- # DispenseTrait.ItemNameSynonym `class DispenseTrait.ItemNameSynonym : ClusterStruct` Synonym names for the dispensed item in a given language. ### Constructors * `ItemNameSynonym(synonyms: List = emptyList(), lang: String = "")` ### Functions * `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties * `lang`: `String` - ISO 639-1 language code (e.g., `en` for English). * `synonyms`: `List` - Synonyms for the dispensed item, including singular and plural forms. --- package: com.google.home.google.Toggles --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Toggles --- # Toggles `interface Toggles : TogglesTrait.Attributes, MatterTrait, TogglesCommands` API for the Toggles trait, for devices with settings that can be in one of two states (on/off). ### Nested Types * `enum Attribute`: Descriptor enum for this trait's attributes. * `enum Command`: Descriptor enum for this trait's commands. ### Functions * `supports(attribute: Toggles.Attribute): Boolean` * `supports(command: Toggles.Command): Boolean` ### Properties * `factory`: `open TraitFactory` ### Inherited Functions * **From `com.google.home.google.TogglesCommands`**: * `suspend changeToggleSettings(updatedToggleSettings: List)`: Changes the state of one or more toggles. * `changeToggleSettingsBatchable(updatedToggleSettings: List): BatchableCommand`: Batchable version of `changeToggleSettings`. * **From `com.google.home.TraitStateInvalidation`**: * `suspend forceRead()` ### Inherited Properties * **From `com.google.home.google.TogglesTrait.Attributes`**: * `acceptedCommandList`: `List` - Supported client-generated commands. * `attributeList`: `List` - Supported attribute IDs. * `clusterRevision`: `UShort` - Supported server cluster specification revision. * `currentToggleSettings`: `List?` - The current state of each available toggle. * `featureMap`: `UInt` - Supported optional cluster features. * `generatedCommandList`: `List` - Supported server-generated commands. * `supportedToggles`: `List?` - The list of available toggles. * **From `com.google.home.Trait`**: * `metadata`: `Trait.TraitMetadata` --- package: com.google.home.google.GoogleNetworkDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleNetworkDevice --- # GoogleNetworkDevice `class GoogleNetworkDevice : DeviceType` A device representing a group of router nodes or a mesh network controlled as a single entity. It can reboot, update software, and manage QoS and parental restrictions. ### Nested Types * `class GoogleTraits`: Trait Container for Google Traits. ### Constructors * `GoogleNetworkDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleNetworkDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` ### Inherited Functions * **From `com.google.home.HasEvents`**: * `events()`: `open Flow` - Gets a flow of all available Events. * `events(event: EventFactory)`: `open Flow` - Gets a flow of a specific Event. * `events(trait: TraitFactory)`: `open Flow` - Gets a flow of all Events by this `Trait`. * **From `com.google.home.TraitProvider`**: * `metadata(traitFactory: TraitFactory)`: `open Trait.TraitMetadata?` - Accesses a specific trait's metadata. * `trait(traitFactory: TraitFactory)`: `open T?` - Accesses a specific trait. * `traits()`: `open Set` - Returns a set of available traits. ### Inherited Properties * **From `com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.InstallAppCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.InstallAppCommand.Request --- # ExtendedApplicationLauncherTrait.InstallAppCommand.Request `class ExtendedApplicationLauncherTrait.InstallAppCommand.Request` The request payload for the InstallApp command. ### Constructors * `Request(newApplicationName: String = "", newApplication: String = "")` ### Properties * `newApplication`: `String` - Key of the application to install. * `newApplicationName`: `String` - Name of the application to install. --- package: com.google.home.google.VolumeTrait.VolumeStepCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.VolumeStepCommand --- # VolumeTrait.VolumeStepCommand `object VolumeTrait.VolumeStepCommand : CommandDescriptor` Incrementally steps volume. Clamps the value between 0 and 100. Use this command from the `trait(Volume)` method. ### Nested Types * `class Request`: The request payload for the VolumeStep command. ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.VolumeTrait.UnmuteCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.UnmuteCommand --- # VolumeTrait.UnmuteCommand `object VolumeTrait.UnmuteCommand : CommandDescriptor` Unmutes the device and sets the volume to the last non-zero volume. Use this command from the `trait(Volume)` method. ### Nested Types * `class Request`: The request payload for the Unmute command. ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.PreFilterMonitoringTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/PreFilterMonitoringTrait --- # PreFilterMonitoringTrait `object PreFilterMonitoringTrait` Attributes for PreFilterMonitoringTrait. ### Nested Types * `interface Attributes`: Attributes for the PreFilterMonitoring cluster. * `enum ChangeIndication`: The requirement for changing the pre-filter. * `data class FilterMonitoringFeature`: PreFilterMonitoring trait FeatureMap. ### Properties * `Id`: `ClusterId` --- package: com.google.home.google.ExtendedPowerSourceTrait.StopChargingCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.StopChargingCommand.Request --- # ExtendedPowerSourceTrait.StopChargingCommand.Request `class ExtendedPowerSourceTrait.StopChargingCommand.Request` ### Constructors * `Request()` --- package: com.google.home.google.AreaPresenceStateTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaPresenceStateTrait.Attributes --- # AreaPresenceStateTrait.Attributes `interface AreaPresenceStateTrait.Attributes` Attributes for the AreaPresenceState Trait. **Known direct subclasses:** `AreaPresenceStateTrait.MutableAttributes`, `AreaPresenceState` ### Properties * `presenceState`: `AreaPresenceStateTrait.PresenceState?` --- package: com.google.home.google.ExtendedMediaInputTrait.SelectCustomInputCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.SelectCustomInputCommand.Request --- # ExtendedMediaInputTrait.SelectCustomInputCommand.Request `class ExtendedMediaInputTrait.SelectCustomInputCommand.Request` The request payload for the SelectCustomInput command. ### Constructors * `Request(newInput: String = "")` ### Properties * `newInput`: `String` - Key of the new input. --- package: com.google.home.google.AreaPresenceStateTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaPresenceStateTrait --- # AreaPresenceStateTrait `class AreaPresenceStateTrait` ### Nested Types * `interface Attributes`: Attributes for the AreaPresenceState Trait. * `class MutableAttributes : AreaPresenceStateTrait.Attributes` * `enum PresenceState : Enum, PlatformEnum` ### Constructors * `AreaPresenceStateTrait()` --- package: com.google.home.google.SimplifiedOnOffTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedOnOffTrait.Attributes --- # SimplifiedOnOffTrait.Attributes `interface SimplifiedOnOffTrait.Attributes` Attributes for the SimplifiedOnOff cluster. **Known direct subclasses:** `SimplifiedOnOff` ### Properties * `acceptedCommandList`: `List` - Supported client-generated commands. * `attributeList`: `List` - Supported attribute IDs. * `clusterRevision`: `UShort` - Supported server cluster specification revision. * `featureMap`: `UInt` - Supported optional cluster features. * `generatedCommandList`: `List` - Supported server-generated commands. * `onOff`: `SimplifiedOnOffTrait.OnOffEnum?` - Indicates the on or off state of the device. --- package: com.google.home.google.ExtendedThermostatTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait --- # ExtendedThermostatTrait `object ExtendedThermostatTrait` Attributes for ExtendedThermostatTrait. ### Nested Types * `enum AlarmType` * `interface Attributes`: Attributes for the ExtendedThermostat cluster. * `data class ExtendedProgrammingOperationMode`: Thermostat-extended operation modes. * `enum ExtendedRunningMode`: The current mode of the device. * `enum ExtendedSetpointChangeSource`: The source of the current temperature hold. * `data class ExtendedThermostatFeature`: ExtendedThermostat trait feature map. * `enum ExtendedThermostatMode`: Represents a mode in which a thermostat can operate. * `object NotifySensorStateChangeCommand : CommandDescriptor` * `class NotifySensorStateChangeCommand.Request` * `class Preset : ClusterStruct`: Information about a preset. * `enum PresetScenario`: The type of preset. * `class PresetSynonyms : ClusterStruct`: Synonyms for the preset in a given language. * `enum SensorType` ### Properties * `Id`: `ClusterId` --- package: com.google.home.google.FillTrait.FillFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait.FillFeature --- # FillTrait.FillFeature `data class FillTrait.FillFeature` Contains specific capabilities related to fill. ### Constructors * `FillFeature(supportsFillPercent: Boolean = false)` ### Functions * `toRaw()`: `open ULong` - Convert this ClusterBitmap to raw (bytes) format. ### Properties * `bitmapName`: `String` - Name of the Matter bitmap (e.g., "OnOffControlBitmap"). * `supportsFillPercent`: `Boolean` - If `true`, the device accepts commands for adjusting the level to a percentage. * `traitId`: `String` - Trait identifier of the Matter Cluster that defines the bitmap Data Type. --- package: com.google.home.google.LocatorTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorTrait.Attributes --- # LocatorTrait.Attributes `interface LocatorTrait.Attributes` Attributes for the Locator cluster. **Known direct subclasses:** `Locator` ### Properties * `acceptedCommandList`: `List` - Supported client-generated commands. * `attributeList`: `List` - Supported attribute IDs. * `clusterRevision`: `UShort` - Supported server cluster specification revision. * `featureMap`: `LocatorTrait.LocatorFeature` - Supported optional cluster features. * `generatedCommandList`: `List` - Supported server-generated commands. --- package: com.google.home.google.NetworkControlTrait.LastNetworkUploadSpeedTest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.LastNetworkUploadSpeedTest --- # NetworkControlTrait.LastNetworkUploadSpeedTest `class NetworkControlTrait.LastNetworkUploadSpeedTest : ClusterStruct` The results of the most recent network-upload speed test. ### Constructors * `LastNetworkUploadSpeedTest(unixTimestampSeconds: Long = 0, uploadSpeedMbps: Float = 0.0f, status: NetworkControlTrait.SpeedTestStatus = SpeedTestStatus.Unspecified)` ### Functions * `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties * `status`: `NetworkControlTrait.SpeedTestStatus` - Whether the test succeeded or failed. * `unixTimestampSeconds`: `Long` - The Unix Epoch timestamp of when the test was run. * `uploadSpeedMbps`: `Float` - The upload speed in megabits per second. --- package: com.google.home.google.GoogleChargerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleChargerDevice.StandardTraits --- # GoogleChargerDevice.StandardTraits `class GoogleChargerDevice.StandardTraits` Trait Container for Standard Traits. ### Constructors * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `powerSource`: `PowerSource?` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.AvailableApplication --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.AvailableApplication --- # ExtendedApplicationLauncherTrait.AvailableApplication `class ExtendedApplicationLauncherTrait.AvailableApplication : ClusterStruct` Represents an application that users of this device can interact with. ### Constructors * `AvailableApplication(key: String = "", names: List = emptyList())` ### Functions * `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties * `key`: `String` - Unique, non-user-facing key for the application. * `names`: `List` - Application's names and language-specific synonyms. --- package: com.google.home.google.Max2FilterMonitoring --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Max2FilterMonitoring --- # Max2FilterMonitoring `interface Max2FilterMonitoring : Max2FilterMonitoringTrait.Attributes, MatterTrait` API for the Max2FilterMonitoring trait, used for monitoring the Max2 filter on a device. ### Nested Types * `enum Attribute`: Descriptor enum for this trait's attributes. ### Functions * `supports(attribute: Max2FilterMonitoring.Attribute): Boolean` ### Properties * `factory`: `open TraitFactory` ### Inherited Functions * **From `com.google.home.TraitStateInvalidation`**: * `suspend forceRead()` ### Inherited Properties * **From `com.google.home.google.Max2FilterMonitoringTrait.Attributes`**: * `acceptedCommandList`: `List` - Supported client-generated commands. * `attributeList`: `List` - Supported attribute IDs. * `changeIndication`: `Max2FilterMonitoringTrait.ChangeIndication?` - Current requirement to change the Max2 filter. * `clusterRevision`: `UShort` - Supported server cluster specification revision. * `condition`: `UInt?` - Current condition of the Max2 filter as a percentage of use remaining. * `featureMap`: `UInt` - Supported optional cluster features. * `generatedCommandList`: `List` - Supported server-generated commands. * **From `com.google.home.Trait`**: * `metadata`: `Trait.TraitMetadata` --- package: com.google.home.google.ExtendedFanControlTrait.ExtendedStepCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.ExtendedStepCommand.Request --- # ExtendedFanControlTrait.ExtendedStepCommand.Request `class ExtendedFanControlTrait.ExtendedStepCommand.Request` The request payload for the ExtendedStep command. ### Constructors * `Request(fanSpeedRelativeWeight: Long = 0, direction: ExtendedFanControlTrait.StepDirection = StepDirection.Unspecified)` ### Properties * `direction`: `ExtendedFanControlTrait.StepDirection` - The direction in which the speed should change. * `fanSpeedRelativeWeight`: `Long` - The relative amount of the speed change. --- package: com.google.home.google.GoogleTraitRegistry --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleTraitRegistry --- # GoogleTraitRegistry `object GoogleTraitRegistry` Machine-generated trait registry. ### Properties * `traits`: `` --- package: com.google.home.google.ExtendedPowerSourceTrait.Capacity --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.Capacity --- # ExtendedPowerSourceTrait.Capacity `class ExtendedPowerSourceTrait.Capacity : ClusterStruct` ### Constructors * `Capacity(rawValue: Int = 0, unit: ExtendedPowerSourceTrait.CapacityUnit = CapacityUnit.Unspecified)` ### Functions * `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties * `rawValue`: `Int` * `unit`: `ExtendedPowerSourceTrait.CapacityUnit` --- package: com.google.home.google.NetworkControlTrait.EnableDisableGuestNetworkCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.EnableDisableGuestNetworkCommand --- # NetworkControlTrait.EnableDisableGuestNetworkCommand `object NetworkControlTrait.EnableDisableGuestNetworkCommand : CommandDescriptor` Enables or disables the guest network. Requires secondary user verification (PIN) due to potential security impact. Use this command from the `trait(NetworkControl)` method. ### Nested Types * `class Request`: The request payload for the EnableDisableGuestNetwork command. ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.DispenseTrait.DispenseItem --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.DispenseItem --- # DispenseTrait.DispenseItem `class DispenseTrait.DispenseItem : ClusterStruct` The state of a given dispensible item. ### Constructors * `DispenseItem(itemName: String = "", amountRemaining: DispenseTrait.Amount = Amount(), amountLastDispensed: DispenseTrait.Amount = Amount(), isCurrentlyDispensing: Boolean = false)` ### Functions * `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties * `amountLastDispensed`: `DispenseTrait.Amount` - Amount most recently dispensed. * `amountRemaining`: `DispenseTrait.Amount` - Amount remaining in the device. * `isCurrentlyDispensing`: `Boolean` - Indicates if the device is currently dispensing this item. * `itemName`: `String` - Name of the item. --- package: com.google.home.google.GoogleBathtubDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBathtubDevice.GoogleTraits --- # GoogleBathtubDevice.GoogleTraits `class GoogleBathtubDevice.GoogleTraits` Trait Container for Google Traits. ### Constructors * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `extendedOperationalState`: `ExtendedOperationalState?` - Trait for devices with operational states and durations in specific zones. * `extendedTemperatureControl`: `ExtendedTemperatureControl?` - Trait for non-thermostat devices that control temperature. * `fill`: `Fill?` - Trait for devices that support being filled, like a bathtub. --- package: com.google.home.google.FilterMonitoringTrait.FilterChangeIndicationCleanliness --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait.FilterChangeIndicationCleanliness --- # FilterMonitoringTrait.FilterChangeIndicationCleanliness `interface FilterMonitoringTrait.FilterChangeIndicationCleanliness` Proactive notification of the current filter-cleanliness state. ### Properties * `changeIndication`: `FilterMonitoringTrait.ChangeIndication?` - The current requirement to change the filter, based on its cleanliness. * `priority`: `Int?` - The notification level. A value of `0` indicates the notification should be spoken. --- package: com.google.home.google.ExtendedOperationalState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalState --- # ExtendedOperationalState `interface ExtendedOperationalState : ExtendedOperationalStateTrait.Attributes, MatterTrait, ExtendedOperationalStateCommands` API for the ExtendedOperationalState trait. This trait represents any device that supports operating in specific zones, and has an ongoing duration for its operation which can be queried. ### Nested types - `enum Attribute`: Descriptor enum for this trait's attributes. - `enum Command`: Descriptor enum for this trait's commands. ### Properties - `factory: TraitFactory` - `acceptedCommandList: List`: A list of client-generated commands supported by this cluster server instance. - `activeOperationZones: List?`: Operation zones in which the device is currently running. - `attributeList: List`: A list of the attribute IDs supported by the cluster instance. - `clusterRevision: UShort`: The revision of the server cluster specification. - `currentPhaseCountdownTimeSeconds: UInt?`: Time remaining on current cycle, in seconds. - `featureMap: UInt`: Whether the server supports zero or more optional cluster features. - `generatedCommandList: List`: A list of server-generated commands supported by this cluster server instance. - `maxOperationDurationSeconds: UInt?`: Maximum operation duration the device supports. - `minOperationDurationSeconds: UInt?`: Minimum operation duration the device supports. - `operationCompletionTimestamp: Long?`: Expected operation completion time if started with `startWithDuration` (Unix epoch timestamp in seconds). - `operationZones: List?`: Supported zone names. - `metadata: Trait.TraitMetadata` ### Functions - `supports(attribute: ExtendedOperationalState.Attribute): Boolean` - `supports(command: ExtendedOperationalState.Command): Boolean` - `suspend startWithDuration(operationZones: List, durationSeconds: UInt)`: Start the device in one or more operation zones for the specified duration. - `startWithDurationBatchable(operationZones: List, durationSeconds: UInt): BatchableCommand`: The batchable version of `startWithDuration`. - `suspend startWithOperationZones(operationZones: List)`: Start the device in one or more operation zones. - `startWithOperationZonesBatchable(operationZones: List): BatchableCommand`: The batchable version of `startWithOperationZones`. - `suspend forceRead()` --- package: com.google.home.google.GoogleBoilerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBoilerDevice.StandardTraits --- # GoogleBoilerDevice.StandardTraits `class GoogleBoilerDevice.StandardTraits` Trait Container for Standard Traits. ### Constructor - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `onOff: OnOff?`: Provides an interface for turning devices on and off. - `temperatureControl: TemperatureControl?`: Provides an interface to the setpoint temperature on devices. - `temperatureMeasurement: TemperatureMeasurement?`: Provides an interface to temperature measurement capability. --- package: com.google.home.google.ArmDisarmTrait.Levels --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.Levels --- # ArmDisarmTrait.Levels `class ArmDisarmTrait.Levels : ClusterStruct` Information about security-level names. ### Constructor - `Levels(level: String, levelValues: List, levelCategory: ArmDisarmTrait.LevelCategory, exitAllowanceSeconds: UInt)` ### Properties - `exitAllowanceSeconds: UInt`: Number of seconds before the `currentArmLevel` takes effect. - `level: String`: The internal name of the security level used in commands and states. - `levelCategory: ArmDisarmTrait.LevelCategory`: The security-level category. - `levelValues: List`: Repeated sets of synonyms for a specific language. ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.ExtendedModeSelectTrait.Setting --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait.Setting --- # ExtendedModeSelectTrait.Setting `class ExtendedModeSelectTrait.Setting : ClusterStruct` ### Constructor - `Setting(name: String = "", synonyms: List = emptyList())` ### Properties - `name: String` - `synonyms: List` ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.GoogleDoorbellDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDoorbellDevice --- # GoogleDoorbellDevice `class GoogleDoorbellDevice : DeviceType` A device actuated by a button outside a door that makes an audible and/or visual signal, used to request the attention of a person who is somewhere on the other side of the door. This device may be capable of sending notifications and/or streaming video. ### Nested types - `class GoogleTraits`: Trait Container for Google Traits. ### Constructor - `GoogleDoorbellDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleDoorbellDevice.GoogleTraits)` ### Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleDoorbellDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `traitProvider: TraitProvider` (Inherited) ### Inherited Functions - From `HasEvents`: - `events(): Flow`: Gets a flow of all Events. - `events(event: EventFactory): Flow`: Gets a flow of a specific Event. - `events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. - From `TraitProvider`: - `metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait metadata. - `trait(traitFactory: TraitFactory): T?`: Access a specific trait. - `traits(): Set`: Returns a set of present traits. --- package: com.google.home.google.BrightnessTrait.MoveToBrightnessCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/BrightnessTrait.MoveToBrightnessCommand --- # BrightnessTrait.MoveToBrightnessCommand `object BrightnessTrait.MoveToBrightnessCommand : CommandDescriptor` Move the brightness of the device to the specified brightness. See also: `moveToBrightness` ### Nested types - `class Request`: The request payload for the MoveToBrightness command. ### Properties - `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.GoogleWaterPurifierDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWaterPurifierDevice --- # GoogleWaterPurifierDevice `class GoogleWaterPurifierDevice : DeviceType` A device that filters and purifies water. ### Nested types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Constructor - `GoogleWaterPurifierDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleWaterPurifierDevice.GoogleTraits, standardTraits: GoogleWaterPurifierDevice.StandardTraits)` ### Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleWaterPurifierDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleWaterPurifierDevice.StandardTraits` - `traitProvider: TraitProvider` (Inherited) ### Inherited Functions - From `HasEvents`: - `events(): Flow`: Gets a flow of all Events. - `events(event: EventFactory): Flow`: Gets a flow of a specific Event. - `events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. - From `TraitProvider`: - `metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait metadata. - `trait(traitFactory: TraitFactory): T?`: Access a specific trait. - `traits(): Set`: Returns a set of present traits. --- package: com.google.home.google.ExtendedOperationalStateTrait.StartWithDurationCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.StartWithDurationCommand.Request --- # ExtendedOperationalStateTrait.StartWithDurationCommand.Request `class ExtendedOperationalStateTrait.StartWithDurationCommand.Request` The request payload for the StartWithDuration command. ### Constructor - `Request(operationZones: List = emptyList(), durationSeconds: UInt)` ### Properties - `durationSeconds: UInt`: How long the action should run, in seconds. Must be between min and max duration supported by the device. - `operationZones: List`: One or more zones in which to start running. --- package: com.google.home.google.ExtendedFanControlTrait.Speed --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.Speed --- # ExtendedFanControlTrait.Speed `class ExtendedFanControlTrait.Speed : ClusterStruct` A named speed setting. ### Constructor - `Speed(speedName: String = "", speedValues: List = emptyList())` ### Properties - `speedName: String`: The name of the speed setting. - `speedValues: List`: Synonyms for the speed setting in each supported language. ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.LightEffectsTrait.SpectrumHsv --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.SpectrumHsv --- # LightEffectsTrait.SpectrumHsv `class LightEffectsTrait.SpectrumHsv : ClusterStruct` Represents a color using the HSV model. ### Constructor - `SpectrumHsv(saturation: Double = 0.0, hue: Double = 0.0, value: Double = 0.0)` ### Properties - `hue: Double`: The specific tone of color, measured in a circle from 0 to 360 degrees. - `saturation: Double`: The amount of black, measured from 0 to 100 percent. - `value: Double`: The brightness of a color, measured from 0 to 100 percent, with 0 considered to be black. ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.DoorbellPress.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DoorbellPress.Attribute --- # DoorbellPress.Attribute `enum DoorbellPress.Attribute : Enum, Field` Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList` - `attributeList` - `clusterRevision` - `featureMap` - `generatedCommandList` ### Companion Properties - `StructDescriptor: StructDescriptor` ### Properties - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` ### Functions - `valueOf(value: String): DoorbellPress.Attribute` - `values(): Array` --- package: com.google.home.google.ExtendedModeSelectTrait.ModeSetting --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait.ModeSetting --- # ExtendedModeSelectTrait.ModeSetting `class ExtendedModeSelectTrait.ModeSetting : ClusterStruct` ### Constructor - `ModeSetting(modeNameKey: String = "", modeValueKey: String = "")` ### Properties - `modeNameKey: String` - `modeValueKey: String` ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.GoogleSoundbarDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSoundbarDevice --- # GoogleSoundbarDevice `class GoogleSoundbarDevice : DeviceType` An all-in-one audio device that is often used in conjunction with a TV and has a bar form factor. ### Nested types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Constructor - `GoogleSoundbarDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleSoundbarDevice.GoogleTraits, standardTraits: GoogleSoundbarDevice.StandardTraits)` ### Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleSoundbarDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleSoundbarDevice.StandardTraits` - `traitProvider: TraitProvider` (Inherited) ### Inherited Functions - From `HasEvents`: - `events(): Flow`: Gets a flow of all Events. - `events(event: EventFactory): Flow`: Gets a flow of a specific Event. - `events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. - From `TraitProvider`: - `metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait metadata. - `trait(traitFactory: TraitFactory): T?`: Access a specific trait. - `traits(): Set`: Returns a set of present traits. --- package: com.google.home.google.NotificationTrait.SendNotificationsCommand.OptionalArgs --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait.SendNotificationsCommand.OptionalArgs --- # NotificationTrait.SendNotificationsCommand.OptionalArgs `interface NotificationTrait.SendNotificationsCommand.OptionalArgs` Optional arguments for the SendNotificationsCommand.Request. ### Properties - `body: String`: The body of the Google Home app notification. - `optInMemberEmails: List`: Not available for use by developers. If included, the command will fail. --- package: com.google.home.google.OpenCloseTrait.OpenCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.OpenCommand.Request --- # OpenCloseTrait.OpenCommand.Request `class OpenCloseTrait.OpenCommand.Request` The request payload for the Open command. ### Constructor - `Request(openDirection: OpenCloseTrait.Direction = Direction.Unspecified)` ### Properties - `openDirection: OpenCloseTrait.Direction`: The direction in which to open. Only present if the device supports multiple directions. --- package: com.google.home.google.SimplifiedOnOffTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedOnOffTrait --- # SimplifiedOnOffTrait `object SimplifiedOnOffTrait` Attributes for SimplifiedOnOffTrait. ### Nested types - `interface Attributes`: Attributes for the SimplifiedOnOff cluster. - `enum OnOffEnum : Enum, ClusterEnum`: The on or off state of the device. ### Properties - `Id: ClusterId` --- package: com.google.home.google.ArmDisarmTrait.ArmState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.ArmState --- # ArmDisarmTrait.ArmState `enum ArmDisarmTrait.ArmState : Enum, ClusterEnum` The current arm state of the device. ### Enum Values - `Alarm`: The device is in the alarm state. - `Armed`: The device is in the armed state. - `Disarmed`: This device is in the disarmed state. - `ExitCountdown`: Number of seconds before the device enters the specified arm level. - `PreAlarm`: The device is in the pre-alarm state. - `UnknownValue`: The enum value is out of range. - `Unspecified`: The arm state is unspecified. ### Properties - `traitId: String`: Trait identifier of the Matter Cluster that defines the enum. - `typeName: String`: Name of the Matter Data Type that the enum belongs to. - `value: ULong`: Integer identifier of the enum value per the Matter spec. ### Functions - `valueOf(value: String): ArmDisarmTrait.ArmState` - `values(): Array` --- package: com.google.home.google.TogglesTrait.ToggleSetting --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TogglesTrait.ToggleSetting --- # TogglesTrait.ToggleSetting `class TogglesTrait.ToggleSetting : ClusterStruct` Indicates if a specific toggle is enabled or not. ### Constructor - `ToggleSetting(toggleName: String = "", enabled: Boolean = false)` ### Properties - `enabled: Boolean`: Indicates if the toggle is enabled or not. - `toggleName: String`: The internal name of the toggle. ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.BrightnessTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/BrightnessTrait --- # BrightnessTrait `object BrightnessTrait` Attributes for BrightnessTrait. ### Nested types - `interface Attributes`: Attributes for the Brightness cluster. - `object BrightnessStepCommand : CommandDescriptor`: Incremental step brightness. - `class BrightnessStepCommand.Request`: The request payload for the BrightnessStep command. - `enum BrightnessStepModeEnum : Enum, ClusterEnum`: Step values that indicate whether to increase or decrease the brightness. - `object MoveToBrightnessCommand : CommandDescriptor`: Move the brightness of the device to the specified brightness. - `class MoveToBrightnessCommand.Request`: The request payload for the MoveToBrightness command. ### Properties - `Id: ClusterId` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.ApplicationNames --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.ApplicationNames --- # ExtendedApplicationLauncherTrait.ApplicationNames `class ExtendedApplicationLauncherTrait.ApplicationNames : ClusterStruct` Application names and language-specific synonyms. ### Constructor - `ApplicationNames(language: String = "", nameSynonym: List = emptyList())` ### Properties - `language: String`: The language code, for example, `en` for English. - `nameSynonym: List`: User-friendly synonyms for the application name for a given language. The first synonym is used in the response. ### Functions - `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. --- package: com.google.home.google.GoogleSousVideDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSousVideDevice.StandardTraits --- # GoogleSousVideDevice.StandardTraits `class GoogleSousVideDevice.StandardTraits` Trait Container for Standard Traits. ### Constructor - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `onOff: OnOff?`: Provides an interface for turning devices on and off. - `operationalState: OperationalState?`: Supports remote monitoring and allows the operational state of any device to be changed. --- package: com.google.home.google.ExtendedThermostatTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.Attributes --- # ExtendedThermostatTrait.Attributes `interface ExtendedThermostatTrait.Attributes` Attributes for the ExtendedThermostat cluster. ### Properties - `acceptedCommandList: List`: List of supported client-generated commands. - `activePresetHandle: String?` (Write): The current preset handle that is running. - `activeRemoteTemperatureSensorIds: List?` (Write): External device IDs of remote, active temperature sensors. - `attributeList: List`: List of supported attribute IDs. - `averageLocalTemperature: Short?` (Read): Average ambient temperature across all active sensors, in Celsius (0.01°C resolution). - `clusterRevision: UShort`: The revision of the server cluster specification. - `extendedProgrammingOperationMode: UInt?` (Read): Additional information about the operational status. - `extendedRunningMode: ExtendedThermostatTrait.ExtendedRunningMode?` (Read): Currently running mode of the device. - `extendedSetpointChangeSource: ExtendedThermostatTrait.ExtendedSetpointChangeSource?` (Read): The source of the current temperature hold. - `extendedSupportedModes: List?` (Read): The extended thermostat modes this device supports. - `extendedSystemMode: ExtendedThermostatTrait.ExtendedThermostatMode?` (Write): The current mode of the device. - `featureMap: ExtendedThermostatTrait.ExtendedThermostatFeature`: Whether the server supports optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. - `maxCoolSafetySetpointLimit: Short?` (Read): Maximum threshold of the supported temperature range for cooling. - `maxHeatSafetySetpointLimit: Short?` (Read): Maximum threshold of the supported temperature range for heating. - `maxSetpointHoldSeconds: Int?` (Read): Maximum seconds a temperature setpoint can be held. `-1` for no limit. - `maxSettableThermostatTemperatureSensors: UInt?` (Read): Number of temperature sensors that can be simultaneously active. - `minCoolSafetySetpointLimit: Short?` (Read): Minimum threshold of the supported temperature range for cooling. - `minHeatSafetySetpointLimit: Short?` (Read): Minimum threshold of the supported temperature range for heating. - `presets: List?` (Read): Information about the presets the device supports. - `remoteTemperatureSensorIds: List?` (Read): External device IDs of remote temperature sensors this device can detect. - `targetTemperatureTimestampSeconds: Long?` (Read): Estimated timestamp when the target temperature will be reached. - `temperatureSetpointHoldExpiryTimestampSeconds: Long?` (Read): Unix Epoch timestamp of when an active temperature hold expires. `-1` for no expiration. --- package: com.google.home.google.ExtendedColorControlTrait.MoveToColorRgbCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.MoveToColorRgbCommand.Request --- # ExtendedColorControlTrait.MoveToColorRgbCommand.Request `class ExtendedColorControlTrait.MoveToColorRgbCommand.Request` The request payload for the MoveToColorRGB command. ### Constructor - `Request(red: UByte, green: UByte, blue: UByte)` ### Properties - `blue: UByte`: Moves a device to the provided color of blue (range 0-155). - `green: UByte`: Moves a device to the provided color of green (range 0-155). - `red: UByte`: Moves a device to the provided color of red (range 0-155). --- package: com.google.home.google.AreaAttendanceStateTrait.AttendanceState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceStateTrait.AttendanceState --- # AreaAttendanceStateTrait.AttendanceState `enum AreaAttendanceStateTrait.AttendanceState : Enum, PlatformEnum` ### Enum Values - `AttendanceStateAllHouseholdMembers` - `AttendanceStateNoHouseholdMembers` - `AttendanceStateSomeHouseholdMembers` - `AttendanceStateUnknown` - `AttendanceStateUnspecified` - `UnknownValue`: Emitted for out-of-range fields. ### Companion Properties - `Adapter: PlatformEnumAdapter` ### Properties - `id: ULong` - `traitId: String` - `typeName: String` - `value: String` ### Functions - `valueOf(value: String): AreaAttendanceStateTrait.AttendanceState` - `values(): Array` --- package: com.google.home.google.AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse --- # AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse `class AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse` The response payload for the OkGoogleCommand command. ### Constructor - `OkGoogleCommandResponse()` --- package: com.google.home.google.ExtendedDoorLockTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.Attributes --- # ExtendedDoorLockTrait.Attributes `interface ExtendedDoorLockTrait.Attributes` Attributes for the ExtendedDoorLock cluster. ### Properties - `acceptedCommandList: List`: List of supported client-generated commands. - `attributeList: List`: List of supported attribute IDs. - `clusterRevision: UShort`: The revision of the server cluster specification. - `enableLockHomeAwayAssist: Boolean?` (Write): Whether the device is enabled for home-away assist lock setting. - `featureMap: UInt`: Whether the server supports optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. - `ignoreAutoRelockOnStructureMode: List?` (Write): Structure modes for which the device should ignore auto relock settings. --- package: com.google.home.google.ExtendedMediaInput.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInput.Attribute --- # ExtendedMediaInput.Attribute `enum ExtendedMediaInput.Attribute : Enum, Field` Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList` - `attributeList` - `clusterRevision` - `currentCustomInput` - `customInputsList` - `customInputsOrdered` - `featureMap` - `generatedCommandList` ### Companion Properties - `StructDescriptor: StructDescriptor` ### Properties - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` ### Functions - `valueOf(value: String): ExtendedMediaInput.Attribute` - `values(): Array` --- package: com.google.home.google.RotationTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.Attributes --- # RotationTrait.Attributes `interface RotationTrait.Attributes` Attributes for the Rotation cluster. ### Properties - `acceptedCommandList: List`: List of supported client-generated commands. - `attributeList: List`: List of supported attribute IDs. - `clusterRevision: UShort`: The revision of the server cluster specification. - `featureMap: RotationTrait.RotationFeature`: Whether the server supports optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. - `rotationDegrees: Float?` (Read): The number of degrees the device is currently rotated clockwise. - `rotationDegreesRange: RotationTrait.RotationDegreesRange?` (Read): The number of degrees a device is permitted to rotate. - `rotationPercent: Float?` (Read): The percentage the device is currently rotated clockwise (0.0 to 100.0). - `targetRotationPercent: Float?` (Read): The intended percentage of clockwise rotation as the result of an ongoing change. --- package: com.google.home.google.AssistantBroadcastTrait.BroadcastCommand.BroadcastRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantBroadcastTrait.BroadcastCommand.BroadcastRequest --- # AssistantBroadcastTrait.BroadcastCommand.BroadcastRequest `class AssistantBroadcastTrait.BroadcastCommand.BroadcastRequest` ### Constructor - `BroadcastRequest(msg: String)` ### Properties - `msg: String` --- package: com.google.home.google.SyntheticSwitch.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitch.Attribute --- # SyntheticSwitch.Attribute `enum SyntheticSwitch.Attribute : Enum, Field` Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList` - `attributeList` - `clusterRevision` - `featureMap` - `generatedCommandList` ### Companion Properties - `StructDescriptor: StructDescriptor` ### Properties - `descriptor: Descriptor` - `fieldName: String` - `isNullable: Boolean` - `tag: UInt` - `typeEnum: Type` - `typeName: String` ### Functions - `valueOf(value: String): SyntheticSwitch.Attribute` - `values(): Array` --- package: com.google.home.google.FillTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait --- # `object FillTrait` Attributes for FillTrait. ### Nested types * `interface Attributes`: Attributes for the Fill cluster. * `class AvailableFillLevels : ClusterStruct`: The available fill levels. * `object FillCommand : CommandDescriptor`: Fill or drain the device. * `class FillCommand.Request`: The request payload for the Fill command. * `data class FillFeature`: Contains specific capabilities related to fill. * `class Level : ClusterStruct`: Level name and its language-specific synonyms. * `class LevelSynonym : ClusterStruct`: Synonyms of the level in a given language. ### Public properties * `val Id: ClusterId` --- package: com.google.home.google.GoogleTVDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleTVDevice.StandardTraits --- # `class GoogleTVDevice.StandardTraits` Trait Container for Standard Traits. ### Public constructor * `StandardTraits(traitProvider: TraitProvider)` ### Public properties * `val channel: Channel?`: Provides an interface for selecting channels on a device or endpoint. * `val levelControl: LevelControl?`: Provides an interface for controlling a characteristic of a device that can be set to a level. * `val mediaPlayback: MediaPlayback?`: Provides an interface for controlling media playback (play, pause, etc.) on a media device. * `val onOff: OnOff?`: Provides an interface for turning devices on and off. --- package: com.google.home.google.GoogleBlenderDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBlenderDevice --- # `class GoogleBlenderDevice : DeviceType` A kitchen appliance used to stir, chop, or mix food. Interactions may include starting/stopping, setting timers, modes, or other settings. ### Nested types * `class GoogleTraits`: Trait Container for Google Traits. * `class StandardTraits`: Trait Container for Standard Traits. ### Public constructor * `GoogleBlenderDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleBlenderDevice.GoogleTraits, standardTraits: GoogleBlenderDevice.StandardTraits)` ### Public properties * `open val factory: DeviceTypeFactory` * `val googleTraits: GoogleBlenderDevice.GoogleTraits` * `open val metadata: DeviceType.Metadata` * `val standardTraits: GoogleBlenderDevice.StandardTraits` ### Inherited functions * From `com.google.home.HasEvents`: * `open fun events(): Flow`: Gets a flow of all Events. * `open fun events(event: EventFactory): Flow`: Gets a flow of a specific Event. * `open fun events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * From `com.google.home.TraitProvider`: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait's metadata. * `open fun trait(traitFactory: TraitFactory): T?`: Access a specific trait. * `open fun traits(): Set`: Returns a set of available traits. ### Inherited properties * From `com.google.home.DeviceType`: `val traitProvider: TraitProvider` --- package: com.google.home.google.GoogleWindowDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWindowDevice --- # `class GoogleWindowDevice : DeviceType` A transparent device that allows light into a structure. Windows can be opened, closed, and optionally locked. ### Nested types * `class GoogleTraits`: Trait Container for Google Traits. ### Public constructor * `GoogleWindowDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleWindowDevice.GoogleTraits)` ### Public properties * `open val factory: DeviceTypeFactory` * `val googleTraits: GoogleWindowDevice.GoogleTraits` * `open val metadata: DeviceType.Metadata` ### Inherited functions * From `com.google.home.HasEvents`: * `open fun events(): Flow`: Gets a flow of all Events. * `open fun events(event: EventFactory): Flow`: Gets a flow of a specific Event. * `open fun events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * From `com.google.home.TraitProvider`: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait's metadata. * `open fun trait(traitFactory: TraitFactory): T?`: Access a specific trait. * `open fun traits(): Set`: Returns a set of available traits. ### Inherited properties * From `com.google.home.DeviceType`: `val traitProvider: TraitProvider` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.SearchAppCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.SearchAppCommand --- # `object ExtendedApplicationLauncherTrait.SearchAppCommand : CommandDescriptor` Search for the given application. ### Nested types * `class Request`: The request payload for the SearchApp command. ### Public properties * `open val commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.GoogleGarageDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGarageDevice --- # `class GoogleGarageDevice : DeviceType` A movable barrier that controls access to a garage. It can open, close, and detect open states, obstructions, or lock status. ### Nested types * `class GoogleTraits`: Trait Container for Google Traits. ### Public constructor * `GoogleGarageDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleGarageDevice.GoogleTraits)` ### Public properties * `open val factory: DeviceTypeFactory` * `val googleTraits: GoogleGarageDevice.GoogleTraits` * `open val metadata: DeviceType.Metadata` ### Inherited functions * From `com.google.home.HasEvents`: * `open fun events(): Flow`: Gets a flow of all Events. * `open fun events(event: EventFactory): Flow`: Gets a flow of a specific Event. * `open fun events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * From `com.google.home.TraitProvider`: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait's metadata. * `open fun trait(traitFactory: TraitFactory): T?`: Access a specific trait. * `open fun traits(): Set`: Returns a set of available traits. ### Inherited properties * From `com.google.home.DeviceType`: `val traitProvider: TraitProvider` --- package: com.google.home.google.ExtendedDoorLockTrait.StructureMode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.StructureMode --- # `enum ExtendedDoorLockTrait.StructureMode` The structure mode. ### Enum Values * `StructureModeAway`: Users are away. * `StructureModeHome`: Users are home. * `StructureModeSleep`: Users are sleeping. * `StructureModeUnspecified`: Unspecified. * `StructureModeVacation`: Users are on vacation. * `UnknownValue`: The enum value is out of range. ### Public functions * `fun valueOf(value: String): ExtendedDoorLockTrait.StructureMode`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `open val traitId: String`: Trait identifier of the Matter Cluster. * `open val typeName: String`: Name of the Matter Data Type. * `open val value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ExtendedOperationalStateTrait.OperationalStateFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalStateTrait.OperationalStateFeature --- # `data class ExtendedOperationalStateTrait.OperationalStateFeature` ExtendedOperationalState cluster FeatureMap. ### Public constructor * `OperationalStateFeature(supportsZones: Boolean = false, supportsDuration: Boolean = false)` ### Public functions * `open fun toRaw(): ULong`: Convert this ClusterBitmap to raw (bytes) format. ### Public properties * `val bitmapName: String`: Name of the Matter bitmap (e.g., "OnOffControlBitmap"). * `val supportsDuration: Boolean`: Supports operating for a user-specified duration. * `val supportsZones: Boolean`: Supports limiting operation to user-specified zones. * `val traitId: String`: Trait identifier of the Matter Cluster. --- package: com.google.home.google.NetworkControlCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlCommands --- # `interface NetworkControlCommands` ### Public functions * `suspend fun enableDisableGuestNetwork(enable: Boolean)`: Enables or disables the guest network. * `fun enableDisableGuestNetworkBatchable(enable: Boolean): BatchableCommand`: Batchable version of `enableDisableGuestNetwork`. * `suspend fun enableDisableNetworkProfile(enable: Boolean, networkProfileName: String)`: Enables or disables a network profile. * `fun enableDisableNetworkProfileBatchable(enable: Boolean, networkProfileName: String): BatchableCommand`: Batchable version of `enableDisableNetworkProfile`. * `suspend fun getGuestNetworkPassword(): NetworkControlTrait.GetGuestNetworkPasswordCommand.Response`: Gets the guest network password. * `fun getGuestNetworkPasswordBatchable(): BatchableCommand`: Batchable version of `getGuestNetworkPassword`. * `suspend fun testNetworkSpeed(testUploadSpeed: Boolean, testDownloadSpeed: Boolean)`: Tests the network's download and upload speed. * `fun testNetworkSpeedBatchable(testUploadSpeed: Boolean, testDownloadSpeed: Boolean): BatchableCommand`: Batchable version of `testNetworkSpeed`. --- package: com.google.home.google.SyntheticSwitchTrait.LongPressRelease --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitchTrait.LongPressRelease --- # `interface SyntheticSwitchTrait.LongPressRelease` Indicates that the switch button was released after a long press. --- package: com.google.home.google.LockUnlock --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlock --- # `interface LockUnlock` API for the LockUnlock trait, for devices that support locking and unlocking (excluding door locks). ### Nested types * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. ### Public functions * `fun supports(attribute: LockUnlock.Attribute): Boolean` * `fun supports(command: LockUnlock.Command): Boolean` ### Public properties * `open val factory: TraitFactory` ### Inherited functions * From `com.google.home.google.LockUnlockCommands`: * `suspend fun lock(followUpToken: String)`: Lock the device. * `fun lockBatchable(followUpToken: String): BatchableCommand`: Batchable version of `lock`. * `suspend fun unlock(followUpToken: String)`: Unlock the device. * `fun unlockBatchable(followUpToken: String): BatchableCommand`: Batchable version of `unlock`. * From `com.google.home.TraitStateInvalidation`: `suspend fun forceRead()` ### Inherited properties * From `com.google.home.google.LockUnlockTrait.Attributes`: * `val acceptedCommandList: List`: Supported client-generated commands. * `val attributeList: List`: Supported attribute IDs. * `val clusterRevision: UShort`: Supported cluster specification revision. * `val featureMap: UInt`: Optional cluster features supported. * `val generatedCommandList: List`: Supported server-generated commands. * `val lockState: LockUnlockTrait.LockState?`: The current lock state of the device. * From `com.google.home.Trait`: `val metadata: Trait.TraitMetadata` --- package: com.google.home.google.GoogleDehydratorDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDehydratorDevice.GoogleTraits --- # `class GoogleDehydratorDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `val cook: Cook?`: For devices that cook food via presets and modes. * `val extendedOperationalState: ExtendedOperationalState?`: For devices supporting zoned operation and queryable duration. * `val timer: Timer?`: For controlling a built-in timer on a device. --- package: com.google.home.google.ArmDisarmTrait.ArmDisarmFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.ArmDisarmFollowUp --- # `interface ArmDisarmTrait.ArmDisarmFollowUp` Follow up response to the `armDisarm` command. ### Public properties * `val armState: ArmDisarmTrait.ArmState?`: Indicates the arm state: `Armed` or `Disarmed`. * `val errorCode: String?`: The error encountered during the `armDisarm` command. * `val status: ArmDisarmTrait.StatusEnum?`: The result status of the command. --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand.Request --- # `class ExtendedMediaPlaybackTrait.ClosedCaptioningOffCommand.Request` ### Public constructor * `Request()` --- package: com.google.home.google.DispenseTrait.DispenseCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.DispenseCommand.Request --- # `class DispenseTrait.DispenseCommand.Request` The request payload for the Dispense command. ### Public constructor * `Request(item: String = "", amount: Float = 0.0f, unit: DispenseTrait.Unit = Unit.Unspecified, presetName: String = "")` ### Public properties * `val amount: Float`: Amount to dispense. * `val item: String`: Name of the item to dispense. * `val presetName: String`: Name of the preset to dispense. * `val unit: DispenseTrait.Unit`: Unit for the amount. --- package: com.google.home.google.ArmDisarmTrait.ErrorCode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait.ErrorCode --- # `enum ArmDisarmTrait.ErrorCode` The error encountered when processing the `ArmDisarm` command. ### Enum Values * `DeviceMoved`: The device has been moved. * `DeviceTampered`: The device has been tampered with. * `DeviceUnplugged`: The device is unplugged. * `DoorOpen`: An open door is detected. * `IsOpen`: Something is open (door or window). * `MotionDetected`: Motion has been detected. * `UnknownValue`: The enum value is out of range. * `Unspecified`: An unspecified error occurred. * `WindowOpen`: An open window is detected. ### Public functions * `fun valueOf(value: String): ArmDisarmTrait.ErrorCode`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `open val traitId: String`: Trait identifier of the Matter Cluster. * `open val typeName: String`: Name of the Matter Data Type. * `open val value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.ElevatorControl.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControl.Command --- # `enum ElevatorControl.Command` Descriptor enum for this trait's commands. ### Enum Values * `CallElevator`: The `callElevator` trait command. ### Public functions * `fun valueOf(value: String): ElevatorControl.Command`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `val tag: UInt` --- package: com.google.home.google.ArmDisarmTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarmTrait --- # `object ArmDisarmTrait` Attributes for ArmDisarmTrait. ### Nested types * `interface ArmDisarmArmState`: Proactive notification for a specific arm state. * `object ArmDisarmCommand : CommandDescriptor`: Sets the alarm level of the device. * `interface ArmDisarmCommand.OptionalArgs`: Optional arguments for the ArmDisarmCommand Request. * `class ArmDisarmCommand.Request`: Request payload for the ArmDisarm command. * `interface ArmDisarmFollowUp`: Follow-up response to the `armDisarm` command. * `enum ArmState`: The current arm state of the device. * `interface Attributes`: Attributes for the ArmDisarm cluster. * `class AvailableArmLevels : ClusterStruct`: The supported security levels. * `enum ErrorCode`: Error encountered when processing the `ArmDisarm` command. * `enum LevelCategory`: The security-level category. * `class LevelValues : ClusterStruct`: User-friendly names for levels. * `class Levels : ClusterStruct`: Information about security-level names. * `enum StatusEnum`: Result status of the `ArmDisarm` command. ### Public properties * `val Id: ClusterId` --- package: com.google.home.google.RelativeHumidityControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControl.Attribute --- # `enum RelativeHumidityControl.Attribute : Field` Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `maxRelativeHumidity` * `minRelativeHumidity` * `relativeHumiditySetpoint` ### Public companion properties * `val StructDescriptor: StructDescriptor` ### Public functions * `fun valueOf(value: String): RelativeHumidityControl.Attribute`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `open val descriptor: Descriptor` * `open val fieldName: String` * `val isNullable: Boolean` * `open val tag: UInt` * `open val typeEnum: Type` * `open val typeName: String` --- package: com.google.home.google.ExtendedMediaPlaybackTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait --- # `object ExtendedMediaPlaybackTrait` Attributes for ExtendedMediaPlaybackTrait. ### Nested types * `interface Attributes`: Attributes for the ExtendedMediaPlayback cluster. * `object ClosedCaptioningOffCommand : CommandDescriptor` * `class ClosedCaptioningOffCommand.Request` * `object ClosedCaptioningOnCommand : CommandDescriptor` * `class ClosedCaptioningOnCommand.Request` * `enum ExtendedPlaybackState : Enum, ClusterEnum` * `object SetRepeatCommand : CommandDescriptor` * `class SetRepeatCommand.Request` * `object ShuffleCommand : CommandDescriptor` * `class ShuffleCommand.Request` ### Public properties * `val Id: ClusterId` --- package: com.google.home.google.GooglePergolaDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice.GoogleTraits --- # `class GooglePergolaDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `val openClose: OpenClose?`: For devices that support opening and closing, potentially partially or in multiple directions. * `val rotation: Rotation?`: For devices that support rotation, specified in percentage or degrees. --- package: com.google.home.google.GoogleMopDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMopDevice --- # `class GoogleMopDevice : DeviceType` A device used to clean floors by dampening and scrubbing them. ### Nested types * `class GoogleTraits`: Trait Container for Google Traits. * `class StandardTraits`: Trait Container for Standard Traits. ### Public constructor * `GoogleMopDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleMopDevice.GoogleTraits, standardTraits: GoogleMopDevice.StandardTraits)` ### Public properties * `open val factory: DeviceTypeFactory` * `val googleTraits: GoogleMopDevice.GoogleTraits` * `open val metadata: DeviceType.Metadata` * `val standardTraits: GoogleMopDevice.StandardTraits` ### Inherited functions * From `com.google.home.HasEvents`: * `open fun events(): Flow`: Gets a flow of all Events. * `open fun events(event: EventFactory): Flow`: Gets a flow of a specific Event. * `open fun events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * From `com.google.home.TraitProvider`: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait's metadata. * `open fun trait(traitFactory: TraitFactory): T?`: Access a specific trait. * `open fun traits(): Set`: Returns a set of available traits. ### Inherited properties * From `com.google.home.DeviceType`: `val traitProvider: TraitProvider` --- package: com.google.home.google.GoogleClosetDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleClosetDevice --- # `class GoogleClosetDevice : DeviceType` A small enclosed area used for storing items, which can be opened and closed. ### Nested types * `class GoogleTraits`: Trait Container for Google Traits. ### Public constructor * `GoogleClosetDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleClosetDevice.GoogleTraits)` ### Public properties * `open val factory: DeviceTypeFactory` * `val googleTraits: GoogleClosetDevice.GoogleTraits` * `open val metadata: DeviceType.Metadata` ### Inherited functions * From `com.google.home.HasEvents`: * `open fun events(): Flow`: Gets a flow of all Events. * `open fun events(event: EventFactory): Flow`: Gets a flow of a specific Event. * `open fun events(trait: TraitFactory): Flow`: Gets a flow of all Events by this `Trait`. * From `com.google.home.TraitProvider`: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?`: Access a specific trait's metadata. * `open fun trait(traitFactory: TraitFactory): T?`: Access a specific trait. * `open fun traits(): Set`: Returns a set of available traits. ### Inherited properties * From `com.google.home.DeviceType`: `val traitProvider: TraitProvider` --- package: com.google.home.google.GoogleTVDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleTVDevice.GoogleTraits --- # `class GoogleTVDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `val extendedApplicationLauncher: ExtendedApplicationLauncher?`: Supports devices that can switch between applications. * `val extendedChannel: ExtendedChannel?`: Supports devices with TV channels. * `val extendedLevelControl: ExtendedLevelControl?`: For devices with a volume control. * `val extendedMediaInput: ExtendedMediaInput?`: Extension of `MediaInput` for devices that can switch inputs. * `val extendedMediaPlayback: ExtendedMediaPlayback?` * `val mediaActivityState: MediaActivityState?` --- package: com.google.home.google.MotionDetectionTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MotionDetectionTrait.Attributes --- # `interface MotionDetectionTrait.Attributes` Attributes for the MotionDetection cluster. ### Public properties * `val acceptedCommandList: List`: Supported client-generated commands. * `val attributeList: List`: Supported attribute IDs. * `val clusterRevision: UShort`: Supported cluster specification revision. * `val featureMap: MotionDetectionTrait.MotionDetectionFeature`: Optional cluster features supported. * `val generatedCommandList: List`: Supported server-generated commands. * `val lastMotionDetectionEventEndTimestampSeconds: Long?`: Unix timestamp (seconds) when the last motion event ended. * `val lastMotionDetectionEventStartTimestampSeconds: Long?`: Unix timestamp (seconds) when the last motion event started. * `val motionDetectionEventInProgress: Boolean?`: Whether a motion detection event is currently in progress. * `val motionDetectionTimestampSeconds: Long?`: Unix timestamp (seconds) when motion was last detected. --- package: com.google.home.google.FilterMonitoring --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoring --- # `interface FilterMonitoring` API for monitoring the current condition of a filter. ### Nested types * `enum Attribute`: Descriptor for this trait's attributes. ### Public functions * `fun supports(attribute: FilterMonitoring.Attribute): Boolean` ### Public properties * `open val factory: TraitFactory` ### Inherited functions * From `com.google.home.TraitStateInvalidation`: `suspend fun forceRead()` ### Inherited properties * From `com.google.home.google.FilterMonitoringTrait.Attributes`: * `val acceptedCommandList: List`: Supported client-generated commands. * `val attributeList: List`: Supported attribute IDs. * `val changeIndicationCleanliness: FilterMonitoringTrait.ChangeIndication?`: Requirement to change the filter based on cleanliness. * `val changeIndicationLifetime: FilterMonitoringTrait.ChangeIndication?`: Requirement to change the filter based on lifetime. * `val clusterRevision: UShort`: Supported cluster specification revision. * `val condition: UInt?`: Current condition of the filter (percentage used). * `val featureMap: FilterMonitoringTrait.FilterMonitoringFeature`: Optional cluster features supported. * `val generatedCommandList: List`: Supported server-generated commands. * From `com.google.home.Trait`: `val metadata: Trait.TraitMetadata` --- package: com.google.home.google.GoogleGateDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGateDevice.GoogleTraits --- # `class GoogleGateDevice.GoogleTraits` Trait Container for Google Traits. ### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Public properties * `val lockUnlock: LockUnlock?`: For devices that support locking and unlocking (excluding door locks). --- package: com.google.home.google.ExtendedThermostat.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostat.Command --- # `enum ExtendedThermostat.Command` Descriptor enum for this trait's commands. ### Enum Values * `NotifySensorStateChange`: The `notifySensorStateChange` trait command. ### Public functions * `fun valueOf(value: String): ExtendedThermostat.Command`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `val tag: UInt` --- package: com.google.home.google.ParkingLocation.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ParkingLocation.Attribute --- # `enum ParkingLocation.Attribute : Field` Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `currentParkingLocation` * `featureMap` * `generatedCommandList` ### Public companion properties * `val StructDescriptor: StructDescriptor` ### Public functions * `fun valueOf(value: String): ParkingLocation.Attribute`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `open val descriptor: Descriptor` * `open val fieldName: String` * `val isNullable: Boolean` * `open val tag: UInt` * `open val typeEnum: Type` * `open val typeName: String` --- package: com.google.home.google.OpenCloseTrait.StatusEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.StatusEnum --- # `enum OpenCloseTrait.StatusEnum` ### Enum Values * `Failure` * `Success` * `UnknownValue`: The enum value is out of range. * `Unspecified` ### Public functions * `fun valueOf(value: String): OpenCloseTrait.StatusEnum`: Returns the enum constant with the specified name. * `fun values(): Array`: Returns an array of all enum constants. ### Public properties * `open val traitId: String`: Trait identifier of the Matter Cluster. * `open val typeName: String`: Name of the Matter Data Type. * `open val value: ULong`: Integer identifier of the enum value. --- package: com.google.home.google.GoogleControlPanelDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleControlPanelDevice --- # class GoogleControlPanelDevice : DeviceType A device that is capable of configuring and controlling other devices. ### Nested Types * **`GoogleTraits`**: Trait Container for Google Traits. ### Constructor * `GoogleControlPanelDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleControlPanelDevice.GoogleTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleControlPanelDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` ### Inherited From * **`com.google.home.HasEvents`**: * `open fun events(): Flow` * `open fun events(event: EventFactory): Flow` * `open fun events(trait: TraitFactory): Flow` * **`com.google.home.TraitProvider`**: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * `open fun trait(traitFactory: TraitFactory): T?` * `open fun traits(): Set` * **`com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.GoogleDehydratorDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDehydratorDevice.StandardTraits --- # class GoogleDehydratorDevice.StandardTraits Trait Container for Standard Traits. ### Constructor * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `onOff`: `OnOff?` - Provides an interface for turning devices on and off. * `operationalState`: `OperationalState?` - Supports remote monitoring and allows the operational state of any device to be changed provided that a state machine is part of the operation. --- package: com.google.home.google.GooglePergolaDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice --- # class GooglePergolaDevice : DeviceType A device consisting of an arbor formed of horizontal trelliswork supported on columns or posts that can be opened and closed, potentially in more than one direction. ### Nested Types * **`GoogleTraits`**: Trait Container for Google Traits. ### Constructor * `GooglePergolaDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GooglePergolaDevice.GoogleTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GooglePergolaDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` ### Inherited From * **`com.google.home.HasEvents`**: * `open fun events(): Flow` * `open fun events(event: EventFactory): Flow` * `open fun events(trait: TraitFactory): Flow` * **`com.google.home.TraitProvider`**: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * `open fun trait(traitFactory: TraitFactory): T?` * `open fun traits(): Set` * **`com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.MediaActivityStateTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MediaActivityStateTrait --- # object MediaActivityStateTrait Attributes for MediaActivityStateTrait. ### Nested Types * `enum MediaActivityStateTrait.ActivityState : Enum, ClusterEnum` * `interface MediaActivityStateTrait.Attributes`: Attributes for the MediaActivityState cluster. ### Properties * `Id`: `ClusterId` --- package: com.google.home.google.GoogleClosetDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleClosetDevice.GoogleTraits --- # class GoogleClosetDevice.GoogleTraits Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `openClose`: `OpenClose?` - This trait belongs to devices that support opening and closing, and in some cases opening and closing partially or potentially in more than one direction. --- package: com.google.home.google.NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest --- # class NotificationTrait.SendNotificationsCommand.SendNotificationsCommandRequest The request payload for the Notification command. ### Nested Types * `enum CommandFields : Enum, Field` ### Constructor * `SendNotificationsCommandRequest(title: String, body: OptionalValue = OptionalValue.absent(), optInMemberEmails: OptionalValue> = OptionalValue.absent())` ### Properties * `body`: `OptionalValue` - The body of the Google Home app notification. * `optInMemberEmails`: `OptionalValue>` - This is not available for use by developers. If included in the command request, the command will fail and throw an error. * `title`: `String` - The title of the Google Home app notification. --- package: com.google.home.google.Rotation.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Rotation.Command --- # enum Rotation.Command Descriptor enum for this trait's commands. ### Enum Values * **`RotateToDegrees`**: The `rotateToDegrees` trait command. * **`RotateToPercentage`**: The `rotateToPercentage` trait command. ### Properties * `tag`: `UInt` --- package: com.google.home.google.SimplifiedThermostatCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedThermostatCommands --- # interface SimplifiedThermostatCommands *Known direct subclasses: `SimplifiedThermostat`* ### Functions * `suspend fun setSystemMode(systemMode: SimplifiedThermostatTrait.SystemModeEnum)`: Set the system mode. * `fun setSystemModeBatchable(systemMode: SimplifiedThermostatTrait.SystemModeEnum): BatchableCommand`: The batchable version of `setSystemMode` command. --- package: com.google.home.google.ExtendedModeSelectTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait.Attributes --- # interface ExtendedModeSelectTrait.Attributes Attributes for the ExtendedModeSelect cluster. *Known direct subclasses: `ExtendedModeSelect`* ### Properties * `acceptedCommandList`: `List` * `attributeList`: `List` * `clusterRevision`: `UShort` * `currentModeSettings`: `List?` * `featureMap`: `UInt` * `generatedCommandList`: `List` * `supportedModes`: `List?` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.InstallAppCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.InstallAppCommand --- # object ExtendedApplicationLauncherTrait.InstallAppCommand : CommandDescriptor Install the given application. See also: `installApp` ### Nested Types * `class Request`: The request payload for the InstallApp command. ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.GoogleDeviceTypeRegistry --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDeviceTypeRegistry --- # object GoogleDeviceTypeRegistry ### Properties * `types`: `` --- package: com.google.home.google.ExtendedColorControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControl --- # interface ExtendedColorControl : ExtendedColorControlTrait.Attributes, MatterTrait, ExtendedColorControlCommands API for the ExtendedColorControl trait, an extension of the Matter standard trait, ColorControl. ### Nested Types * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. ### Properties * `factory`: `open TraitFactory` ### Functions * `fun supports(attribute: ExtendedColorControl.Attribute): Boolean` * `fun supports(command: ExtendedColorControl.Command): Boolean` ### Inherited From * **`ExtendedColorControlCommands`**: * `suspend fun moveToColorHsv(hue: Float, saturation: Float, value: Float)` * `fun moveToColorHsvBatchable(hue: Float, saturation: Float, value: Float): BatchableCommand` * `suspend fun moveToColorName(colorName: String)` * `fun moveToColorNameBatchable(colorName: String): BatchableCommand` * `suspend fun moveToColorRgb(red: UByte, green: UByte, blue: UByte)` * `fun moveToColorRgbBatchable(red: UByte, green: UByte, blue: UByte): BatchableCommand` * **`TraitStateInvalidation`**: * `suspend fun forceRead()` * **`ExtendedColorControlTrait.Attributes`**: * `acceptedCommandList`, `attributeList`, `clusterRevision`, `colorLoopEndTimestampSeconds`, `currentBlue`, `currentGreen`, `currentHue`, `currentName`, `currentRed`, `currentSaturation`, `currentValue`, `featureMap`, `generatedCommandList` * **`Trait`**: * `metadata` --- package: com.google.home.google.CookTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait.Attributes --- # interface CookTrait.Attributes Attributes for the Cook cluster. *Known direct subclasses: `Cook`* ### Properties * `acceptedCommandList`: `List` * `attributeList`: `List` * `clusterRevision`: `UShort` * `currentCookingMode`: `CookTrait.CookingMode?` - The current cooking mode set on the device. * `currentFoodPreset`: `String?` - The current food cooking in the device. * `currentFoodQuantity`: `Float?` - Defines the current amount of food cooking using `currentFoodUnit`. * `currentFoodUnit`: `CookTrait.Unit?` - The unit associated with the `currentFoodQuantity`. * `featureMap`: `UInt` * `foodPresets`: `List?` - Presets for certain types of food. * `generatedCommandList`: `List` * `supportedCookingModes`: `List?` - Cooking modes supported by this device. --- package: com.google.home.google.ExtendedTemperatureControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedTemperatureControl.Attribute --- # enum ExtendedTemperatureControl.Attribute : Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `temperatureDisplayMode` ### Companion Properties * `StructDescriptor`: `StructDescriptor` ### Properties * `descriptor`: `open Descriptor` * `fieldName`: `open String` * `isNullable`: `Boolean` * `tag`: `open UInt` * `typeEnum`: `open Type` * `typeName`: `open String` --- package: com.google.home.google.ExtendedMediaPlaybackTrait.ShuffleCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.ShuffleCommand --- # object ExtendedMediaPlaybackTrait.ShuffleCommand : CommandDescriptor ### Nested Types * `class Request` ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.FilterMonitoringTrait.FilterMonitoringFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait.FilterMonitoringFeature --- # data class FilterMonitoringTrait.FilterMonitoringFeature FilterMonitoring trait FeatureMap. ### Constructor * `FilterMonitoringFeature(warning: Boolean = false, condition: Boolean = false)` ### Functions * `open fun toRaw(): ULong` - Convert this ClusterBitmap to raw (bytes) format. ### Properties * `bitmapName`: `String` - Name of the Matter bitmap, in UpperCamelCase. * `condition`: `Boolean` - The device supports monitoring the condition of the filter based on percentage used. * `traitId`: `String` - Trait identifier of the Matter Cluster that defines the bitmap Data Type. * `warning`: `Boolean` - The device supports a warning indication. --- package: com.google.home.google.GoogleDrawerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleDrawerDevice --- # class GoogleDrawerDevice : DeviceType A device consisting of a sliding, lidless, horizontal compartment that may be drawn out from a piece of furniture or a wall. ### Nested Types * **`GoogleTraits`**: Trait Container for Google Traits. ### Constructor * `GoogleDrawerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleDrawerDevice.GoogleTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleDrawerDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` ### Inherited From * **`com.google.home.HasEvents`**: * `open fun events(): Flow` * `open fun events(event: EventFactory): Flow` * `open fun events(trait: TraitFactory): Flow` * **`com.google.home.TraitProvider`**: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * `open fun trait(traitFactory: TraitFactory): T?` * `open fun traits(): Set` * **`com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.GoogleStreamingSoundbarDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingSoundbarDevice --- # class GoogleStreamingSoundbarDevice : DeviceType A device consisting of a combination of speaker and streaming stick or box that provides a streaming experience in addition to soundbar capabilities. ### Nested Types * **`GoogleTraits`**: Trait Container for Google Traits. * **`StandardTraits`**: Trait Container for Standard Traits. ### Constructor * `GoogleStreamingSoundbarDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleStreamingSoundbarDevice.GoogleTraits, standardTraits: GoogleStreamingSoundbarDevice.StandardTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleStreamingSoundbarDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` * `standardTraits`: `GoogleStreamingSoundbarDevice.StandardTraits` ### Inherited From * **`com.google.home.HasEvents`**: * `open fun events(): Flow` * `open fun events(event: EventFactory): Flow` * `open fun events(trait: TraitFactory): Flow` * **`com.google.home.TraitProvider`**: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * `open fun trait(traitFactory: TraitFactory): T?` * `open fun traits(): Set` * **`com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.LockUnlockTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.Attributes --- # interface LockUnlockTrait.Attributes Attributes for the LockUnlock cluster. *Known direct subclasses: `LockUnlock`* ### Properties * `acceptedCommandList`: `List` * `attributeList`: `List` * `clusterRevision`: `UShort` * `featureMap`: `UInt` * `generatedCommandList`: `List` * `lockState`: `LockUnlockTrait.LockState?` - The current lock state of the device. --- package: com.google.home.google.ExtendedFanControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControl.Attribute --- # enum ExtendedFanControl.Attribute : Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `customFanMode` * `customFanModes` * `featureMap` * `generatedCommandList` ### Companion Properties * `StructDescriptor`: `StructDescriptor` ### Properties * `descriptor`: `open Descriptor` * `fieldName`: `open String` * `isNullable`: `Boolean` * `tag`: `open UInt` * `typeEnum`: `open Type` * `typeName`: `open String` --- package: com.google.home.google.ExtendedApplicationLauncher.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncher.Command --- # enum ExtendedApplicationLauncher.Command Descriptor enum for this trait's commands. ### Enum Values * **`InstallApp`**: The `installApp` trait command. * **`LaunchApp`**: The `launchApp` trait command. * **`SearchApp`**: The `searchApp` trait command. ### Properties * `tag`: `UInt` --- package: com.google.home.google.LightEffectsTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.Attributes --- # interface LightEffectsTrait.Attributes Attributes for the LightEffects cluster. *Known direct subclasses: `LightEffects`* ### Properties * `acceptedCommandList`: `List` * `attributeList`: `List` * `clusterRevision`: `UShort` * `defaultSleepDurationSeconds`: `UInt?` - The default duration, in seconds, for the effect triggered by the `sleepEffectSet` command. * `defaultWakeDurationSeconds`: `UInt?` - The default duration, in seconds, for the effect triggered by the `wakeEffectSet` command. * `effectEndTimestampSeconds`: `Long?` - Unix timestamp for when the current effect is expected to end. * `featureMap`: `LightEffectsTrait.LightEffectsFeature` * `generatedCommandList`: `List` * `pulseEffectSet`: `Boolean?` - Indicates that the pulse effect is currently active. * `sleepEffectSet`: `Boolean?` - Indicates that the sleep effect is currently active. * `wakeEffectSet`: `Boolean?` - Indicates that the wake effect is currently active. --- package: com.google.home.google.FillCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillCommands --- # interface FillCommands *Known direct subclasses: `Fill`* ### Functions * `suspend fun fill(fill: Boolean, fillLevel: String, fillPercent: Float)`: Fill or drain the device. * `fun fillBatchable(fill: Boolean, fillLevel: String, fillPercent: Float): BatchableCommand`: The batchable version of `fill` command. --- package: com.google.home.google.AssistantFulfillmentTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait --- # class AssistantFulfillmentTrait ### Constructor * `AssistantFulfillmentTrait()` ### Nested Types * `interface Attributes`: Attributes for the AssistantFulfillment Trait. * `object OkGoogleCommand : CommandDescriptor` * `class OkGoogleCommand.OkGoogleCommandRequest`: The request payload for the OkGoogleCommand command. * `class OkGoogleCommand.OkGoogleCommandResponse`: The response payload for the OkGoogleCommand command. --- package: com.google.home.google.ExtendedPowerSourceTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait --- # object ExtendedPowerSourceTrait Attributes for ExtendedPowerSourceTrait. ### Nested Types * `interface Attributes`: Attributes for the ExtendedPowerSource cluster. * `interface BatteryStateChange` * `class Capacity : ClusterStruct` * `enum CapacityUnit`: The unit of capacity. * `enum ChargeSpeed`: Charging speed. * `enum DescriptiveCapacityRemaining`: The description of the remaining capacity. * `enum DistanceUnit`: The distance unit. * `enum EnergySource`: Energy source. * `object StartChargingCommand : CommandDescriptor` * `class StartChargingCommand.Request` * `object StopChargingCommand : CommandDescriptor` * `class StopChargingCommand.Request` * `interface UsingBackUpEnergySource` ### Properties * `Id`: `ClusterId` --- package: com.google.home.google.ExtendedLevelControl.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedLevelControl.Attribute --- # enum ExtendedLevelControl.Attribute : Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `defaultStepSize` * `featureMap` * `generatedCommandList` ### Companion Properties * `StructDescriptor`: `StructDescriptor` ### Properties * `descriptor`: `open Descriptor` * `fieldName`: `open String` * `isNullable`: `Boolean` * `tag`: `open UInt` * `typeEnum`: `open Type` * `typeName`: `open String` --- package: com.google.home.google.Notification --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Notification --- # class Notification : PlatformTrait, NotificationTrait.Attributes API for the Notification trait. This trait allows sending notifications as actions to structure members, and is only for use with the Automation API. ### Nested Types * `enum Attribute : Enum, Field` ### Properties * `factory`: `open TraitFactory` ### Functions * `suspend fun sendNotifications(title: String, optionalArgs: NotificationTrait.SendNotificationsCommand.OptionalArgs.() -> Unit = {})`: Send a notification to structure members. ### Inherited From * **`PlatformTrait`**: * `suspend fun sendCommand(commandId: String)` * `suspend fun sendCommand(commandId: String, request: PlatformTraitPayload)` * `suspend fun sendCommand(commandId: String, responseParser: Parser): RESPONSE` * `suspend fun sendCommand(commandId: String, request: PlatformTraitPayload, responseParser: Parser): RESPONSE` * `suspend fun write(parser: Parser, attributes: T, useTimedInteraction: Boolean)` * `metadata`: `open Trait.TraitMetadata` * `traitClient`: `PlatformTraitClient` * **`NotificationTrait.Attributes`**: * `structureMembersList`: `open List?` --- package: com.google.home.google.DispenseTrait.DispenseCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait.DispenseCommand --- # object DispenseTrait.DispenseCommand : CommandDescriptor Start or stop dispensing. See also: `dispense` ### Nested Types * `class Request`: The request payload for the Dispense command. * `class Response` ### Properties * `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.ExtendedThermostat --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostat --- # interface ExtendedThermostat : ExtendedThermostatTrait.Attributes, MatterTrait, Updatable, ExtendedThermostatCommands API for the ExtendedThermostat trait, an extension of the Matter standard trait, Thermostat. ### Nested Types * `enum Attribute`: Descriptor for this trait's attributes. * `enum Command`: Descriptor for this trait's commands. ### Properties * `factory`: `open TraitFactory` ### Functions * `fun supports(attribute: ExtendedThermostat.Attribute): Boolean` * `fun supports(command: ExtendedThermostat.Command): Boolean` ### Inherited From * **`ExtendedThermostatCommands`**: * `suspend fun notifySensorStateChange(sensorType: ExtendedThermostatTrait.SensorType, alarmType: ExtendedThermostatTrait.AlarmType)` * `fun notifySensorStateChangeBatchable(sensorType: ExtendedThermostatTrait.SensorType, alarmType: ExtendedThermostatTrait.AlarmType): BatchableCommand` * **`TraitStateInvalidation`**: * `suspend fun forceRead()` * **`Updatable`**: * `suspend fun update(optimisticReturn: (ExtendedThermostat) -> Unit, init: ExtendedThermostatTrait.MutableAttributes.() -> Unit): ExtendedThermostat` * **`ExtendedThermostatTrait.Attributes`**: * `acceptedCommandList`, `activePresetHandle`, `activeRemoteTemperatureSensorIds`, `attributeList`, `averageLocalTemperature`, `clusterRevision`, `extendedProgrammingOperationMode`, `extendedRunningMode`, `extendedSetpointChangeSource`, `extendedSupportedModes`, `extendedSystemMode`, `featureMap`, `generatedCommandList`, `maxCoolSafetySetpointLimit`, `maxHeatSafetySetpointLimit`, `maxSetpointHoldSeconds`, `maxSettableThermostatTemperatureSensors`, `minCoolSafetySetpointLimit`, `minHeatSafetySetpointLimit`, `presets`, `remoteTemperatureSensorIds`, `targetTemperatureTimestampSeconds`, `temperatureSetpointHoldExpiryTimestampSeconds` * **`Trait`**: * `metadata` --- package: com.google.home.google.GoogleAudioVideoReceiverDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAudioVideoReceiverDevice --- # class GoogleAudioVideoReceiverDevice : DeviceType A device that takes audio input (for example, HDMI, optical, and RCA) and outputs sound to one or more speakers. ### Nested Types * **`GoogleTraits`**: Trait Container for Google Traits. * **`StandardTraits`**: Trait Container for Standard Traits. ### Constructor * `GoogleAudioVideoReceiverDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleAudioVideoReceiverDevice.GoogleTraits, standardTraits: GoogleAudioVideoReceiverDevice.StandardTraits)` ### Properties * `factory`: `open DeviceTypeFactory` * `googleTraits`: `GoogleAudioVideoReceiverDevice.GoogleTraits` * `metadata`: `open DeviceType.Metadata` * `standardTraits`: `GoogleAudioVideoReceiverDevice.StandardTraits` ### Inherited From * **`com.google.home.HasEvents`**: * `open fun events(): Flow` * `open fun events(event: EventFactory): Flow` * `open fun events(trait: TraitFactory): Flow` * **`com.google.home.TraitProvider`**: * `open fun metadata(traitFactory: TraitFactory): Trait.TraitMetadata?` * `open fun trait(traitFactory: TraitFactory): T?` * `open fun traits(): Set` * **`com.google.home.DeviceType`**: * `traitProvider`: `TraitProvider` --- package: com.google.home.google.GoogleYogurtmakerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleYogurtmakerDevice --- # class GoogleYogurtmakerDevice : DeviceType A kitchen appliance device that makes yogurt. Interactions with yogurt makers may include starting and stopping, setting a timer, adjusting cooking modes or food presets, or adjusting other various settings. ### Nested Types * `class GoogleTraits`: Trait Container for Google Traits. * `class StandardTraits`: Trait Container for Standard Traits. ### Constructor * `GoogleYogurtmakerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleYogurtmakerDevice.GoogleTraits, standardTraits: GoogleYogurtmakerDevice.StandardTraits)` ### Properties * `factory: DeviceTypeFactory` * `googleTraits: GoogleYogurtmakerDevice.GoogleTraits` * `metadata: DeviceType.Metadata` * `standardTraits: GoogleYogurtmakerDevice.StandardTraits` --- package: com.google.home.google.ExtendedAirQuality.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQuality.Attribute --- # enum ExtendedAirQuality.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList`: The `acceptedCommandList` trait attribute. * `attributeList`: The `attributeList` trait attribute. * `clusterRevision`: The `clusterRevision` trait attribute. * `featureMap`: The `featureMap` trait attribute. * `generatedCommandList`: The `generatedCommandList` trait attribute. * `indoorAirQuality`: The `indoorAirQuality` trait attribute. * `indoorMeasuredValue`: The `indoorMeasuredValue` trait attribute. * `maxMeasuredValue`: The `maxMeasuredValue` trait attribute. * `measuredValue`: The `measuredValue` trait attribute. * `minMeasuredValue`: The `minMeasuredValue` trait attribute. * `outdoorAirQuality`: The `outdoorAirQuality` trait attribute. * `outdoorMeasuredValue`: The `outdoorMeasuredValue` trait attribute. * `tolerance`: The `tolerance` trait attribute. ### Companion Properties * `StructDescriptor: StructDescriptor` ### Functions * `valueOf(value: String): ExtendedAirQuality.Attribute` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.AssistantFulfillment --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillment --- # class AssistantFulfillment : PlatformTrait, AssistantFulfillmentTrait.Attributes ### Functions * `suspend fun okGoogle(query: String? = null): AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandResponse` ### Properties * `factory: TraitFactory` --- package: com.google.home.google.GoogleSetTopBoxDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSetTopBoxDevice.GoogleTraits --- # class GoogleSetTopBoxDevice.GoogleTraits Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `extendedApplicationLauncher: ExtendedApplicationLauncher?`: This trait supports devices which are able to switch between applications. * `extendedChannel: ExtendedChannel?`: This trait supports devices that support TV channels on a media device. * `extendedLevelControl: ExtendedLevelControl?`: This trait belongs to devices which have a volume control. * `extendedMediaPlayback: ExtendedMediaPlayback?` * `mediaActivityState: MediaActivityState?` --- package: com.google.home.google.PreFilterMonitoringTrait.ChangeIndication --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/PreFilterMonitoringTrait.ChangeIndication --- # enum PreFilterMonitoringTrait.ChangeIndication : Enum, ClusterEnum The requirement for changing the pre-filter. ### Enum Values * `Critical`: Pre-filter resource is exhausted, immediate intervention is required. * `Ok`: Pre-filter is in good condition, no intervention required. * `UnknownValue`: The enum value is out of range. * `Unspecified`: Unspecified. * `Warning`: Pre-filter resource will be exhausted soon, intervention will be required. ### Functions * `valueOf(value: String): PreFilterMonitoringTrait.ChangeIndication` * `values(): Array` ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String`: Name of the Matter Data Type that the enum belongs to. * `value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ParkingLocationTrait.CurrentParkingLocation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ParkingLocationTrait.CurrentParkingLocation --- # class ParkingLocationTrait.CurrentParkingLocation : ClusterStruct Locations of the user's parked vehicles. ### Constructor * `CurrentParkingLocation(locationDescription: List = emptyList(), languageCode: String = "")` ### Functions * `getDescriptor(): StructDescriptor`: Returns the descriptor for the struct. * `getFieldValueById(tagId: UInt): Any?`: Returns the value of the field for the given tag ID. ### Properties * `languageCode: String`: ISO 639-1 language code, for example, `en` for English. * `locationDescription: List`: Locations of the user's parked vehicles. --- package: com.google.home.google.RotationCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationCommands --- # interface RotationCommands ### Functions * `suspend fun rotateToDegrees(rotationDegrees: Float)`: Sets the absolute rotation in degrees. * `rotationDegrees: Float`: An absolute value that sets the final clockwise rotation of the device in number of degrees. This value must fall within the range specified in `rotationDegreesRange`. * `fun rotateToDegreesBatchable(rotationDegrees: Float): BatchableCommand`: The batchable version of `rotateToDegrees` command. * `suspend fun rotateToPercentage(rotationPercent: Float)`: Sets the absolute rotation in percentage. * `rotationPercent: Float`: An absolute value that sets the final clockwise rotation of the device in percentage of a full rotation. * `fun rotateToPercentageBatchable(rotationPercent: Float): BatchableCommand`: The batchable version of `rotateToPercentage` command. --- package: com.google.home.google.PreFilterMonitoringTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/PreFilterMonitoringTrait.Attributes --- # interface PreFilterMonitoringTrait.Attributes Attributes for the PreFilterMonitoring cluster. ### Properties * `acceptedCommandList: List`: A list of client-generated commands which are supported by this cluster server instance. * `attributeList: List`: A list of the attribute IDs of the attributes supported by the cluster instance. * `changeIndication: PreFilterMonitoringTrait.ChangeIndication?`: Current requirement for when to change the pre-filter. * `clusterRevision: UShort`: The revision of the server cluster specification supported by the cluster instance. * `condition: UInt?`: Percentage of remaining use of the pre-filter. * `featureMap: UInt`: Whether the server supports zero or more optional cluster features. * `generatedCommandList: List`: A list of server-generated commands which are supported by this cluster server instance. --- package: com.google.home.google.SyntheticSwitchTrait.ButtonPress --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SyntheticSwitchTrait.ButtonPress --- # interface SyntheticSwitchTrait.ButtonPress Indicates that the switch button was pressed. ### Properties * `latchPosition: UInt?`: The position of the latching switch when the user released it. `press_count` shall be 1 whenever `latch_position` is present. * `pressCount: UInt?` --- package: com.google.home.google.Dispense.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Dispense.Command --- # enum Dispense.Command : Enum Descriptor enum for this trait's commands. ### Enum Values * `Dispense`: The Dispense.dispense trait command. ### Functions * `valueOf(value: String): Dispense.Command` * `values(): Array` ### Properties * `tag: UInt` --- package: com.google.home.google.ExtendedMediaPlaybackTrait.SetRepeatCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlaybackTrait.SetRepeatCommand --- # object ExtendedMediaPlaybackTrait.SetRepeatCommand : CommandDescriptor ### Nested Types * `class Request` ### Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedMediaInputTrait.NextInputCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.NextInputCommand.Request --- # class ExtendedMediaInputTrait.NextInputCommand.Request The request payload for the NextInput command. ### Constructor * `Request()` --- package: com.google.home.google.GoogleFreezerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFreezerDevice.StandardTraits --- # class GoogleFreezerDevice.StandardTraits Trait Container for Standard Traits. ### Constructor * `StandardTraits(traitProvider: TraitProvider)` ### Properties * `temperatureControl: TemperatureControl?`: Provides an interface to the setpoint temperature on devices such as washers, refrigerators, and water heaters. * `temperatureMeasurement: TemperatureMeasurement?`: Provides an interface to temperature measurement capability. --- package: com.google.home.google.AudioInputTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AudioInputTrait --- # object AudioInputTrait Attributes for AudioInputTrait. ### Nested Types * `interface Attributes`: Attributes for the AudioInput cluster. * `enum AudioInputEnvironment`: The user's audio input environment of the device. * `enum AudioInputQuality`: The current audio input quality of the device. ### Properties * `Id: ClusterId` --- package: com.google.home.google.LockUnlock.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlock.Attribute --- # enum LockUnlock.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList`: The `acceptedCommandList` trait attribute. * `attributeList`: The `attributeList` trait attribute. * `clusterRevision`: The `clusterRevision` trait attribute. * `featureMap`: The `featureMap` trait attribute. * `generatedCommandList`: The `generatedCommandList` trait attribute. * `lockState`: The `lockState` trait attribute. ### Companion Properties * `StructDescriptor: StructDescriptor` ### Functions * `valueOf(value: String): LockUnlock.Attribute` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.ExtendedThermostatTrait.NotifySensorStateChangeCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.NotifySensorStateChangeCommand.Request --- # class ExtendedThermostatTrait.NotifySensorStateChangeCommand.Request ### Constructor * `Request(sensorType: ExtendedThermostatTrait.SensorType = SensorType.Unspecified, alarmType: ExtendedThermostatTrait.AlarmType = AlarmType.Unspecified)` ### Properties * `alarmType: ExtendedThermostatTrait.AlarmType` * `sensorType: ExtendedThermostatTrait.SensorType` --- package: com.google.home.google.SimplifiedThermostat.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SimplifiedThermostat.Command --- # enum SimplifiedThermostat.Command : Enum Descriptor enum for this trait's commands. ### Enum Values * `SetSystemMode`: The `setSystemMode` trait command. ### Functions * `valueOf(value: String): SimplifiedThermostat.Command` * `values(): Array` ### Properties * `tag: UInt` --- package: com.google.home.google.VoiceStarterTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarterTrait --- # class VoiceStarterTrait ### Nested Types * `interface Attributes`: Attributes for the VoiceStarter Trait. * `class MutableAttributes : VoiceStarterTrait.Attributes` * `interface OkGoogleEvent` ### Constructor * `VoiceStarterTrait()` --- package: com.google.home.google.AreaPresenceState.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaPresenceState.Attribute --- # enum AreaPresenceState.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values * `presenceState` ### Functions * `valueOf(value: String): AreaPresenceState.Attribute` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.ExtendedMediaInputTrait.PreviousInputCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.PreviousInputCommand --- # object ExtendedMediaInputTrait.PreviousInputCommand : CommandDescriptor Select the previous input. Applicable only when the `customInputsOrdered` attribute is set to `true`. ### Nested Types * `class Request`: The request payload for the PreviousInput command. ### Properties * `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.ExtendedChannel.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannel.Command --- # enum ExtendedChannel.Command : Enum Descriptor enum for this trait's commands. ### Enum Values * `ReturnChannel`: The `returnChannel` trait command. ### Functions * `valueOf(value: String): ExtendedChannel.Command` * `values(): Array` ### Properties * `tag: UInt` --- package: com.google.home.google.ExtendedAirQualityTrait.AirQualityFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.AirQualityFeature --- # data class ExtendedAirQualityTrait.AirQualityFeature ExtendedAirQuality trait feature map. ### Constructor * `AirQualityFeature(indoorFair: Boolean = false, indoorModerate: Boolean = false, indoorVeryPoor: Boolean = false, indoorExtremelyPoor: Boolean = false, outdoorFair: Boolean = false, outdoorModerate: Boolean = false, outdoorVeryPoor: Boolean = false, outdoorExtremelyPoor: Boolean = false, numeric: Boolean = false, indoorNumeric: Boolean = false, outdoorNumeric: Boolean = false)` ### Functions * `toRaw(): ULong`: Convert this ClusterBitmap to raw (bytes) format. ### Properties * `bitmapName: String`: Name of the Matter bitmap, in UpperCamelCase. * `indoorExtremelyPoor: Boolean`: The device supports the Extremely Poor descriptive air quality level for indoor measurement. * `indoorFair: Boolean`: The device supports the Fair descriptive air quality level for indoor measurement. * `indoorModerate: Boolean`: The device supports the Moderate descriptive air quality level for indoor measurement. * `indoorNumeric: Boolean`: The device supports AQI numeric value for indoor measurement. * `indoorVeryPoor: Boolean`: The device supports the Very Poor descriptive air quality level for indoor measurement. * `numeric: Boolean`: The device supports AQI numeric value. * `outdoorExtremelyPoor: Boolean`: The device supports the Extremely Poor descriptive air quality level for outdoor measurement. * `outdoorFair: Boolean`: The device supports the Fair descriptive air quality level for outdoor measurement. * `outdoorModerate: Boolean`: The device supports the Moderate descriptive air quality level for outdoor measurement. * `outdoorNumeric: Boolean`: The device supports AQI numeric value for outdoor measurement. * `outdoorVeryPoor: Boolean`: The device supports the Very Poor descriptive air quality level for outdoor measurement. * `traitId: String`: Trait identifier of the Matter Cluster that defines the bitmap Data Type. --- package: com.google.home.google.GoogleSecuritySystemDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSecuritySystemDevice.GoogleTraits --- # class GoogleSecuritySystemDevice.GoogleTraits Trait Container for Google Traits. ### Constructor * `GoogleTraits(traitProvider: TraitProvider)` ### Properties * `armDisarm: ArmDisarm?`: This trait supports arming and disarming, as used in security systems. * `statusReport: StatusReport?`: This trait reports the current status of a specific device or a connected group of devices. --- package: com.google.home.google.LeafWetnessMeasurementTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LeafWetnessMeasurementTrait.Attributes --- # interface LeafWetnessMeasurementTrait.Attributes Attributes for the LeafWetnessMeasurement cluster. ### Properties * `acceptedCommandList: List`: A list of client-generated commands which are supported by this cluster server instance. * `attributeList: List`: A list of the attribute IDs of the attributes supported by the cluster instance. * `clusterRevision: UShort`: The revision of the server cluster specification supported by the cluster instance. * `featureMap: UInt`: Whether the server supports zero or more optional cluster features. * `generatedCommandList: List`: A list of server-generated commands which are supported by this cluster server instance. * `maxMeasuredValue: UInt?`: The maximum value of the measured value that can be measured. * `measuredValue: UInt?`: Leaf wetness measured in water content percentage. * `minMeasuredValue: UInt?`: The minimum value of the measured value that can be measured. * `tolerance: UInt?`: The magnitude of the possible error that is associated with the measured value. --- package: com.google.home.google.ExtendedThermostatTrait.ExtendedThermostatMode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.ExtendedThermostatMode --- # enum ExtendedThermostatTrait.ExtendedThermostatMode : Enum, ClusterEnum Represents a mode in which a thermostat can operate. ### Enum Values * `Eco`: Energy-saving mode. * `On`: Restores the previous mode of the device. * `Purifier`: Purifying mode. * `SmarthomeAuto` * `Standard`: The thermostat is running in one of the standard modes, not in any of the defined extended modes for this trait. * `UnknownValue`: The enum value is out of range. ### Functions * `valueOf(value: String): ExtendedThermostatTrait.ExtendedThermostatMode` * `values(): Array` ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String`: Name of the Matter Data Type that the enum belongs to. * `value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.OpenCloseCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseCommands --- # interface OpenCloseCommands ### Functions * `suspend fun close()`: Fully close the device. * `fun closeBatchable(): BatchableCommand`: The batchable version of `close` command. * `suspend fun goToOpenPercentage(openPercent: Double, openDirection: OpenCloseTrait.Direction)`: Open the device to a specific percentage (0-100). * `openPercent: Double`: Percentage to open (0 is closed, 100 is fully open). * `openDirection: OpenCloseTrait.Direction`: Direction to open, if supported. * `fun goToOpenPercentageBatchable(openPercent: Double, openDirection: OpenCloseTrait.Direction): BatchableCommand`: The batchable version of `goToOpenPercentage` command. * `suspend fun open(openDirection: OpenCloseTrait.Direction)`: Fully open the device. * `openDirection: OpenCloseTrait.Direction`: Direction to open, if supported. * `fun openBatchable(openDirection: OpenCloseTrait.Direction): BatchableCommand`: The batchable version of `open` command. * `suspend fun step(openRelativePercent: Double, openDirection: OpenCloseTrait.Direction)`: Adjust the open-close state relative to the current state. * `openRelativePercent: Double`: The percentage to change the open-close state. * `openDirection: OpenCloseTrait.Direction`: Direction to open, if supported. * `fun stepBatchable(openRelativePercent: Double, openDirection: OpenCloseTrait.Direction): BatchableCommand`: The batchable version of `step` command. --- package: com.google.home.google.RelativeHumidityControlCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlCommands --- # interface RelativeHumidityControlCommands ### Functions * `suspend fun setRelativeHumidity(humidity: UInt)`: Set the relative humidity level to a specific value. * `humidity: UInt`: Setpoint humidity percentage, between `minRelativeHumidity` and `maxRelativeHumidity`. * `fun setRelativeHumidityBatchable(humidity: UInt): BatchableCommand`: The batchable version of `setRelativeHumidity` command. * `suspend fun stepRelativeHumidity(relativeHumidityPercent: UInt, relativeHumidityWeight: UInt, stepMode: RelativeHumidityControlTrait.StepMode)`: Increase or decrease the relative humidity. * `relativeHumidityPercent: UInt`: The percentage value to adjust the humidity level. * `relativeHumidityWeight: UInt`: The amount of ambiguous humidity change. * `stepMode: RelativeHumidityControlTrait.StepMode`: The direction of the change. * `fun stepRelativeHumidityBatchable(relativeHumidityPercent: UInt, relativeHumidityWeight: UInt, stepMode: RelativeHumidityControlTrait.StepMode): BatchableCommand`: The batchable version of `stepRelativeHumidity` command. --- package: com.google.home.google.Dispense.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Dispense.Attribute --- # enum Dispense.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values * `acceptedCommandList`: The `acceptedCommandList` trait attribute. * `attributeList`: The `attributeList` trait attribute. * `clusterRevision`: The `clusterRevision` trait attribute. * `dispenseItems`: The `dispenseItems` trait attribute. * `featureMap`: The `featureMap` trait attribute. * `generatedCommandList`: The `generatedCommandList` trait attribute. * `supportedDispenseItems`: The `supportedDispenseItems` trait attribute. * `supportedDispensePresets`: The `supportedDispensePresets` trait attribute. ### Companion Properties * `StructDescriptor: StructDescriptor` ### Functions * `valueOf(value: String): Dispense.Attribute` * `values(): Array` ### Properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.MediaActivityStateTrait.ActivityState --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MediaActivityStateTrait.ActivityState --- # enum MediaActivityStateTrait.ActivityState : Enum, ClusterEnum ### Enum Values * `Active` * `Inactive` * `Standby` * `UnknownValue`: The enum value is out of range. * `Unspecified` ### Functions * `valueOf(value: String): MediaActivityStateTrait.ActivityState` * `values(): Array` ### Properties * `traitId: String`: Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String`: Name of the Matter Data Type that the enum belongs to. * `value: ULong`: Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.Fill --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Fill --- # interface Fill : FillTrait.Attributes, MatterTrait, FillCommands API for the Fill trait. This trait belongs to devices that support being filled such as a bathtub. ### Nested Types * `enum Attribute`: Descriptor enum for this trait's attributes. * `enum Command`: Descriptor enum for this trait's commands. ### Functions * `supports(attribute: Fill.Attribute): Boolean` * `supports(command: Fill.Command): Boolean` * `suspend fun fill(fill: Boolean, fillLevel: String, fillPercent: Float)`: Fill or drain the device. * `fun fillBatchable(fill: Boolean, fillLevel: String, fillPercent: Float): BatchableCommand`: The batchable version of `fill` command. ### Properties * `factory: TraitFactory` * `acceptedCommandList: List`: A list of supported client-generated commands. * `attributeList: List`: A list of supported attribute IDs. * `availableFillLevels: FillTrait.AvailableFillLevels?`: Describes different levels of filling the device. * `clusterRevision: UShort`: The revision of the server cluster specification. * `currentFillLevel: String?`: The current `levelName` from the `availableFillLevels` attribute. * `currentFillPercent: Float?`: The current fill level percentage. * `featureMap: FillTrait.FillFeature`: Whether the server supports zero or more optional cluster features. * `generatedCommandList: List`: A list of supported server-generated commands. * `isFilled: Boolean?`: Is `true` if the device is filled to any level, `false` if drained. * `metadata: Trait.TraitMetadata` --- package: com.google.home.google.ExtendedApplicationLauncherTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedApplicationLauncherTrait.Attributes --- # interface ExtendedApplicationLauncherTrait.Attributes *Attributes for the ExtendedApplicationLauncher cluster.* **Known direct subclasses:** `ExtendedApplicationLauncher` ### Public Properties - `acceptedCommandList: List` - List of client-generated commands supported by this cluster. - `attributeList: List` - List of attribute IDs supported by the cluster. - `availableApplications: List?` - List of applications. (Read-only) - `clusterRevision: UShort` - Revision of the server cluster specification. - `currentApplicationKey: String?` - Key of the current foreground application. (Read-only) - `featureMap: UInt` - Bitmap of supported optional cluster features. - `generatedCommandList: List` - List of server-generated commands supported by this cluster. - `globalApplicationCatalog: List?` - `type: ExtendedApplicationLauncherTrait.ApplicationType?` - Launcher application's type. (Read-only) - `useGlobalApplicationCatalog: Boolean?` - Use global application catalog. (Read-only) --- package: com.google.home.google.RelativeHumidityControlTrait.StepRelativeHumidityCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlTrait.StepRelativeHumidityCommand --- # object RelativeHumidityControlTrait.StepRelativeHumidityCommand *Increases or decreases the relative humidity.* ### Nested Types - `class Request` - The request payload for the command. ### Public Properties - `commandId: String` - Unique id for the command. --- package: com.google.home.google.GoogleKettleDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleKettleDevice --- # class GoogleKettleDevice *A device that boils water for use in hot beverages. Interactions may include on/off, adjusting temperature, and mode settings.* ### Nested Types - `class GoogleKettleDevice.GoogleTraits` - Container for Google Traits. - `class GoogleKettleDevice.StandardTraits` - Container for Standard Traits. ### Public Constructor - `GoogleKettleDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleKettleDevice.GoogleTraits, standardTraits: GoogleKettleDevice.StandardTraits)` ### Public Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleKettleDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleKettleDevice.StandardTraits` *Inherits standard `DeviceType`, `HasEvents`, and `TraitProvider` functionality.* --- package: com.google.home.google.RebootCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RebootCommands --- # interface RebootCommands **Known direct subclasses:** `Reboot` ### Public Functions - `suspend fun reboot(): Unit` - Reboots the device. - `fun rebootBatchable(): BatchableCommand` - Batchable version of the `reboot` command. --- package: com.google.home.google.VoiceStarterTrait.MutableAttributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarterTrait.MutableAttributes --- # class VoiceStarterTrait.MutableAttributes *Inherits from `VoiceStarterTrait.Attributes`.* ### Public Constructor - `MutableAttributes(attributes: VoiceStarterTrait.Attributes)` ### Public Properties - `reservedQueriesList: List` --- package: com.google.home.google.ExtendedPowerSourceCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceCommands --- # interface ExtendedPowerSourceCommands **Known direct subclasses:** `ExtendedPowerSource` ### Public Functions - `suspend fun startCharging(): Unit` - `fun startChargingBatchable(): BatchableCommand` - `suspend fun stopCharging(): Unit` - `fun stopChargingBatchable(): BatchableCommand` --- package: com.google.home.google.ExtendedDoorLockTrait.PrivacyModeActor --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.PrivacyModeActor --- # class ExtendedDoorLockTrait.PrivacyModeActor *Describes who and what last caused the privacy mode state to change.* ### Public Constructor - `PrivacyModeActor(privacy_mode_actor_method: ExtendedDoorLockTrait.PrivacyModeActorMethodEnum, actor_name: String, user_id: Long, timeStampSeconds: Long)` ### Public Properties - `actor_name: String` - The name of the actor who took the action. - `privacy_mode_actor_method: ExtendedDoorLockTrait.PrivacyModeActorMethodEnum` - The method of the privacy mode actor. - `timeStampSeconds: Long` - The timestamp of the event in seconds. - `user_id: Long` - The user ID of the actor who took the action. --- package: com.google.home.google.VolumeTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.Attributes --- # interface VolumeTrait.Attributes *Attributes for the Volume cluster.* **Known direct subclasses:** `Volume` ### Public Properties - `acceptedCommandList: List` - List of client-generated commands supported by this cluster. - `attributeList: List` - List of attribute IDs supported by the cluster. - `clusterRevision: UShort` - Revision of the server cluster specification. - `currentVolumePercent: UByte?` - The current volume percentage (0-100). (Read-only) - `featureMap: UInt` - Bitmap of supported optional cluster features. - `generatedCommandList: List` - List of server-generated commands supported by this cluster. - `isMuted: Boolean?` - Whether the speaker is muted. (Read-only) --- package: com.google.home.google.VolumeTrait.MoveToVolumeCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.MoveToVolumeCommand.Request --- # class VolumeTrait.MoveToVolumeCommand.Request *Request payload for the `MoveToVolume` command.* ### Public Constructor - `Request(volumePercent: UByte)` ### Public Properties - `volumePercent: UByte` - The desired volume percentage (0-100). --- package: com.google.home.google.GoogleAirCoolerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAirCoolerDevice.StandardTraits --- # class GoogleAirCoolerDevice.StandardTraits *Trait Container for Standard Traits.* ### Public Constructor - `StandardTraits(traitProvider: TraitProvider)` ### Public Properties - `fanControl: FanControl?` - Controls the speed of a fan. - `onOff: OnOff?` - Turns devices on and off. - `relativeHumidityMeasurement: RelativeHumidityMeasurement?` - Provides relative humidity measurements. - `temperatureMeasurement: TemperatureMeasurement?` - Provides temperature measurement capability. - `thermostat: Thermostat?` - Provides thermostat functionality. - `thermostatUserInterfaceConfiguration: ThermostatUserInterfaceConfiguration?` - Configures the UI for a thermostat. --- package: com.google.home.google.GoogleAirCoolerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAirCoolerDevice --- # class GoogleAirCoolerDevice *A device for temperature cooling and humidity control, like a portable air cooler with a water tank.* ### Nested Types - `class GoogleAirCoolerDevice.GoogleTraits` - Container for Google Traits. - `class GoogleAirCoolerDevice.StandardTraits` - Container for Standard Traits. ### Public Constructor - `GoogleAirCoolerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleAirCoolerDevice.GoogleTraits, standardTraits: GoogleAirCoolerDevice.StandardTraits)` ### Public Properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleAirCoolerDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleAirCoolerDevice.StandardTraits` *Inherits standard `DeviceType`, `HasEvents`, and `TraitProvider` functionality.* --- package: com.google.home.google.TogglesCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TogglesCommands --- # interface TogglesCommands **Known direct subclasses:** `Toggles` ### Public Functions - `suspend fun changeToggleSettings(updatedToggleSettings: List): Unit` - Changes the state of one or more toggles. - `fun changeToggleSettingsBatchable(updatedToggleSettings: List): BatchableCommand` - Batchable version of `changeToggleSettings`. --- package: com.google.home.google.VolumeTrait.MoveToVolumeCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VolumeTrait.MoveToVolumeCommand --- # object VolumeTrait.MoveToVolumeCommand *Moves the volume of the device to a specified value.* ### Nested Types - `class Request` - The request payload for the command. ### Public Properties - `commandId: String` - Unique id for the command. --- package: com.google.home.google.Max2FilterMonitoringTrait.ChangeIndication --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Max2FilterMonitoringTrait.ChangeIndication --- # enum Max2FilterMonitoringTrait.ChangeIndication *Describes the requirement to change the filter.* ### Enum Values - `Ok` - The filter is in good condition. - `Warning` - The filter will soon be exhausted. - `Critical` - The filter is exhausted and requires immediate intervention. - `Unspecified` - The filter condition is unspecified. - `UnknownValue` - The enum value is out of range. --- package: com.google.home.google.CookTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookTrait --- # object CookTrait *Attributes and types for CookTrait.* ### Public Properties - `Id: ClusterId` ### Nested Types - `interface CookTrait.Attributes` - Attributes for the Cook cluster. - `object CookTrait.CookCommand` - Command to start or stop cooking. - `class CookTrait.CookCommand.Request` - `class CookTrait.CookCommand.Response` - `enum CookTrait.CookingMode` - The current cooking mode. - `class CookTrait.FoodPreset` - Internal name of the food preset. - `class CookTrait.FoodSynonym` - Available food synonyms for a language. - `enum CookTrait.Unit` - The available Units. --- package: com.google.home.google.OpenCloseTrait.Direction --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.Direction --- # enum OpenCloseTrait.Direction *Direction in which the device is opened.* ### Enum Values - `Up` - `Down` - `Left` - `Right` - `In` - `Out` - `Unspecified` - `UnknownValue` - The enum value is out of range. --- package: com.google.home.google.Fill.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Fill.Command --- # enum Fill.Command *Descriptor enum for the Fill trait's commands.* ### Enum Values - `Fill` - The `Fill.fill` trait command. --- package: com.google.home.google.GoogleFreezerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleFreezerDevice.GoogleTraits --- # class GoogleFreezerDevice.GoogleTraits *Trait Container for Google Traits.* ### Public Constructor - `GoogleTraits(traitProvider: TraitProvider)` ### Public Properties - `extendedTemperatureControl: ExtendedTemperatureControl?` - Trait for devices that control temperature. --- package: com.google.home.google.AreaAttendanceState.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceState.Attribute --- # enum AreaAttendanceState.Attribute *Descriptor enum for the AreaAttendanceState trait's attributes.* ### Enum Values - `attendanceState` --- package: com.google.home.google.ExtendedModeSelectTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedModeSelectTrait --- # object ExtendedModeSelectTrait *Attributes and types for ExtendedModeSelectTrait.* ### Public Properties - `Id: ClusterId` ### Nested Types - `interface ExtendedModeSelectTrait.Attributes` - `object ExtendedModeSelectTrait.ChangeModeSettingsCommand` - `class ExtendedModeSelectTrait.ChangeModeSettingsCommand.Request` - `class ExtendedModeSelectTrait.Mode` - `class ExtendedModeSelectTrait.ModeSetting` - `class ExtendedModeSelectTrait.ModeSynonyms` - `class ExtendedModeSelectTrait.Setting` - `class ExtendedModeSelectTrait.SettingSynonyms` --- package: com.google.home.google.Timer --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Timer --- # interface Timer *API for the Timer trait to control a built-in timer on a device.* ### Nested Types - `enum Timer.Attribute` - Descriptor for this trait's attributes. - `enum Timer.Command` - Descriptor for this trait's commands. ### Public Properties - `factory: TraitFactory` ### Public Functions - `fun supports(attribute: Timer.Attribute): Boolean` - `fun supports(command: Timer.Command): Boolean` ### Commands (Inherited from TimerCommands) - `suspend fun timerAdjust(adjustmentTimeSeconds: Int)` - Adjusts the timer duration. - `suspend fun timerCancel()` - Cancels the timer. - `suspend fun timerPause()` - Pauses the timer. - `suspend fun timerResume()` - Resumes the timer. - `suspend fun timerStart(timerTimeSeconds: Int)` - Starts a new timer. - *Batchable versions of all commands are also available (e.g., `timerAdjustBatchable`).* ### Attributes (Inherited from TimerTrait.Attributes) - `maxTimerLimitSeconds: Int?` - The largest timer setting in seconds. - `timerRemainingSeconds: Int?` - The remaining seconds on the timer. - `timerPaused: Boolean?` - Indicates if an active timer is paused. - `commandOnlyTimer: Boolean?` - `true` for one-way communication, `false` for two-way. - `acceptedCommandList: List` - `attributeList: List` - `clusterRevision: UShort` - `featureMap: UInt` - `generatedCommandList: List` --- package: com.google.home.google.AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandRequest --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandRequest --- # class AssistantFulfillmentTrait.OkGoogleCommand.OkGoogleCommandRequest *Request payload for the `OkGoogleCommand` command.* ### Public Constructor - `OkGoogleCommandRequest(query: String? = null)` ### Public Properties - `query: String?` --- package: com.google.home.google.ExtendedAirQualityTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait --- # object ExtendedAirQualityTrait *Attributes and types for ExtendedAirQualityTrait.* ### Public Properties - `Id: ClusterId` ### Nested Types - `interface ExtendedAirQualityTrait.AirQuality` - Notification of the current air quality level. - `data class ExtendedAirQualityTrait.AirQualityFeature` - Trait feature map. - `enum ExtendedAirQualityTrait.AirQualityLevel` - The air quality level. - `interface ExtendedAirQualityTrait.AirQualitySensorError` - Notification of a sensor error. - `interface ExtendedAirQualityTrait.Attributes` - Attributes for the cluster. - `enum ExtendedAirQualityTrait.MeasurementLocation` - The location of the measurement. --- package: com.google.home.google.ExtendedColorControlTrait.MoveToColorNameCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.MoveToColorNameCommand.Request --- # class ExtendedColorControlTrait.MoveToColorNameCommand.Request *Request payload for the `MoveToColorName` command.* ### Public Constructor - `Request(colorName: String = "")` ### Public Properties - `colorName: String` - Name of the color. --- package: com.google.home.google.VoiceStarterTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/VoiceStarterTrait.Attributes --- # interface VoiceStarterTrait.Attributes *Attributes for the VoiceStarter Trait.* **Known direct subclasses:** `VoiceStarterTrait.MutableAttributes`, `VoiceStarter` ### Public Properties - `reservedQueriesList: List` --- package: com.google.home.google.GoogleMulticookerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMulticookerDevice.StandardTraits --- # class GoogleMulticookerDevice.StandardTraits *Trait Container for Standard Traits.* ### Public Constructor - `StandardTraits(traitProvider: TraitProvider)` ### Public Properties - `onOff: OnOff?` - Turns devices on and off. - `operationalState: OperationalState?` - Monitors and changes the operational state of a device. --- package: com.google.home.google.ExtendedDoorLockTrait.LockOperationSourceEnum --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.LockOperationSourceEnum --- # enum ExtendedDoorLockTrait.LockOperationSourceEnum *The source of the lock operation.* ### Enum Values - `Manual` - `Keypad` - `Button` - `Rfid` - `Biometric` - `Remote` - `ProprietaryRemote` - `Schedule` - `Auto` - `Aliro` - `Unspecified` - `UnknownValue` - The enum value is out of range. --- package: com.google.home.google.GoogleMowerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMowerDevice.StandardTraits --- # class GoogleMowerDevice.StandardTraits *Trait Container for Standard Traits.* ### Public Constructor - `StandardTraits(traitProvider: TraitProvider)` ### Public Properties - `onOff: OnOff?` - Turns devices on and off. - `operationalState: OperationalState?` - Monitors and changes the operational state of a device. - `powerSource: PowerSource?` --- package: com.google.home.google.OpenCloseTrait.GoToOpenPercentageCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.GoToOpenPercentageCommand.Request --- # class OpenCloseTrait.GoToOpenPercentageCommand.Request *Request payload for the `GoToOpenPercentage` command.* ### Public Constructor - `Request(openPercent: Double = 0.0, openDirection: OpenCloseTrait.Direction = Direction.Unspecified)` ### Public Properties - `openPercent: Double` - Percentage to open the device (0-100). - `openDirection: OpenCloseTrait.Direction` - The direction in which to open. --- package: com.google.home.google.ExtendedFanControlTrait.ExtendedStepCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.ExtendedStepCommand --- # object ExtendedFanControlTrait.ExtendedStepCommand *Sets the relative speed of the fan.* ### Nested Types - `class Request` - The request payload for the command. ### Public Properties - `commandId: String` - Unique id for the command. --- package: com.google.home.google.GoogleGameConsoleDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleGameConsoleDevice --- # class GoogleGameConsoleDevice : DeviceType A device used to manage and play video games. Interactions with game consoles include playing games and operating device controls. ### Nested types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Public constructors - `GoogleGameConsoleDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleGameConsoleDevice.GoogleTraits, standardTraits: GoogleGameConsoleDevice.StandardTraits)`: Creates the GoogleGameConsoleDevice class. ### Public properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleGameConsoleDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleGameConsoleDevice.StandardTraits` --- package: com.google.home.google.ExtendedPowerSourceTrait.StopChargingCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSourceTrait.StopChargingCommand --- # object ExtendedPowerSourceTrait.StopChargingCommand : CommandDescriptor ### Nested types - `class Request` ### Public properties - `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.GoogleMowerDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleMowerDevice --- # class GoogleMowerDevice : DeviceType A device used to trim a lawn to a uniform height. Interactions with mowers may include starting, stopping and pausing mowing, docking, checking the current cycle, locating the mower, and adjusting various modes. ### Nested types - `class GoogleTraits`: Trait Container for Google Traits. - `class StandardTraits`: Trait Container for Standard Traits. ### Public constructors - `GoogleMowerDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleMowerDevice.GoogleTraits, standardTraits: GoogleMowerDevice.StandardTraits)`: Creates the GoogleMowerDevice class. ### Public properties - `factory: DeviceTypeFactory` - `googleTraits: GoogleMowerDevice.GoogleTraits` - `metadata: DeviceType.Metadata` - `standardTraits: GoogleMowerDevice.StandardTraits` --- package: com.google.home.google.GooglePetFeederDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePetFeederDevice.GoogleTraits --- # class GooglePetFeederDevice.GoogleTraits Trait Container for Google Traits. ### Public constructors - `GoogleTraits(traitProvider: TraitProvider)` ### Public properties - `dispense: Dispense?`: This trait supports devices dispensing a specified amount of one or more physical items. - `extendedOperationalState: ExtendedOperationalState?`: This trait represents any device that supports operating in specific zones, and has an ongoing duration for its operation which can be queried. --- package: com.google.home.google.LightEffectsTrait.StopEffectCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.StopEffectCommand.Request --- # class LightEffectsTrait.StopEffectCommand.Request The request payload for the StopEffect command. ### Public constructors - `Request()`: Creates a request payload for the StopEffect command. --- package: com.google.home.google.TimerTrait.TimerStartCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerStartCommand --- # object TimerTrait.TimerStartCommand : CommandDescriptor Starts a new device timer. ### Nested types - `class Request`: The request payload for the TimerStart command. ### Public properties - `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.DispenseTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/DispenseTrait --- # object DispenseTrait Attributes for DispenseTrait. ### Nested types - `class Amount : ClusterStruct`: The available dispensible item amounts. - `interface Attributes`: Attributes for the Dispense cluster. - `class DispensableItem : ClusterStruct`: The available dispensible items. - `object DispenseCommand : CommandDescriptor`: Start or stop dispensing. - `class DispenseCommand.Request`: The request payload for the Dispense command. - `class DispenseCommand.Response` - `class DispenseItem : ClusterStruct`: The state of a given disensible item. - `class ItemNameSynonym : ClusterStruct`: Synonym names for the dispensed item in a given language. - `class Preset : ClusterStruct`: The supported dispensible item presets. - `class PresetNameSynonym : ClusterStruct`: Synonym names for the preset in a given language. - `enum Unit : Enum, ClusterEnum`: The available units. ### Public properties - `Id: ClusterId` --- package: com.google.home.google.MotionDetection.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MotionDetection.Attribute --- # enum MotionDetection.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. - `lastMotionDetectionEventEndTimestampSeconds`: The `lastMotionDetectionEventEndTimestampSeconds` trait attribute. - `lastMotionDetectionEventStartTimestampSeconds`: The `lastMotionDetectionEventStartTimestampSeconds` trait attribute. - `motionDetectionEventInProgress`: The `motionDetectionEventInProgress` trait attribute. - `motionDetectionTimestampSeconds`: The `motionDetectionTimestampSeconds` trait attribute. ### Public companion properties - `StructDescriptor: StructDescriptor` --- package: com.google.home.google.RotationTrait.RotateToDegreesCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.RotateToDegreesCommand.Request --- # class RotationTrait.RotateToDegreesCommand.Request The request payload for the RotateToDegrees command. ### Public constructors - `Request(rotationDegrees: Float = 0.0f)`: Creates a request payload for the RotateToDegrees command. ### Public properties - `rotationDegrees: Float`: An absolute value that sets the final clockwise rotation of the device in number of degrees. This value must fall within the range specified in `rotationDegreesRange`. --- package: com.google.home.google.ExtendedFanControlTrait.ToggleAirflowDirectionCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.ToggleAirflowDirectionCommand.Request --- # class ExtendedFanControlTrait.ToggleAirflowDirectionCommand.Request The request payload for the ToggleAirflowDirection command. ### Public constructors - `Request()`: Creates a request payload for the ToggleAirflowDirection command. --- package: com.google.home.google.ExtendedTemperatureControlTrait.TemperatureSetpointReached --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedTemperatureControlTrait.TemperatureSetpointReached --- # interface ExtendedTemperatureControlTrait.TemperatureSetpointReached Notification that a device has reached its target temperature. ### Public properties - `priority: Int?`: Represents the notification level. The currently supported value is 0, which indicates that the notification should be spoken aloud. - `targetTemperatureReached: Boolean?`: Indicates whether the device was being preheated or otherwise reached its target temperature. - `temperatureSetpointCelsius: Short?`: The temperature in Celsius the device is set to, with a resolution of 0.01°C. --- package: com.google.home.google.CookCommands --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/CookCommands --- # interface CookCommands *Known direct subclasses: `Cook` (API for the Cook trait.)* ### Public functions - `suspend cook(start: Boolean, cookingMode: CookTrait.CookingMode, foodPreset: String, quantity: Float, unit: CookTrait.Unit): CookTrait.CookCommand.Response` - **Description**: Start or stop cooking. - **Parameters**: - `start: Boolean`: If `true`, start cooking; if `false`, stop. - `cookingMode: CookTrait.CookingMode`: Cooking mode for the device. - `foodPreset: String`: The food preset requested by the user. - `quantity: Float`: Quantity of the food requested by the user. - `unit: CookTrait.Unit`: Unit associated with the quantity. - `cookBatchable(start: Boolean, cookingMode: CookTrait.CookingMode, foodPreset: String, quantity: Float, unit: CookTrait.Unit): BatchableCommand` - **Description**: The batchable version of `cook` command. - **Parameters**: Same as `cook`. --- package: com.google.home.google.ExtendedOperationalState.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedOperationalState.Attribute --- # enum ExtendedOperationalState.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `activeOperationZones`: The `activeOperationZones` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `currentPhaseCountdownTimeSeconds`: The `currentPhaseCountdownTimeSeconds` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. - `maxOperationDurationSeconds`: The `maxOperationDurationSeconds` trait attribute. - `minOperationDurationSeconds`: The `minOperationDurationSeconds` trait attribute. - `operationCompletionTimestamp`: The `operationCompletionTimestamp` trait attribute. - `operationZones`: The `operationZones` trait attribute. ### Public companion properties - `StructDescriptor: StructDescriptor` --- package: com.google.home.google.ExtendedMediaInputTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait --- # object ExtendedMediaInputTrait Attributes for ExtendedMediaInputTrait. ### Nested types - `interface Attributes`: Attributes for the ExtendedMediaInput cluster. - `class AvailableInput : ClusterStruct`: Available-input definitions. - `class InputNames : ClusterStruct`: Input names for a given available language. - `object NextInputCommand : CommandDescriptor`: Select the next input. - `class NextInputCommand.Request`: The request payload for the NextInput command. - `object PreviousInputCommand : CommandDescriptor`: Select the previous input. - `class PreviousInputCommand.Request`: The request payload for the PreviousInput command. - `object SelectCustomInputCommand : CommandDescriptor`: Set the media input. - `class SelectCustomInputCommand.Request`: The request payload for the SelectCustomInput command. ### Public properties - `Id: ClusterId` --- package: com.google.home.google.ArmDisarm --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ArmDisarm --- # interface ArmDisarm : ArmDisarmTrait.Attributes, MatterTrait, ArmDisarmCommands API for the ArmDisarm trait. This trait supports arming and disarming, as used in security systems. ### Nested types - `enum Attribute : Enum, Field`: Descriptor enum for this trait's attributes. - `enum Command : Enum`: Descriptor enum for this trait's commands. ### Public functions - `supports(attribute: ArmDisarm.Attribute): Boolean` - `supports(command: ArmDisarm.Command): Boolean` ### Public properties - `factory: TraitFactory` ### Inherited Commands (from ArmDisarmCommands) - `suspend armDisarm(arm: Boolean, optionalArgs: ArmDisarmTrait.ArmDisarmCommand.OptionalArgs.() -> Unit): Unit`: Sets the alarm level of the device. - `armDisarmBatchable(arm: Boolean, optionalArgs: ArmDisarmTrait.ArmDisarmCommand.OptionalArgs.() -> Unit): BatchableCommand`: The batchable version of `armDisarm` command. ### Inherited Attributes (from ArmDisarmTrait.Attributes) - `acceptedCommandList: List`: List of supported client-generated commands. - `armState: ArmDisarmTrait.ArmState?`: Current arm state of the device. - `attributeList: List`: List of supported attribute IDs. - `availableArmLevels: ArmDisarmTrait.AvailableArmLevels?`: The supported security levels of the device. - `clusterRevision: UShort`: The revision of the server cluster specification. - `currentArmLevel: String?`: The current security level. - `entryAllowanceEndTimeSeconds: Long?`: Epoch Unix timestamp of when an active entry allowance expires. - `exitAllowanceEndTimeSeconds: Long?`: Epoch Unix timestamp of when an active exit allowance expires. - `exitAllowanceSeconds: UInt?`: Number of seconds before the `currentArmLevel` takes effect. - `featureMap: UInt`: Whether the server supports zero or more optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. - `isArmed: Boolean?`: Indicates if the device is currently armed. - `targetArmLevel: String?`: The level the device will enter after an exit countdown completes. --- package: com.google.home.google.OpenClose.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenClose.Command --- # enum OpenClose.Command : Enum Descriptor enum for this trait's commands. ### Enum Values - `Close`: The `close` trait command. - `GoToOpenPercentage`: The `goToOpenPercentage` trait command. - `Open`: The `open` trait command. - `Step`: The `step` trait command. ### Public properties - `tag: UInt` --- package: com.google.home.google.FillTrait.Level --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait.Level --- # class FillTrait.Level : ClusterStruct Level name and its language-specific synonyms. ### Public constructors - `Level(levelName: String = "", levelValues: List = emptyList())`: Creates the Level class. ### Public properties - `levelName: String`: Internal name of the level. - `levelValues: List`: Synonyms of the level in each supported language. --- package: com.google.home.google.AreaAttendanceStateTrait --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AreaAttendanceStateTrait --- # class AreaAttendanceStateTrait ### Nested types - `enum AttendanceState : Enum, PlatformEnum` - `interface Attributes`: Attributes for the AreaAttendanceState Trait. - `class MutableAttributes : AreaAttendanceStateTrait.Attributes` ### Public constructors - `AreaAttendanceStateTrait()` --- package: com.google.home.google.GoogleAutoDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAutoDevice.GoogleTraits --- # class GoogleAutoDevice.GoogleTraits Trait Container for Google Traits. ### Public constructors - `GoogleTraits(traitProvider: TraitProvider)` ### Public properties - `extendedModeSelect: ExtendedModeSelect?` - `extendedOperationalState: ExtendedOperationalState?`: Represents a device that supports operating in specific zones with a queryable ongoing duration. - `extendedPowerSource: ExtendedPowerSource?`: Belongs to devices which have a power source. - `lockUnlock: LockUnlock?`: Belongs to devices that support locking and unlocking, or reporting a locked state (excluding standard door locks). - `toggles: Toggles?`: Belongs to devices with settings that can only exist in one of two states (on/off). --- package: com.google.home.google.FilterMonitoringTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FilterMonitoringTrait.Attributes --- # interface FilterMonitoringTrait.Attributes *Known direct subclasses: `FilterMonitoring` (API for the FilterMonitoring trait.)* Attributes for the FilterMonitoring cluster. ### Public properties - `acceptedCommandList: List`: List of supported client-generated commands. - `attributeList: List`: List of supported attribute IDs. - `changeIndicationCleanliness: FilterMonitoringTrait.ChangeIndication?`: Current requirement to change the filter, based on its cleanliness. - `changeIndicationLifetime: FilterMonitoringTrait.ChangeIndication?`: Current requirement to change the filter, based on its lifetime. - `clusterRevision: UShort`: The revision of the server cluster specification. - `condition: UInt?`: The current condition of the filter based on percentage used. - `featureMap: FilterMonitoringTrait.FilterMonitoringFeature`: Whether the server supports zero or more optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. --- package: com.google.home.google.AudioInput --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AudioInput --- # interface AudioInput : AudioInputTrait.Attributes, MatterTrait API for the AudioInput trait. This trait supports devices that can gather audio (e.g., has a microphone). ### Nested types - `enum Attribute : Enum, Field`: Descriptor enum for this trait's attributes. ### Public functions - `supports(attribute: AudioInput.Attribute): Boolean` ### Public properties - `factory: TraitFactory` ### Inherited Attributes (from AudioInputTrait.Attributes) - `acceptedCommandList: List`: List of supported client-generated commands. - `attributeList: List`: List of supported attribute IDs. - `audioInputEnvironment: AudioInputTrait.AudioInputEnvironment?`: User's environment and the type of information that should be shared. - `audioInputQuality: AudioInputTrait.AudioInputQuality?`: Quality of the audio input the device supports. - `clusterRevision: UShort`: The revision of the server cluster specification. - `featureMap: UInt`: Whether the server supports zero or more optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. --- package: com.google.home.google.NetworkControlTrait.EnableDisableGuestNetworkCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.EnableDisableGuestNetworkCommand.Request --- # class NetworkControlTrait.EnableDisableGuestNetworkCommand.Request The request payload for the EnableDisableGuestNetwork command. ### Public constructors - `Request(enable: Boolean = false)`: Creates a request payload for the EnableDisableGuestNetwork command. ### Public properties - `enable: Boolean`: A value of `true` enables the guest network, `false` disables it. --- package: com.google.home.google.GoogleAirCoolerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleAirCoolerDevice.GoogleTraits --- # class GoogleAirCoolerDevice.GoogleTraits Trait Container for Google Traits. ### Public constructors - `GoogleTraits(traitProvider: TraitProvider)` ### Public properties - `extendedFanControl: ExtendedFanControl?`: For devices with extended fan controls. - `extendedThermostat: ExtendedThermostat?`: Extends the standard Matter Thermostat trait, covering both temperature point and modes. - `relativeHumidityControl: RelativeHumidityControl?`: For devices that support humidity settings (e.g., humidifiers, dehumidifiers). --- package: com.google.home.google.OpenCloseTrait.GoToOpenPercentageCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.GoToOpenPercentageCommand --- # object OpenCloseTrait.GoToOpenPercentageCommand : CommandDescriptor Open the device to a specific percentage, where 0 is closed and 100 is fully open. ### Nested types - `class Request`: The request payload for the GoToOpenPercentage command. ### Public properties - `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.ElevatorControlTrait.FloorNameSynonym --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ElevatorControlTrait.FloorNameSynonym --- # class ElevatorControlTrait.FloorNameSynonym : ClusterStruct Synonyms for this floor in a given language. ### Public constructors - `FloorNameSynonym(lang: String = "", synonyms: List = emptyList())`: Creates the FloorNameSynonym class. ### Public properties - `lang: String`: ISO 639-1 language code (e.g., `en` for English). - `synonyms: List`: Synonyms for this floor. The first is the default name in this language. --- package: com.google.home.google.Rotation --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Rotation --- # interface Rotation : RotationTrait.Attributes, MatterTrait, RotationCommands API for the Rotation trait. For devices that support rotation, specified in percentage or degrees (clockwise is default). ### Nested types - `enum Attribute : Enum, Field`: Descriptor enum for this trait's attributes. - `enum Command : Enum`: Descriptor enum for this trait's commands. ### Public functions - `supports(attribute: Rotation.Attribute): Boolean` - `supports(command: Rotation.Command): Boolean` ### Public properties - `factory: TraitFactory` ### Inherited Commands (from RotationCommands) - `suspend rotateToDegrees(rotationDegrees: Float): Unit`: Sets the absolute rotation in degrees. - `rotateToDegreesBatchable(rotationDegrees: Float): BatchableCommand`: Batchable version of `rotateToDegrees`. - `suspend rotateToPercentage(rotationPercent: Float): Unit`: Sets the absolute rotation in percentage. - `rotateToPercentageBatchable(rotationPercent: Float): BatchableCommand`: Batchable version of `rotateToPercentage`. ### Inherited Attributes (from RotationTrait.Attributes) - `acceptedCommandList: List`: List of supported client-generated commands. - `attributeList: List`: List of supported attribute IDs. - `clusterRevision: UShort`: The revision of the server cluster specification. - `featureMap: RotationTrait.RotationFeature`: Whether the server supports optional cluster features. - `generatedCommandList: List`: List of supported server-generated commands. - `rotationDegrees: Float?`: Current clockwise rotation in degrees. - `rotationDegreesRange: RotationTrait.RotationDegreesRange?`: Permitted rotation range in degrees. - `rotationPercent: Float?`: Current clockwise rotation in percentage. - `targetRotationPercent: Float?`: Intended rotation percentage of an ongoing change. --- package: com.google.home.google.TimerTrait.TimerCancelCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/TimerTrait.TimerCancelCommand --- # object TimerTrait.TimerCancelCommand : CommandDescriptor Cancels the device timer. ### Nested types - `class Request`: The request payload for the TimerCancel command. ### Public properties - `commandId: String`: Unique id corresponding to the command. --- package: com.google.home.google.NetworkControlTrait.NetworkControlFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.NetworkControlFeature --- # data class NetworkControlTrait.NetworkControlFeature NetworkControl trait FeatureMap. ### Public constructors - `NetworkControlFeature(supportsEnablingNetworkProfile: Boolean, supportsDisablingNetworkProfile: Boolean, supportsEnablingGuestNetwork: Boolean, supportsDisablingGuestNetwork: Boolean, supportsGettingGuestNetworkPassword: Boolean, supportsNetworkDownloadSpeedTest: Boolean, supportsNetworkUploadSpeedTest: Boolean)` ### Public functions - `toRaw(): ULong`: Convert this ClusterBitmap to raw (bytes) format. ### Public properties - `bitmapName: String`: Name of the Matter bitmap (e.g., "OnOffControlBitmap"). - `supportsDisablingGuestNetwork: Boolean`: Supports disabling the guest network. - `supportsDisablingNetworkProfile: Boolean`: Supports disabling network profiles. - `supportsEnablingGuestNetwork: Boolean`: Supports enabling the guest network. - `supportsEnablingNetworkProfile: Boolean`: Supports enabling network profiles. - `supportsGettingGuestNetworkPassword: Boolean`: Supports getting the guest network password. - `supportsNetworkDownloadSpeedTest: Boolean`: Supports testing network download speed. - `supportsNetworkUploadSpeedTest: Boolean`: Supports testing network upload speed. - `traitId: String`: Trait identifier of the Matter Cluster. --- package: com.google.home.google.OpenCloseTrait.OpenCloseErrorFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenCloseTrait.OpenCloseErrorFollowUp --- # interface OpenCloseTrait.OpenCloseErrorFollowUp ### Public properties - `errorCode: String?` --- package: com.google.home.google.Toggles.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Toggles.Attribute --- # enum Toggles.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `currentToggleSettings`: The `currentToggleSettings` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. - `supportedToggles`: The `supportedToggles` trait attribute. ### Public companion properties - `StructDescriptor: StructDescriptor` --- package: com.google.home.google.Brightness.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Brightness.Attribute --- # enum Brightness.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `currentBrightnessPercent`: The `currentBrightnessPercent` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. ### Companion Properties - `StructDescriptor`: `StructDescriptor` ### Functions - `valueOf(value: String)`: Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `descriptor`: `open Descriptor` - `fieldName`: `open String` - `isNullable`: `Boolean` - `tag`: `open UInt` - `typeEnum`: `open Type` - `typeName`: `open String` --- package: com.google.home.google.Cook.Command --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Cook.Command --- # enum Cook.Command : Enum Descriptor enum for this trait's commands. ### Enum Values - `Cook`: The Cook.cook trait command. ### Functions - `valueOf(value: String)`: `Cook.Command` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `tag`: `UInt` --- package: com.google.home.google.Dock.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Dock.Attribute --- # enum Dock.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. - `isDocked`: The `isDocked` trait attribute. ### Companion Properties - `StructDescriptor`: `StructDescriptor` ### Functions - `valueOf(value: String)`: `Dock.Attribute` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `descriptor`: `open Descriptor` - `fieldName`: `open String` - `isNullable`: `Boolean` - `tag`: `open UInt` - `typeEnum`: `open Type` - `typeName`: `open String` --- package: com.google.home.google.GooglePetFeederDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePetFeederDevice --- # class GooglePetFeederDevice : DeviceType A device that automatically dispenses food to house pets such as cats and dogs. Interactions with pet feeders may include dispensing pet food or water in various quantities and presets. ### Nested Types - `class GooglePetFeederDevice.GoogleTraits`: Trait Container for Google Traits. - `class GooglePetFeederDevice.StandardTraits`: Trait Container for Standard Traits. ### Constructors - `GooglePetFeederDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GooglePetFeederDevice.GoogleTraits, standardTraits: GooglePetFeederDevice.StandardTraits)`: Creates the GooglePetFeederDevice class. ### Properties - `factory`: `open DeviceTypeFactory` - `googleTraits`: `GooglePetFeederDevice.GoogleTraits` - `metadata`: `open DeviceType.Metadata` - `standardTraits`: `GooglePetFeederDevice.StandardTraits` ### Inherited Functions - **From `com.google.home.HasEvents`** - `events()`: `open Flow` - Gets a flow of all Events available for the object. - `events(event: EventFactory)`: `open Flow` - Gets a flow of a specific Event. - `events(trait: TraitFactory)`: `open Flow` - Gets a flow of all Events by this `Trait`. - **From `com.google.home.TraitProvider`** - `metadata(traitFactory: TraitFactory)`: `open Trait.TraitMetadata?` - Access a specific trait metadata on the provider. - `trait(traitFactory: TraitFactory)`: `open T?` - Access a specific trait on the provider. - `traits()`: `open Set` - Returns a subset of traits present in the `HomeConfig.factoryRegistry`. ### Inherited Properties - **From `com.google.home.DeviceType`** - `traitProvider`: `TraitProvider` --- package: com.google.home.google.Cook --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Cook --- # interface Cook : CookTrait.Attributes, MatterTrait, CookCommands API for the Cook trait. This trait belongs to devices that can cook food according to various food presets and supported cooking modes. ### Nested Types - `enum Cook.Attribute`: Descriptor enum for this trait's attributes. - `enum Cook.Command`: Descriptor enum for this trait's commands. ### Functions - `supports(attribute: Cook.Attribute)`: `Boolean` - `supports(command: Cook.Command)`: `Boolean` ### Properties - `factory`: `open TraitFactory` ### Inherited Functions - **From `com.google.home.google.CookCommands`** - `cook(start: Boolean, cookingMode: CookTrait.CookingMode, foodPreset: String, quantity: Float, unit: CookTrait.Unit)`: `suspend CookTrait.CookCommand.Response` - Start or stop cooking. - `cookBatchable(start: Boolean, cookingMode: CookTrait.CookingMode, foodPreset: String, quantity: Float, unit: CookTrait.Unit)`: `BatchableCommand` - The batchable version of `cook` command. - **From `com.google.home.TraitStateInvalidation`** - `forceRead()`: `suspend Unit` ### Inherited Properties - **From `com.google.home.google.CookTrait.Attributes`** - `acceptedCommandList`: `List` - List of supported client-generated commands. - `attributeList`: `List` - List of supported attribute IDs. - `clusterRevision`: `UShort` - The revision of the server cluster specification. - `currentCookingMode`: `CookTrait.CookingMode?` - The current cooking mode. - `currentFoodPreset`: `String?` - The current food cooking in the device. - `currentFoodQuantity`: `Float?` - The current amount of food cooking. - `currentFoodUnit`: `CookTrait.Unit?` - The unit for `currentFoodQuantity`. - `featureMap`: `UInt` - Supported optional cluster features. - `foodPresets`: `List?` - Presets for certain types of food. - `generatedCommandList`: `List` - List of supported server-generated commands. - `supportedCookingModes`: `List?` - Supported cooking modes. - **From `com.google.home.Trait`** - `metadata`: `Trait.TraitMetadata` --- package: com.google.home.google.ExtendedThermostatTrait.ExtendedProgrammingOperationMode --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedThermostatTrait.ExtendedProgrammingOperationMode --- # data class ExtendedThermostatTrait.ExtendedProgrammingOperationMode Thermostat-extended operation modes. ### Constructors - `ExtendedProgrammingOperationMode(safetyOverride: Boolean = false, preconditioningSchedule: Boolean = false, preconditioningEnergyProgram: Boolean = false)` ### Functions - `toRaw()`: `open ULong` - Convert this ClusterBitmap to raw (bytes) format. ### Properties - `bitmapName`: `String` - Name of the Matter bitmap (e.g., "OnOffControlBitmap"). - `preconditioningEnergyProgram`: `Boolean` - The thermostat is preconditioning due to an upcoming energy program event. - `preconditioningSchedule`: `Boolean` - The thermostat is preconditioning for an upcoming scheduled event. - `safetyOverride`: `Boolean` - The thermostat is heating or cooling due to safety thresholds. - `traitId`: `String` - Trait identifier of the Matter Cluster that defines the bitmap. --- package: com.google.home.google.GoogleSousVideDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleSousVideDevice.GoogleTraits --- # class GoogleSousVideDevice.GoogleTraits Trait Container for Google Traits. ### Constructors - `GoogleTraits(traitProvider: TraitProvider)` ### Properties - `cook`: `Cook?` - Trait for devices that can cook food with presets and modes. - `extendedOperationalState`: `ExtendedOperationalState?` - Trait for devices with specific operating zones and queryable duration. - `timer`: `Timer?` - Trait to control a built-in timer on a device. --- package: com.google.home.google.ObjectDetectionTrait.ObjectDetectionFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ObjectDetectionTrait.ObjectDetectionFeature --- # data class ObjectDetectionTrait.ObjectDetectionFeature ### Constructors - `ObjectDetectionFeature(faceDetection: Boolean = false, personDetection: Boolean = false, packageDetection: Boolean = false, animalDetection: Boolean = false, vehicleDetection: Boolean = false)` ### Functions - `toRaw()`: `open ULong` - Convert this ClusterBitmap to raw (bytes) format. ### Properties - `animalDetection`: `Boolean` - `bitmapName`: `String` - Name of the Matter bitmap (e.g., "OnOffControlBitmap"). - `faceDetection`: `Boolean` - `packageDetection`: `Boolean` - `personDetection`: `Boolean` - `traitId`: `String` - Trait identifier of the Matter Cluster that defines the bitmap. - `vehicleDetection`: `Boolean` --- package: com.google.home.google.GoogleBathtubDevice --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleBathtubDevice --- # class GoogleBathtubDevice : DeviceType A device that can be filled and drained, possibly to particular levels if the bathtub supports it. ### Nested Types - `class GoogleBathtubDevice.GoogleTraits`: Trait Container for Google Traits. - `class GoogleBathtubDevice.StandardTraits`: Trait Container for Standard Traits. ### Constructors - `GoogleBathtubDevice(metadata: DeviceType.Metadata, traitProvider: TraitProvider, eventProvider: HasEvents, googleTraits: GoogleBathtubDevice.GoogleTraits, standardTraits: GoogleBathtubDevice.StandardTraits)`: Creates the GoogleBathtubDevice class. ### Properties - `factory`: `open DeviceTypeFactory` - `googleTraits`: `GoogleBathtubDevice.GoogleTraits` - `metadata`: `open DeviceType.Metadata` - `standardTraits`: `GoogleBathtubDevice.StandardTraits` ### Inherited Functions - **From `com.google.home.HasEvents`** - `events()`: `open Flow` - Gets a flow of all Events available for the object. - `events(event: EventFactory)`: `open Flow` - Gets a flow of a specific Event. - `events(trait: TraitFactory)`: `open Flow` - Gets a flow of all Events by this `Trait`. - **From `com.google.home.TraitProvider`** - `metadata(traitFactory: TraitFactory)`: `open Trait.TraitMetadata?` - Access a specific trait metadata on the provider. - `trait(traitFactory: TraitFactory)`: `open T?` - Access a specific trait on the provider. - `traits()`: `open Set` - Returns a subset of traits present in the `HomeConfig.factoryRegistry`. ### Inherited Properties - **From `com.google.home.DeviceType`** - `traitProvider`: `TraitProvider` --- package: com.google.home.google.GooglePressureCookerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePressureCookerDevice.StandardTraits --- # class GooglePressureCookerDevice.StandardTraits Trait Container for Standard Traits. ### Constructors - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `onOff`: `OnOff?` - This trait provides an interface for turning devices on and off. --- package: com.google.home.google.LightEffectsTrait.SleepEffectSetCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffectsTrait.SleepEffectSetCommand --- # object LightEffectsTrait.SleepEffectSetCommand : CommandDescriptor Activates the sleep effect. See also `sleepEffectSet`. ### Nested Types - `class LightEffectsTrait.SleepEffectSetCommand.Request`: The request payload for the SleepEffectSet command. ### Properties - `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.ExtendedDoorLockTrait.PrivacyModeStateChange --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedDoorLockTrait.PrivacyModeStateChange --- # interface ExtendedDoorLockTrait.PrivacyModeStateChange Event to indicate privacy mode change. ### Properties - `privacy_mode_actor`: `ExtendedDoorLockTrait.PrivacyModeActor?` - Describes who and what last caused the privacy mode state to change. - `privacy_mode_on`: `Boolean?` - The current state for privacy mode on the device. --- package: com.google.home.google.RelativeHumidityControlTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RelativeHumidityControlTrait.Attributes --- # interface RelativeHumidityControlTrait.Attributes Attributes for the RelativeHumidityControl cluster. Direct subclass: `RelativeHumidityControl`. ### Properties - `acceptedCommandList`: `List` - List of supported client-generated commands. - `attributeList`: `List` - List of supported attribute IDs. - `clusterRevision`: `UShort` - The revision of the server cluster specification. - `featureMap`: `UInt` - Supported optional cluster features. - `generatedCommandList`: `List` - List of supported server-generated commands. - `maxRelativeHumidity`: `UInt?` - The maximum humidity level as a percentage. (Read-only) - `minRelativeHumidity`: `UInt?` - The minimum humidity level as a percentage. (Read-only) - `relativeHumiditySetpoint`: `UInt?` - The current target humidity percentage of the device. (Read-only) --- package: com.google.home.google.LocatorTrait.LocateCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LocatorTrait.LocateCommand.Request --- # class LocatorTrait.LocateCommand.Request The request payload for the Locate command. ### Constructors - `Request(lang: String = "", reportLocation: Boolean = false)` ### Properties - `lang`: `String` - Current language of query or display. - `reportLocation`: `Boolean` - Indicates that coordinates are expected in the response and the device should not ring. --- package: com.google.home.google.ExtendedMediaInputTrait.PreviousInputCommand.Request --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaInputTrait.PreviousInputCommand.Request --- # class ExtendedMediaInputTrait.PreviousInputCommand.Request The request payload for the PreviousInput command. ### Constructors - `Request()` --- package: com.google.home.google.ExtendedFanControlTrait.AvailableFanSpeeds --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedFanControlTrait.AvailableFanSpeeds --- # class ExtendedFanControlTrait.AvailableFanSpeeds : ClusterStruct The speed settings supported by the device. ### Constructors - `AvailableFanSpeeds(ordered: Boolean = false, speeds: List = emptyList())` ### Functions - `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties - `ordered`: `Boolean` - Indicates that the `speeds` list is in ascending speed order. - `speeds`: `List` - List of speed settings. --- package: com.google.home.google.AudioInputTrait.AudioInputEnvironment --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AudioInputTrait.AudioInputEnvironment --- # enum AudioInputTrait.AudioInputEnvironment : Enum, ClusterEnum The user's audio input environment of the device. ### Enum Values - `AuthenticatedUserOnly`: The user's audio environment requires privacy. - `SurroundingUsers`: The user's audio environment includes surrounding users. - `UnknownValue`: The enum value is out of range. - `Unspecified`: The user's audio environment is unspecified. ### Functions - `valueOf(value: String)`: `AudioInputTrait.AudioInputEnvironment` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `traitId`: `open String` - Trait identifier of the Matter Cluster that defines the enum. - `typeName`: `open String` - Name of the Matter Data Type that the enum belongs to. - `value`: `open ULong` - Integer identifier of the enum value per the Matter spec. --- package: com.google.home.google.Time.RecurringClockTimeScheduledEvent.EventFields --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Time.RecurringClockTimeScheduledEvent.EventFields --- # enum Time.RecurringClockTimeScheduledEvent.EventFields : Enum, Field ### Enum Values - `cronExpression` ### Functions - `valueOf(value: String)`: `Time.RecurringClockTimeScheduledEvent.EventFields` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `descriptor`: `open Descriptor` - `fieldName`: `open String` - `isNullable`: `Boolean` - `tag`: `open UInt` - `typeEnum`: `open Type` - `typeName`: `open String` --- package: com.google.home.google.ExtendedAirQualityTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.Attributes --- # interface ExtendedAirQualityTrait.Attributes Attributes for the ExtendedAirQuality cluster. Direct subclass: `ExtendedAirQuality`. ### Properties - `acceptedCommandList`: `List` - List of supported client-generated commands. - `attributeList`: `List` - List of supported attribute IDs. - `clusterRevision`: `UShort` - The revision of the server cluster specification. - `featureMap`: `UInt` - Supported optional cluster features. - `generatedCommandList`: `List` - List of supported server-generated commands. - `indoorAirQuality`: `ExtendedAirQualityTrait.AirQualityLevel?` - Current descriptive air quality measured indoor. (Read-only) - `indoorMeasuredValue`: `Int?` - Currently measured AQI as a numeric value (indoor). (Read-only) - `maxMeasuredValue`: `Int?` - The maximum possible value of the measured value. (Read-only) - `measuredValue`: `Int?` - Currently measured AQI as a numeric value. (Read-only) - `minMeasuredValue`: `Int?` - The minimum possible value of the measured value. (Read-only) - `outdoorAirQuality`: `ExtendedAirQualityTrait.AirQualityLevel?` - Current descriptive air quality measured outdoor. (Read-only) - `outdoorMeasuredValue`: `Int?` - Currently measured AQI as a numeric value (outdoor). (Read-only) - `tolerance`: `Int?` - Tolerance of the measured value. (Read-only) --- package: com.google.home.google.ExtendedAirQualityTrait.AirQuality --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.AirQuality --- # interface ExtendedAirQualityTrait.AirQuality Notification of the current air quality level. ### Properties - `levelValue`: `ExtendedAirQualityTrait.AirQualityLevel?` - Descriptive air quality level value. - `location`: `ExtendedAirQualityTrait.MeasurementLocation?` - The location where air quality is measured. - `priority`: `Int?` - Represents the notification level (0 for spoken aloud). - `triggeredDeviceId`: `String?` - The ID of the device that triggered the event. --- package: com.google.home.google.GoogleStandmixerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStandmixerDevice.StandardTraits --- # class GoogleStandmixerDevice.StandardTraits Trait Container for Standard Traits. ### Constructors - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `onOff`: `OnOff?` - Trait for turning devices on and off. - `operationalState`: `OperationalState?` - Trait for monitoring and changing the operational state of a device. --- package: com.google.home.google.RebootTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RebootTrait.Attributes --- # interface RebootTrait.Attributes Attributes for the Reboot cluster. Direct subclass: `Reboot`. ### Properties - `acceptedCommandList`: `List` - List of supported client-generated commands. - `attributeList`: `List` - List of supported attribute IDs. - `clusterRevision`: `UShort` - The revision of the server cluster specification. - `featureMap`: `UInt` - Supported optional cluster features. - `generatedCommandList`: `List` - List of supported server-generated commands. --- package: com.google.home.google.ExtendedPowerSource.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedPowerSource.Attribute --- # enum ExtendedPowerSource.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList` - `attributeList` - `batterySaverEnabled` - `capacityRemaining` - `capacityUntilFull` - `chargeSpeed` - `clusterRevision` - `descriptiveCapacityRemaining` - `energySource` - `energyStorageDistanceUnitForUx` - `featureMap` - `generatedCommandList` - `isPluggedIn` - `usingBackupEnergySource` ### Companion Properties - `StructDescriptor`: `StructDescriptor` ### Functions - `valueOf(value: String)`: `ExtendedPowerSource.Attribute` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `descriptor`: `open Descriptor` - `fieldName`: `open String` - `isNullable`: `Boolean` - `tag`: `open UInt` - `typeEnum`: `open Type` - `typeName`: `open String` --- package: com.google.home.google.NotificationTrait.SendNotificationsCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NotificationTrait.SendNotificationsCommand --- # object NotificationTrait.SendNotificationsCommand : CommandDescriptor Send a notification to structure members. ### Nested Types - `interface OptionalArgs`: Optional arguments for the SendNotificationsCommand.Request. - `class SendNotificationsCommandRequest`: The request payload for the Notification command. - `enum SendNotificationsCommandRequest.CommandFields`: Enum for command fields. ### Properties - `commandId`: `open String` - Unique id corresponding to the command. --- package: com.google.home.google.AudioInput.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/AudioInput.Attribute --- # enum AudioInput.Attribute : Enum, Field Descriptor enum for this trait's attributes. ### Enum Values - `acceptedCommandList`: The `acceptedCommandList` trait attribute. - `attributeList`: The `attributeList` trait attribute. - `audioInputEnvironment`: The `audioInputEnvironment` trait attribute. - `audioInputQuality`: The `audioInputQuality` trait attribute. - `clusterRevision`: The `clusterRevision` trait attribute. - `featureMap`: The `featureMap` trait attribute. - `generatedCommandList`: The `generatedCommandList` trait attribute. ### Companion Properties - `StructDescriptor`: `StructDescriptor` ### Functions - `valueOf(value: String)`: `AudioInput.Attribute` - Returns the enum constant of this type with the specified name. - `values()`: `Array` - Returns an array containing the constants of this enum type. ### Properties - `descriptor`: `open Descriptor` - `fieldName`: `open String` - `isNullable`: `Boolean` - `tag`: `open UInt` - `typeEnum`: `open Type` - `typeName`: `open String` --- package: com.google.home.google.FillTrait.AvailableFillLevels --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/FillTrait.AvailableFillLevels --- # class FillTrait.AvailableFillLevels : ClusterStruct The available fill levels. ### Constructors - `AvailableFillLevels(levels: List = emptyList(), ordered: Boolean = false)` ### Functions - `getDescriptor()`: `open StructDescriptor` - Returns the descriptor for the struct. - `getFieldValueById(tagId: UInt)`: `open Any?` - Returns the value of the field for the given tag ID. ### Properties - `levels`: `List` - List of level names and language-specific synonyms. - `ordered`: `Boolean` - If `true`, the device handles additional grammar for increase or decrease logic. --- package: com.google.home.google.GoogleStreamingStickDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleStreamingStickDevice.StandardTraits --- # class GoogleStreamingStickDevice.StandardTraits Trait Container for Standard Traits. ### Constructors - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `levelControl`: `LevelControl?` - Trait for controlling a characteristic that can be set to a level. - `mediaPlayback`: `MediaPlayback?` - Trait for controlling media playback (play, pause, etc.). - `onOff`: `OnOff?` - Trait for turning devices on and off. --- package: com.google.home.google.GoogleWaterSoftenerDevice.StandardTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWaterSoftenerDevice.StandardTraits --- # class GoogleWaterSoftenerDevice.StandardTraits Trait Container for Standard Traits. ### Constructors - `StandardTraits(traitProvider: TraitProvider)` ### Properties - `onOff`: `OnOff?` - This trait provides an interface for turning devices on and off. --- package: com.google.home.google.ExtendedAirQualityTrait.AirQualitySensorError --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedAirQualityTrait.AirQualitySensorError --- # interface ExtendedAirQualityTrait.AirQualitySensorError Notification of an error with the air quality sensor. ### Properties - `errorCode`: `String?` - The air quality sensor's error code. - `priority`: `Int?` - Represents the notification level (0 for spoken aloud). --- package: com.google.home.google.LockUnlockTrait.LockFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LockUnlockTrait.LockFollowUp --- # interface LockUnlockTrait.LockFollowUp Follow up response for the `lock` command. --- package: com.google.home.google.NetworkControlTrait.TestNetworkSpeedFollowUp --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/NetworkControlTrait.TestNetworkSpeedFollowUp --- ### interface NetworkControlTrait.TestNetworkSpeedFollowUp > The follow-up event for the `TestNetworkSpeed` command. #### Public properties * `errorCode: String?` - The error encountered when processing the command. * `networkDownloadSpeedMbps: Float?` - The network download speed measured in megabits per second. * `networkUploadSpeedMbps: Float?` - The network upload speed measured in megabits per second. * `status: NetworkControlTrait.SpeedTestStatus?` - The result status of the command. --- package: com.google.home.google.RotationTrait.RotationFeature --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.RotationFeature --- ### data class RotationTrait.RotationFeature > Rotation trait FeatureMap. #### Public constructor * `RotationFeature(supportsDegreesRotation: Boolean = false, supportsPercentRotation: Boolean = false, supportsContinuousRotation: Boolean = false)` - Creates the RotationFeature data class. #### Public functions * `toRaw(): ULong` - Convert this ClusterBitmap to raw (bytes) format. #### Public properties * `bitmapName: String` - Name of the Matter bitmap, in UpperCamelCase (e.g. "OnOffControlBitmap"). * `supportsContinuousRotation: Boolean` - Indicates if this device supports continuous rotation. * `supportsDegreesRotation: Boolean` - Indicates if this device supports rotation by degrees. * `supportsPercentRotation: Boolean` - Indicates if this device supports rotation by percentage. * `traitId: String` - Trait identifier of the Matter Cluster that defines the bitmap Data Type. --- package: com.google.home.google.SpeedMeasurementTrait.MeasurementUnit --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/SpeedMeasurementTrait.MeasurementUnit --- ### enum SpeedMeasurementTrait.MeasurementUnit > The speed measurement unit. #### Enum Values * `RotationsPerMinute` - Rotations per minute. * `UnknownValue` - The enum value is out of range. * `Unspecified` - Unspecified. #### Public properties * `traitId: String` - Trait identifier of the Matter Cluster that defines the enum Data Type. * `typeName: String` - Name of the Matter Data Type that the enum belongs to. * `value: ULong` - Integer identifier of the enum value per the Matter Application Clusters spec. --- package: com.google.home.google.ExtendedColorControlTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedColorControlTrait.Attributes --- ### interface ExtendedColorControlTrait.Attributes > Attributes for the ExtendedColorControl cluster. #### Public properties * `acceptedCommandList: List` - A list of client-generated commands supported by this cluster server instance. * `attributeList: List` - A list of the attribute IDs of the attributes supported by the cluster instance. * `clusterRevision: UShort` - The revision of the server cluster specification supported by the cluster instance. * `colorLoopEndTimestampSeconds: ULong?` - Unix timestamp when the color loop effect is expected to end. * `currentBlue: UByte?` - The current color of blue in RGB semantics, with a range of 0 to 255. * `currentGreen: UByte?` - The current color of green in RGB semantics, with a range of 0 to 255. * `currentHue: Float?` - The current hue in HSV semantics, with a range of 0 to 360. * `currentName: String?` - Name of the current color. * `currentRed: UByte?` - The current color of red in RGB semantics, with a range of 0 to 255. * `currentSaturation: Float?` - The current saturation in HSV semantics, with a range of 0 to 1. * `currentValue: Float?` - The current value in HSV semantics, with a range of 0 to 1. * `featureMap: UInt` - Whether the server supports zero or more optional cluster features. * `generatedCommandList: List` - A list of server-generated commands supported by this cluster server instance. --- package: com.google.home.google.RotationTrait.RotateToPercentageCommand --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/RotationTrait.RotateToPercentageCommand --- ### object RotationTrait.RotateToPercentageCommand > Sets the absolute rotation in percentage. #### Nested types * `class Request` - The request payload for the RotateToPercentage command. #### Public properties * `commandId: String` - Unique id corresponding to the command. --- package: com.google.home.google.MediaActivityState.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MediaActivityState.Attribute --- ### enum MediaActivityState.Attribute > Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `activityState` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` #### Public companion properties * `StructDescriptor: StructDescriptor` #### Public properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.GoogleRouterDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleRouterDevice.GoogleTraits --- ### class GoogleRouterDevice.GoogleTraits > Trait Container for Google Traits. #### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` #### Public properties * `networkControl: NetworkControl?` - Trait for devices that can report network data and perform network-specific operations. * `reboot: Reboot?` - Trait for devices that support rebooting. * `softwareUpdate: SoftwareUpdate?` - Trait for devices that support software updates. --- package: com.google.home.google.MotionDetectionTrait.MotionDetected --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/MotionDetectionTrait.MotionDetected --- ### interface MotionDetectionTrait.MotionDetected > Proactive notification that occurs when the system detects motion. #### Public properties * `motionDetectionEndTimestampMillis: Long?` - The Unix Epoch timestamp in milliseconds at which motion was last detected. * `motionDetectionStartTimestampMillis: Long?` - The Unix Epoch timestamp in milliseconds at which motion was first detected. * `motionDetectionTimestampSeconds: Long?` - The Unix Epoch timestamp in seconds at which motion was detected. * `priority: UInt?` - The notification level. (0 indicates the notification should be spoken). --- package: com.google.home.google.LightEffects.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/LightEffects.Attribute --- ### enum LightEffects.Attribute > Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `defaultSleepDurationSeconds` * `defaultWakeDurationSeconds` * `effectEndTimestampSeconds` * `featureMap` * `generatedCommandList` * `pulseEffectSet` * `sleepEffectSet` * `wakeEffectSet` #### Public companion properties * `StructDescriptor: StructDescriptor` #### Public properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.GoogleWaterSoftenerDevice.GoogleTraits --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/GoogleWaterSoftenerDevice.GoogleTraits --- ### class GoogleWaterSoftenerDevice.GoogleTraits > Trait Container for Google Traits. #### Public constructor * `GoogleTraits(traitProvider: TraitProvider)` #### Public properties * `filterMonitoring: FilterMonitoring?` - Provides an interface for monitoring the current condition of a filter. * `preFilterMonitoring: PreFilterMonitoring?` - Provides an interface to pre-filter state monitoring. --- package: com.google.home.google.OpenClose.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/OpenClose.Attribute --- ### enum OpenClose.Attribute > Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `featureMap` * `generatedCommandList` * `openPercent` * `openState` * `supportedDirections` * `targetOpenPercent` #### Public companion properties * `StructDescriptor: StructDescriptor` #### Public properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.ExtendedLevelControl --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedLevelControl --- ### interface ExtendedLevelControl > API for the ExtendedLevelControl trait, for devices which have a volume control. #### Nested types * `enum ExtendedLevelControl.Attribute` - Descriptor enum for this trait's attributes. #### Public functions * `supports(attribute: ExtendedLevelControl.Attribute): Boolean` #### Public properties * `factory: TraitFactory` #### Inherited from ExtendedLevelControlTrait.Attributes * `acceptedCommandList: List` - List of supported client-generated commands. * `attributeList: List` - List of supported attribute IDs. * `clusterRevision: UShort` - The server cluster specification revision. * `defaultStepSize: UInt?` - The default step size for relative volume queries. * `featureMap: UInt` - Bitmap of supported optional cluster features. * `generatedCommandList: List` - List of supported server-generated commands. --- package: com.google.home.google.ExtendedChannelTrait.Attributes --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedChannelTrait.Attributes --- ### interface ExtendedChannelTrait.Attributes > Attributes for the ExtendedChannel cluster. #### Public properties * `acceptedCommandList: List` - A list of client-generated commands supported by this cluster server instance. * `attributeList: List` - A list of the attribute IDs of the attributes supported by the cluster instance. * `channelCatalog: String?` - An identifier of a catalog with channels information. * `clusterRevision: UShort` - The revision of the server cluster specification supported by the cluster instance. * `extendedChannelList: List?` - List of objects describing available media channels for this device. * `featureMap: UInt` - Whether the server supports zero or more optional cluster features. * `generatedCommandList: List` - A list of server-generated commands supported by this cluster server instance. --- package: com.google.home.google.ExtendedMediaPlayback.Attribute --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/ExtendedMediaPlayback.Attribute --- ### enum ExtendedMediaPlayback.Attribute > Descriptor enum for this trait's attributes. #### Enum Values * `acceptedCommandList` * `attributeList` * `clusterRevision` * `extendedCurrentState` * `featureMap` * `generatedCommandList` #### Public companion properties * `StructDescriptor: StructDescriptor` #### Public properties * `descriptor: Descriptor` * `fieldName: String` * `isNullable: Boolean` * `tag: UInt` * `typeEnum: Type` * `typeName: String` --- package: com.google.home.google.Time --- --- source: https://developers.home.google.com/reference/kotlin/com/google/home/google/Time --- ### class Time > Represents time at a structure's location, including current time, date, sunrise, and sunset. #### Nested types * `enum Time.Attribute` - Descriptor enum for this trait's attributes. * `enum Time.LocalDateAttribute` * `class Time.RecurringClockTimeScheduledEvent` - An event sent at a pre-scheduled time, with cron-based recurrence. * `class Time.RecurringSolarTimeScheduledEvent` - An event sent at a pre-scheduled solar time, with cron-based recurrence. * `class Time.ScheduledTimeEvent` - An event sent at a pre-scheduled time. #### Public properties * `factory: TraitFactory