Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MqttConfig ¶
type MqttConfig struct { Name string `json:"name"` UnitOfMeasurement string `json:"unit_of_measurement"` StateTopic string `json:"state_topic"` UniqueID string `json:"unique_id"` MaxConnectionTime int `json:"-"` Client mqtt.Client `json:"-"` ConfigTopic string `json:"-"` Server string `json:"-"` Username string `json:"-"` Password string `json:"-"` }
func (*MqttConfig) Connect ¶
func (m *MqttConfig) Connect() error
func (*MqttConfig) ConnectWithBackoff ¶
func (m *MqttConfig) ConnectWithBackoff() error
func (*MqttConfig) Send ¶
func (m *MqttConfig) Send(data string) error
Send any data to home assistant
func (*MqttConfig) SendConfig ¶
func (m *MqttConfig) SendConfig() error
SendConfig send the home assistant auto discovery config to mqtt
Click to show internal directories.
Click to hide internal directories.