Versions in this module Expand all Collapse all v9 v9.2.1 Jun 2, 2024 v9.2.0 May 22, 2024 Changes in this version + var ErrNoConnection = errors.New("no MQTT connection") v9.1.0 May 4, 2024 v9.0.0 May 4, 2024 Changes in this version + type Client struct + func NewClient(ctx context.Context, prefs prefs, subscriptions []*Subscription) (*Client, error) + func (c *Client) Publish(msgs ...*Msg) error + func (c *Client) Unpublish(msgs ...*Msg) error + type Device interface + Configuration func() []*Msg + Name func() string + States func() []*Msg + Subscriptions func() []*Subscription + type Msg struct + Message json.RawMessage + QOS byte + Retained bool + Topic string + func NewMsg(topic string, msg json.RawMessage) *Msg + func (m *Msg) Retain() *Msg + type Subscription struct + Callback func(p *paho.Publish) + Topic string Other modules containing this package github.com/joshuar/go-hass-anything github.com/joshuar/go-hass-anything/v10 github.com/joshuar/go-hass-anything/v11 github.com/joshuar/go-hass-anything/v12 github.com/joshuar/go-hass-anything/v2 github.com/joshuar/go-hass-anything/v3 github.com/joshuar/go-hass-anything/v4 github.com/joshuar/go-hass-anything/v5 github.com/joshuar/go-hass-anything/v6 github.com/joshuar/go-hass-anything/v7 github.com/joshuar/go-hass-anything/v8