    struct HomeDevice

    extension HomeDevice : Copyable, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/CustomAppDataSupporting.html, Equatable, Escapable, Hashable, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HomeObject.html, HomeObjectImpl, Identifiable, ObjectDataRepresentable, Sendable, SendableMetatype

A single smart home device.
- `


  ### [customAppData](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV13customAppDataAA06CustomfG0Vvp)


  ` The custom app data for the object.

  #### Declaration

  Swift

      var customAppData: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/CustomAppData.html { get async throws }

- `


  ### [objectType](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV10objectTypeAA0b6ObjectF0Ovp)


  ` Instance-level accessor for an object's HomeObjectType.

  #### Declaration

  Swift

      let objectType: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Enums/HomeObjectType.html

- `


  ### [id](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV2idSSvp)


  ` Per-Home-unique identifier for this object.

  #### Declaration

  Swift

      let id: String

- `


  ### [name](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV4nameSSvp)


  ` Undocumented

  #### Declaration

  Swift

      var name: String { get }

- `


  ### [structureID](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV11structureIDSSSgvp)


  ` The structure this device is assigned to, `nil` if unassigned.

  #### Declaration

  Swift

      var structureID: String? { get }

- `


  ### [roomID](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV6roomIDSSSgvp)


  ` The room this device is assigned to, `nil` if unassigned.

  #### Declaration

  Swift

      var roomID: String? { get }

- `


  ### [agentID](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV7agentIDSSSgvp)


  ` The agent ID of the device.

  #### Declaration

  Swift

      let agentID: String?

- `


  ### [parts](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV5partsAA0D14TypeControllerCvp)


  ` An alias for `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html#/s:13GoogleHomeSDK0B6DeviceV5typesAA0D14TypeControllerCvp` that matches the public API for `parts` on `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HomeObject.html`. Parts and
  DeviceTypes are equivalent concepts.

  #### Declaration

  Swift

      var parts: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/DeviceTypeController.html { get }

- `


  ### [traits](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV6traitsAA15TraitController_pvp)


  ` A controller for dynamically reading and subscribing to traits on this device.

  #### Declaration

  Swift

      @available(*, deprecated, message: "This API is experimental and is subject to change.")
      let traits: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/TraitController.html

- `


  ### [types](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV5typesAA0D14TypeControllerCvp)


  ` A controller that provides access to the types supported by this device.
  This will be deprecated in favor of `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html#/s:13GoogleHomeSDK0B6DeviceV5partsAA0D14TypeControllerCvp` in future releases.

  #### Declaration

  Swift

      let types: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/DeviceTypeController.html

- `


  ### [isMatterDevice](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV08isMatterD0Sbvp)


  ` Whether this device is backed by Matter.

  #### Declaration

  Swift

      let isMatterDevice: Bool

- `


  ### [sourceConnectivity](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV18sourceConnectivityAA06SourceF0Vvp)


  ` Information about the connectivity of this device.

  This is calculated based on the connectivity of its underlying components.

  #### Declaration

  Swift

      var sourceConnectivity: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/SourceConnectivity.html

- `


  ### [tags](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV4tagsShyAA11SemanticTagVGvp)


  ` The tags of all the top-level device types.

  #### Declaration

  Swift

      var tags: Set<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/SemanticTag.html>

- `


  ### [enableMultipartDevices](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV22enableMultipartDevicesSbvp)


  ` Whether this device is created with multipart device support enabled.

  #### Declaration

  Swift

      var enableMultipartDevices: Bool { get }

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV2eeoiySbAC_ACtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (lhs: HomeDevice, rhs: HomeDevice) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV4hash4intoys6HasherVz_tF)


  ` Hashes the essential components of this value by feeding them into the
  given hasher.

  Implement this method to conform to the `Hashable` protocol. The
  components used for hashing must be the same as the components compared
  in your type's `==` operator implementation. Call `hasher.combine(_:)`
  with each of these components.
  Important

  In your implementation of `hash(into:)`,
  don't call `finalize()` on the `hasher` instance provided,
  or replace it with a different instance.
  Doing so may become a compile-time error in the future.

  #### Declaration

  Swift

      func hash(into hasher: inout Hasher)

- `


  ### [setName(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV7setNameyACSSYaKF)


  ` Change the device name to the given value

  #### Declaration

  Swift

      func setName(_ name: String) async throws -> HomeDevice

  #### Parameters

  |---|---|
  | ` name ` | The new name for the device. |

  #### Return Value

  The updated device.
- `


  ### [DecommissionEligibility](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice/DecommissionEligibility.html)


  ` Undocumented

  #### Declaration

  Swift

      enum DecommissionEligibility

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html.DecommissionEligibility : Equatable, Hashable, Sendable, SendableMetatype

- `


  ### [DecommissionSideEffect](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice/DecommissionSideEffect.html)


  ` Undocumented

  #### Declaration

  Swift

      enum DecommissionSideEffect

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html.DecommissionSideEffect : Equatable, Hashable, Sendable, SendableMetatype

- `


  ### [DecommissionIneligibleReason](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice/DecommissionIneligibleReason.html)


  ` Undocumented

  #### Declaration

  Swift

      enum DecommissionIneligibleReason

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice.html.DecommissionIneligibleReason : Equatable, Hashable, Sendable, SendableMetatype

- `


  ### [decommissionEligibility](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV23decommissionEligibilityAC012DecommissionF0Ovp)


  ` Whether the device can be decommissioned.

  #### Declaration

  Swift

      var decommissionEligibility: HomeDevice.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice/DecommissionEligibility.html { get async throws }

- `


  ### [decommission()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV12decommissionShySSGyYaKF)


  ` Initiates the decommissioning process for this device.

  If the device requires consent for decommissioning (e.g. some cameras), this method will
  automatically initiate the consent flow (e.g. opening a captive WebView) and retry if consent
  is granted.

  The return value will reflect the result of the decommissioning process:
  - If this is a plain matter device, it will contain a single device ID.
  - If this is a bridge, it will contain the IDs of all the bridged devices, as well as the bridge device ID. Note that in the case of bridges, the decommissioning operation is atomic, either all devices are decommissioned, or none are.
  - If this device is one of multiple logical devices derived from a single physical device,
    it will contain the IDs of all the decommissioned HomeDevices.

  Throws

  `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html`, which will have a `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Enums/DecommissionError.html` subtype if a domain specific
  error occurs.

  #### Declaration

  Swift

      func decommission() async throws -> Set<String>

- `


  ### [automationPart(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeDevice#/s:13GoogleHomeSDK0B6DeviceV14automationPartyAA010AutomationF4PathVSgAA0D4Type_pF)


  ` Returns the `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AutomationPartPath.html` for a given `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType.html` instance, which can be any
  descendant part of the root device this is called on.

  #### Declaration

  Swift

      func automationPart(_ deviceType: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType.html) -> https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AutomationPartPath.html?

  #### Parameters

  |---|---|
  | ` deviceType ` | The `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType.html` instance to find the `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AutomationPartPath.html` for. |

  #### Return Value

  The `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AutomationPartPath.html` representing the child device part for the given
  `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType.html` instance, or `nil` if the device part is not found.