HomeEntityType

@HomeExperimentalApi
interface HomeEntityType : HomeObjectType, HasId, TraitProvider, PartsProvider

Known direct subclasses
DeviceGroup

Domain entity representing a device group in the Home Graph.


Common base interface for all first-class hydrated entities in the Home Graph.

Summary

Public properties

EntityTypeFactory<HomeEntityType>

The factory associated with this entity type.

open Id?

Id of the Structure if this entity is assigned to one.

Inherited functions

From com.google.home.PartsProvider
Flow<T>
<T : DeviceType> part(type: DeviceTypeFactory<T>, vararg tags: Tag)

Gets a flow on the DeviceType using the given DeviceTypeFactory and Tag.

Flow<T?>
<T : DeviceType> partOrNull(type: DeviceTypeFactory<T>, vararg tags: Tag)

Gets a flow on the DeviceType using the given DeviceTypeFactory and Tag.

Flow<Set<DeviceType>>

Gets a flow on the DeviceTypes that are parts of this object.

From com.google.home.TraitProvider
open Trait.TraitMetadata?
<T : Trait> metadata(traitFactory: TraitFactory<T>)

Access a specific trait metadata on the provider given a caller-provided TraitFactory.

T?
<T : Trait> trait(traitFactory: TraitFactory<T>)

Access a specific trait on the provider given a caller-provided TraitFactory.

open Set<Trait>

Given a similar accessible trait set as the function above, returns a subset of those traits that are present in the associated HomeConfig.factoryRegistry union'ed with those already known to the extended sub-class (e.g specific DeviceType that is aware of the set of TraitFactorys specified in its type definition).

Inherited properties

From com.google.home.HasConnectivityState
SourceConnectivity

Source Connectivity for the device.

From com.google.home.HasId
Id

Opaque ID for the object.

Public properties

factory

val factory: EntityTypeFactory<HomeEntityType>

The factory associated with this entity type.

structureId

open val structureId: Id?

Id of the Structure if this entity is assigned to one.