ha

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

homeassistant-go

A Go client for Home Assistant over REST, WebSocket and MQTT discovery, with one typed package per entity domain. The packages are generated from Home Assistant's own code, at the release pinned in UPSTREAM.md.

go get github.com/taumatix/homeassistant-go@v1.0.0

Coming from an earlier copy of this library? The API changed completely: see MIGRATION.md.

What is where

Package What it is
domains/<domain> one per entity domain (climate, light, sensor, …): types, MQTT discovery config, a controller and a served device
api REST and WebSocket client
mqtt MQTT client, discovery, and the core of served devices
entity what the domains and transports share, including the Transport interface
ha (module root) shared wire types

switch and select are Go keywords, so those packages are domains/switches and domains/selects. Not every domain has every part: a domain without MQTT support in Home Assistant has no Config or Device.

Control entities

The same calls work over HTTP and over MQTT: pass either client.

import (
    "github.com/taumatix/homeassistant-go/api"
    "github.com/taumatix/homeassistant-go/domains/climate"
    "github.com/taumatix/homeassistant-go/domains/light"
)

c := api.NewClient(api.WithBaseURL("http://localhost:8123"), api.WithAuthToken(token))

kitchen := light.Get(c, "kitchen") // the "light." prefix is optional
err := kitchen.TurnOn(ctx, light.BrightnessPct(80), light.Transition(2))

hvac := climate.Get(c, "living_room")
state, err := hvac.State(ctx) // typed snapshot
err = hvac.SetHVACMode(ctx, climate.HVACModeHeat)
err = hvac.SetTemperature(ctx, 21.5)

// old is nil for an entity not seen before, new is nil when it is removed
unsubscribe, err := hvac.Subscribe(ctx, func(old, new *climate.State) {
    fmt.Println(new.State)
})
defer unsubscribe(ctx)

all, err := climate.List(ctx, c)

Over MQTT, entities are those announced through MQTT discovery, and commands go to the topics in their discovery config:

mc := mqtt.NewClient(mqtt.WithBroker("tcp://localhost:1883"))
err := mc.Connect(ctx, nil) // nil authenticator: anonymous
defer mc.Close(context.Background())

hvac := climate.Get(mc, "living_room") // discovery object path or unique_id
err = hvac.SetFanMode(ctx, climate.FanModeLow)

A command that does not exist over MQTT returns ha.ErrNotSupportedOverMQTT. A topic that has a Jinja template is refused for commands and skipped for state, because only Home Assistant can render it.

The client reads discovery in every form Home Assistant accepts: abbreviated keys, the ~ topic base, and one payload describing a whole device. It subscribes to <prefix>/<domain>/... and <prefix>/device/..., so a broker with access rules must allow both. mqtt.ExpandDiscoveryConfig turns a short payload into the full form a domain Config reads.

Serve your own devices

device, err := climate.NewDevice(ctx, mc, "living-room-hvac",
    climate.WithName("Living Room HVAC"),
    climate.WithHVACModes(climate.HVACModeOff, climate.HVACModeHeat),
    climate.WithFanModes(climate.FanModeLow, climate.FanModeHigh),
    climate.WithTemperatureLimits(5, 30),
)

device.OnHVACModeCommand(func(ctx context.Context, mode climate.HVACMode) error { // HA -> device
    return device.ReportHVACMode(ctx, mode) // device -> HA, retained
})
device.OnTemperatureCommand(func(ctx context.Context, target float64) error {
    return device.ReportTargetTemperature(ctx, target)
})
err = device.ReportCurrentTemperature(ctx, 21.5)

defer device.Close(ctx) // report offline; device.Delete removes the entity

WithConfig sets any discovery option the other options do not cover. For a platform or option the domain packages do not cover at all, mqtt.Client.Announce serves a device from your own config and command routes.

Topics
Discovery: <discovery prefix>/<component>/[<node_id>/]<object_id>/config
State:     <topic root>/<component>/<object_id>/.../state
Command:   <topic root>/<component>/<object_id>/.../set

WithDiscoveryPrefix (default homeassistant) moves the discovery topics, and WithTopicRoot (default homeassistant-go) moves the others. A broker with access rules needs both. A device keeps the topics it was announced with.

REST and WebSocket

states, err := c.GetStates(ctx)
changed, err := c.CallService(ctx, "light", "turn_on", map[string]any{"entity_id": "light.kitchen"})

conn, err := c.ConnectWebSocket(ctx)
defer conn.Close()
subscription, err := conn.SubscribeEvents(ctx, "state_changed", func(event api.WSEvent) {
    if changed, err := event.StateChanged(); err == nil {
        fmt.Println(changed.EntityID)
    }
})
defer conn.UnsubscribeEvents(ctx, subscription)

Testing your own code

  • Unit tests: implement entity.Transport and entity.Link, and pass your fake to any domain package. These interfaces do not gain methods within a major version.
  • Wire tests: mqtt/mqtttest starts an in-process MQTT broker, and api/apitest is an HTTP fake of the REST API. Both are driven by a real client.

Development

make test            # unit tests, no containers
make integration     # a real Home Assistant and Mosquitto
make generate        # rebuild domains/ and icons/ from the committed spec (offline)
make generate-check  # fail if the committed output differs
make fetch-spec      # re-read the spec from Home Assistant's container image
make spec-drift      # fail if that image declares something else than the committed spec
make extract-test    # the extractor's own tests

docs/ARCHITECTURE.md explains the design and the generator. The one rule: generate declarations, write behaviour by hand.

make integration uses Docker Compose. With Apple container instead, run eval "$(internal/test/testdata/container.sh up)", then make integration, then internal/test/testdata/container.sh down.

cmd/demo serves a demo device and cmd/mqtt-test checks MQTT connectivity. The root docker-compose.yaml starts Home Assistant on :8123 and Mosquitto on :1883 for them.

License

Apache-2.0, see LICENSE. What this library is built against is in UPSTREAM.md, and what is planned is in ROADMAP.md.

Documentation

Overview

Package ha holds the Home Assistant wire types shared by the transports and the domain packages: templates, icons, device details, availability, discovery references and a few enums the documentation has no table for.

The clients are in package api (REST and WebSocket) and package mqtt (MQTT). Each entity domain has a package under domains/ with its types, an Entity to control entities over either client, and a Device to serve one over MQTT. Package entity is the transport-neutral runtime behind them.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupportedOverMQTT = errors.New("not supported over MQTT")

ErrNotSupportedOverMQTT is returned by the Entity methods whose command has no MQTT representation (an action Home Assistant implements on its side).

Functions

func FirstSet

func FirstSet(fallback string, options ...*string) string

FirstSet returns the first of the optional strings which is set and not empty, or fallback: how Home Assistant reads an option with a stand-in, such as a switch's state_on, else its payload_on.

func Must

func Must[T any](v T, err error) T

Must panics on err and returns v otherwise. It is convenient for chaining calls in examples and tools.

func Or

func Or[T any](p *T, fallback T) T

Or returns what p points to, or fallback when p is nil.

func P

func P[T any](v T) *T

P returns a pointer to v. It is convenient for filling the many optional pointer fields of the generated configuration structs.

func Strings

func Strings[T ~string](values []T) []string

Strings converts a list of enum values to the []string of a configuration field. A nil list stays an empty, non-nil list: the option was declared.

func V

func V[T any](p *T) T

V returns what p points to, or the zero value when p is nil: the value of an optional configuration field.

Types

type Date

type Date struct {
	time.Time
}

Date is a simple date without time.

As the Time of a period, Start is the first instant of the day and End the last second of it.

func (*Date) End

func (d *Date) End() time.Time

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

func (*Date) Start

func (d *Date) Start() time.Time

func (*Date) String

func (d *Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) error

type DateTime

type DateTime struct {
	time.Time
}

DateTime is a date and time.

The same time is used for both start and end

func (*DateTime) End

func (d *DateTime) End() time.Time

func (*DateTime) MarshalJSON

func (d *DateTime) MarshalJSON() ([]byte, error)

func (*DateTime) Start

func (d *DateTime) Start() time.Time

func (*DateTime) String

func (d *DateTime) String() string

func (*DateTime) UnmarshalJSON

func (d *DateTime) UnmarshalJSON(b []byte) error

type DeviceDetails

type DeviceDetails struct {
	Identifiers     []string `json:"identifiers"`
	Name            string   `json:"name"`
	Manufacturer    string   `json:"manufacturer"`
	Model           string   `json:"model,omitempty"`
	SwVersion       string   `json:"sw_version,omitempty"`
	SerialNumber    string   `json:"serial_number,omitempty"`
	HardwareVersion string   `json:"hw_version,omitempty"`
}

type DeviceOrigin

type DeviceOrigin struct {
	Name       string `json:"name"`
	SwVersion  string `json:"sw_version,omitempty"`
	SupportURL string `json:"support_url,omitempty"`
}

type DeviceTrackerSourceType

type DeviceTrackerSourceType string

DeviceTrackerSourceType is how a device tracker learned its position.

const (
	DeviceTrackerSourceTypeGPS         DeviceTrackerSourceType = "gps"
	DeviceTrackerSourceTypeRouter      DeviceTrackerSourceType = "router"
	DeviceTrackerSourceTypeBluetooth   DeviceTrackerSourceType = "bluetooth"
	DeviceTrackerSourceTypeBluetoothLE DeviceTrackerSourceType = "bluetooth_le"
)

The documented source types of a device tracker entity.

type Icon

type Icon string

Icon is a Home Assistant icon name such as "mdi:lightbulb". Any string converts to it; the icons package has a constant for every known one. see: https://www.home-assistant.io/integrations/homeassistant/#icon

type MQTTAvailability

type MQTTAvailability struct {
	PayloadAvailable    string `json:"payload_available,omitempty"`
	PayloadNotAvailable string `json:"payload_not_available,omitempty"`
	Topic               string `json:"topic"`
	ValueTemplate       string `json:"value_template,omitempty"`
}

MQTTAvailability is one entry of an entity's availability list.

type MQTTDeviceDetails

type MQTTDeviceDetails struct {
	// Identifiers are the device's unique IDs; Home Assistant groups
	// entities that share one. Mirrors DeviceDetails.Identifiers.
	Identifiers []string `json:"identifiers"`
	// Name is the device's name. Required.
	Name            string `json:"name"`
	Model           string `json:"model,omitempty"`
	Manufacturer    string `json:"manufacturer,omitempty"`
	SwVersion       string `json:"sw_version,omitempty"`
	SerialNumber    string `json:"serial_number,omitempty"`
	HardwareVersion string `json:"hw_version,omitempty"`
	// ConfigurationURL is a link to the device's own web UI.
	ConfigurationURL string `json:"configuration_url,omitempty"`
	// Connections are [type, id] pairs such as {"mac", "aa:bb:cc:00:11:22"} that
	// link this device to others known by the same connection.
	Connections [][2]string `json:"connections,omitempty"`
	// SuggestedArea is the area Home Assistant proposes when the device is first discovered.
	SuggestedArea string `json:"suggested_area,omitempty"`
	// ViaDevice is the identifier of the device this one connects through (a hub or bridge).
	ViaDevice string `json:"via_device,omitempty"`
}

type MQTTDiscoverySchema

type MQTTDiscoverySchema interface {
	IsMQTTDiscoverySchema()
}

type MediaPlayerMediaClass

type MediaPlayerMediaClass string

MediaPlayerMediaClass is the class of a media item.

type ObjectRef

type ObjectRef struct {
	Component string
	NodeID    string
	ObjectID  string
}

func (*ObjectRef) ConfigTopic

func (o *ObjectRef) ConfigTopic(discoveryPrefix string) (string, error)

type SpeechToTextAudioBitRates

type SpeechToTextAudioBitRates int

SpeechToTextAudioBitRates is a supported sample size in bits.

const (
	SpeechToTextBitRate8  SpeechToTextAudioBitRates = 8
	SpeechToTextBitRate16 SpeechToTextAudioBitRates = 16
	SpeechToTextBitRate24 SpeechToTextAudioBitRates = 24
	SpeechToTextBitRate32 SpeechToTextAudioBitRates = 32
)

The bit rates Home Assistant defines for speech to text.

type SpeechToTextAudioChannels

type SpeechToTextAudioChannels int

SpeechToTextAudioChannels is a supported channel count.

const (
	SpeechToTextChannelMono   SpeechToTextAudioChannels = 1
	SpeechToTextChannelStereo SpeechToTextAudioChannels = 2
)

The channel layouts Home Assistant defines for speech to text.

type SpeechToTextAudioCodecs

type SpeechToTextAudioCodecs string

SpeechToTextAudioCodecs is a supported audio codec.

const (
	SpeechToTextAudioCodecPCM  SpeechToTextAudioCodecs = "pcm"
	SpeechToTextAudioCodecOpus SpeechToTextAudioCodecs = "opus"
)

The audio codecs Home Assistant defines for speech to text.

type SpeechToTextAudioFormats

type SpeechToTextAudioFormats string

SpeechToTextAudioFormats is a supported audio container format.

const SpeechToTextAudioFormatWAV SpeechToTextAudioFormats = "wav"

SpeechToTextAudioFormatWAV is the only container format Home Assistant defines.

type SpeechToTextAudioSampleRates

type SpeechToTextAudioSampleRates int

SpeechToTextAudioSampleRates is a supported sample rate in Hz.

const (
	SpeechToTextSampleRate8000  SpeechToTextAudioSampleRates = 8000
	SpeechToTextSampleRate11025 SpeechToTextAudioSampleRates = 11025
	SpeechToTextSampleRate16000 SpeechToTextAudioSampleRates = 16000
	SpeechToTextSampleRate18900 SpeechToTextAudioSampleRates = 18900
	SpeechToTextSampleRate22050 SpeechToTextAudioSampleRates = 22050
	SpeechToTextSampleRate32000 SpeechToTextAudioSampleRates = 32000
	SpeechToTextSampleRate37800 SpeechToTextAudioSampleRates = 37800
	SpeechToTextSampleRate44100 SpeechToTextAudioSampleRates = 44100
	SpeechToTextSampleRate48000 SpeechToTextAudioSampleRates = 48000
)

The sample rates Home Assistant defines for speech to text.

type Template

type Template string

type Time

type Time interface {
	String() string
	Start() time.Time
	End() time.Time
	// contains filtered or unexported methods
}

type TimeString

type TimeString string

TimeString is a timestamp kept verbatim as returned by the API so that values round-trip byte for byte. Use Time to parse it.

func (TimeString) Time

func (t TimeString) Time() (time.Time, error)

Time parses the value as an RFC3339 timestamp.

type ToDoListTodoItemStatus

type ToDoListTodoItemStatus string

ToDoListTodoItemStatus is the status of one to-do item.

const (
	ToDoListTodoItemStatusNeedsAction ToDoListTodoItemStatus = "needs_action"
	ToDoListTodoItemStatusCompleted   ToDoListTodoItemStatus = "completed"
)

The statuses a to-do item can have.

type Unsubscribe

type Unsubscribe func(ctx context.Context) error

Unsubscribe cancels an entity state subscription.

Directories

Path Synopsis
api
Package api is Home Assistant's HTTP transport: the REST and WebSocket APIs.
Package api is Home Assistant's HTTP transport: the REST and WebSocket APIs.
apitest
Package apitest is an httptest-based fake Home Assistant REST server for testing code that uses homeassistant-go/api.
Package apitest is an httptest-based fake Home Assistant REST server for testing code that uses homeassistant-go/api.
cmd
demo command
Command demo announces two sensors and a switch to a local broker and feeds them simulated values.
Command demo announces two sensors and a switch to a local broker and feeds them simulated values.
generate command
Command generate writes the domain packages (domains/...), icons/ and the MQTT discovery tables from the committed spec, the service catalog and the curation.
Command generate writes the domain packages (domains/...), icons/ and the MQTT discovery tables from the committed spec, the service catalog and the curation.
mqtt-test command
Command mqtt-test announces a sensor and a switch to a local broker and logs what Home Assistant sends back.
Command mqtt-test announces a sensor and a switch to a local broker and logs what Home Assistant sends back.
domains
airquality
Package airquality is Home Assistant's air_quality domain: its types.
Package airquality is Home Assistant's air_quality domain: its types.
aitask
Package aitask is Home Assistant's ai_task domain: its types.
Package aitask is Home Assistant's ai_task domain: its types.
alarmcontrolpanel
Package alarmcontrolpanel is Home Assistant's alarm_control_panel domain: its types and its MQTT discovery config.
Package alarmcontrolpanel is Home Assistant's alarm_control_panel domain: its types and its MQTT discovery config.
assistsatellite
Package assistsatellite is Home Assistant's assist_satellite domain: its types.
Package assistsatellite is Home Assistant's assist_satellite domain: its types.
binarysensor
Package binarysensor is Home Assistant's binary_sensor domain: its types and its MQTT discovery config.
Package binarysensor is Home Assistant's binary_sensor domain: its types and its MQTT discovery config.
button
Package button is Home Assistant's button domain: its types and its MQTT discovery config.
Package button is Home Assistant's button domain: its types and its MQTT discovery config.
calendar
Package calendar is Home Assistant's calendar domain: its types.
Package calendar is Home Assistant's calendar domain: its types.
camera
Package camera is Home Assistant's camera domain: its types and its MQTT discovery config.
Package camera is Home Assistant's camera domain: its types and its MQTT discovery config.
climate
Package climate is Home Assistant's climate domain: its types and its MQTT discovery config.
Package climate is Home Assistant's climate domain: its types and its MQTT discovery config.
conversation
Package conversation is Home Assistant's conversation domain: its types.
Package conversation is Home Assistant's conversation domain: its types.
cover
Package cover is Home Assistant's cover domain: its types and its MQTT discovery config.
Package cover is Home Assistant's cover domain: its types and its MQTT discovery config.
date
Package date is Home Assistant's date domain: its types and its MQTT discovery config.
Package date is Home Assistant's date domain: its types and its MQTT discovery config.
datetime
Package datetime is Home Assistant's datetime domain: its types and its MQTT discovery config.
Package datetime is Home Assistant's datetime domain: its types and its MQTT discovery config.
devicetracker
Package devicetracker is Home Assistant's device_tracker domain: its types and its MQTT discovery config.
Package devicetracker is Home Assistant's device_tracker domain: its types and its MQTT discovery config.
devicetrigger
Package devicetrigger is Home Assistant's device_trigger domain: its types and its MQTT discovery config.
Package devicetrigger is Home Assistant's device_trigger domain: its types and its MQTT discovery config.
event
Package event is Home Assistant's event domain: its types and its MQTT discovery config.
Package event is Home Assistant's event domain: its types and its MQTT discovery config.
fan
Package fan is Home Assistant's fan domain: its types and its MQTT discovery config.
Package fan is Home Assistant's fan domain: its types and its MQTT discovery config.
geolocation
Package geolocation is Home Assistant's geo_location domain: its types.
Package geolocation is Home Assistant's geo_location domain: its types.
humidifier
Package humidifier is Home Assistant's humidifier domain: its types and its MQTT discovery config.
Package humidifier is Home Assistant's humidifier domain: its types and its MQTT discovery config.
image
Package image is Home Assistant's image domain: its types and its MQTT discovery config.
Package image is Home Assistant's image domain: its types and its MQTT discovery config.
imageprocessing
Package imageprocessing is Home Assistant's image_processing domain: its types.
Package imageprocessing is Home Assistant's image_processing domain: its types.
infrared
Package infrared is Home Assistant's infrared domain: its types and its MQTT discovery config.
Package infrared is Home Assistant's infrared domain: its types and its MQTT discovery config.
lawnmower
Package lawnmower is Home Assistant's lawn_mower domain: its types and its MQTT discovery config.
Package lawnmower is Home Assistant's lawn_mower domain: its types and its MQTT discovery config.
light
Package light is Home Assistant's light domain: its types and its MQTT discovery config.
Package light is Home Assistant's light domain: its types and its MQTT discovery config.
lock
Package lock is Home Assistant's lock domain: its types and its MQTT discovery config.
Package lock is Home Assistant's lock domain: its types and its MQTT discovery config.
mediaplayer
Package mediaplayer is Home Assistant's media_player domain: its types.
Package mediaplayer is Home Assistant's media_player domain: its types.
notify
Package notify is Home Assistant's notify domain: its types and its MQTT discovery config.
Package notify is Home Assistant's notify domain: its types and its MQTT discovery config.
number
Package number is Home Assistant's number domain: its types and its MQTT discovery config.
Package number is Home Assistant's number domain: its types and its MQTT discovery config.
radiofrequency
Package radiofrequency is Home Assistant's radio_frequency domain: its types.
Package radiofrequency is Home Assistant's radio_frequency domain: its types.
remote
Package remote is Home Assistant's remote domain: its types.
Package remote is Home Assistant's remote domain: its types.
scene
Package scene is Home Assistant's scene domain: its types and its MQTT discovery config.
Package scene is Home Assistant's scene domain: its types and its MQTT discovery config.
selects
Package selects is Home Assistant's select domain: its types and its MQTT discovery config.
Package selects is Home Assistant's select domain: its types and its MQTT discovery config.
sensor
Package sensor is Home Assistant's sensor domain: its types and its MQTT discovery config.
Package sensor is Home Assistant's sensor domain: its types and its MQTT discovery config.
siren
Package siren is Home Assistant's siren domain: its types and its MQTT discovery config.
Package siren is Home Assistant's siren domain: its types and its MQTT discovery config.
stt
Package stt is Home Assistant's stt domain: its types.
Package stt is Home Assistant's stt domain: its types.
switches
Package switches is Home Assistant's switch domain: its types and its MQTT discovery config.
Package switches is Home Assistant's switch domain: its types and its MQTT discovery config.
tag
Package tag is Home Assistant's tag domain: its types and its MQTT discovery config.
Package tag is Home Assistant's tag domain: its types and its MQTT discovery config.
text
Package text is Home Assistant's text domain: its types and its MQTT discovery config.
Package text is Home Assistant's text domain: its types and its MQTT discovery config.
time
Package time is Home Assistant's time domain: its types and its MQTT discovery config.
Package time is Home Assistant's time domain: its types and its MQTT discovery config.
todo
Package todo is Home Assistant's todo domain: its types.
Package todo is Home Assistant's todo domain: its types.
tts
Package tts is Home Assistant's tts domain: its types.
Package tts is Home Assistant's tts domain: its types.
update
Package update is Home Assistant's update domain: its types and its MQTT discovery config.
Package update is Home Assistant's update domain: its types and its MQTT discovery config.
vacuum
Package vacuum is Home Assistant's vacuum domain: its types and its MQTT discovery config.
Package vacuum is Home Assistant's vacuum domain: its types and its MQTT discovery config.
valve
Package valve is Home Assistant's valve domain: its types and its MQTT discovery config.
Package valve is Home Assistant's valve domain: its types and its MQTT discovery config.
wakeword
Package wakeword is Home Assistant's wake_word domain: its types.
Package wakeword is Home Assistant's wake_word domain: its types.
waterheater
Package waterheater is Home Assistant's water_heater domain: its types and its MQTT discovery config.
Package waterheater is Home Assistant's water_heater domain: its types and its MQTT discovery config.
weather
Package weather is Home Assistant's weather domain: its types.
Package weather is Home Assistant's weather domain: its types.
Package entity is the transport-neutral runtime behind the domain packages (domains/light, domains/climate, ...).
Package entity is the transport-neutral runtime behind the domain packages (domains/light, domains/climate, ...).
Package icons holds a constant for every Material Design Icon Home Assistant accepts as "mdi:<name>".
Package icons holds a constant for every Material Design Icon Home Assistant accepts as "mdi:<name>".
internal
gen/curate
Package curate owns what Home Assistant core does not say.
Package curate owns what Home Assistant core does not say.
gen/emit
Package emit prints the model as Go.
Package emit prints the model as Go.
gen/model
Package model derives a typed model of each domain package from package spec (what Home Assistant core says), the service catalog and package curate (what core does not say).
Package model derives a typed model of each domain package from package spec (what Home Assistant core says), the service catalog and package curate (what core does not say).
gen/spec
Package spec owns what upstream says: what internal/gen/extract reads out of Home Assistant core, committed as JSON under core/, and the service catalog dumped from a running Home Assistant.
Package spec owns what upstream says: what internal/gen/extract reads out of Home Assistant core, committed as JSON under core/, and the service catalog dumped from a running Home Assistant.
test
Package test provides a shared integration test harness that runs a real Home Assistant instance together with a Mosquitto MQTT broker using docker compose.
Package test provides a shared integration test harness that runs a real Home Assistant instance together with a Mosquitto MQTT broker using docker compose.
Package mqtt is the MQTT transport: the client, MQTT discovery and the core of a served Device.
Package mqtt is the MQTT transport: the client, MQTT discovery and the core of a served Device.
internal/abbreviations
Package abbreviations holds the tables MQTT discovery payloads are read with, as Home Assistant core declares them (internal/gen/spec/core).
Package abbreviations holds the tables MQTT discovery payloads are read with, as Home Assistant core declares them (internal/gen/spec/core).
mqtttest
Dual-protocol support cannot be proven by round-tripping homeassistant-go's client through itself: a v5 client and a v3.1.1 client agreeing with their own encoder proves nothing about what actually reached the wire.
Dual-protocol support cannot be proven by round-tripping homeassistant-go's client through itself: a v5 client and a v3.1.1 client agreeing with their own encoder proves nothing about what actually reached the wire.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL