Overview
Package wakeword is Home Assistant's wake_word domain: its types.
Entity controls one wake_word entity over HTTP.
Home Assistant documents the domain here:
Integration: https://www.home-assistant.io/integrations/wake_word/
Control
// client is an *api.Client
target := wakeword.Get(client, "my_wake_word")
state, err := target.State(ctx)
Control
type Entity struct
Entity controls one wake_word entity over HTTP (api.Client). State and Subscribe come from the embedded Handle.
Embeds entity.Handle[Attributes], whose methods it has too.
func Get(transport entity.Transport, id string) *Entity
Get returns the wake_word entity with the given id: an entity id over HTTP (the "wake_word." prefix may be omitted). It does no I/O.
func List(ctx context.Context, transport entity.Transport) ([]*Entity, error)
List returns every wake_word entity the transport can see.
type State = entity.State[Attributes]
State is a snapshot of one wake_word entity.
State and values
type Attributes struct
Attributes are the state attributes of a wake_word entity, under the names Home Assistant publishes them with.
type WakeWord struct
WakeWord is core's WakeWord.
See: https://www.home-assistant.io/integrations/wake_word/
| Field | Type | Wire key | Description |
|---|---|---|---|
Id | string | id | |
Name | string | name | |
Phrase | *string | phrase |