Versions in this module Expand all Collapse all v0 v0.0.1 Apr 21, 2023 Changes in this version + func WithDeviceClass(deviceClass string) addValueOption + func WithIcon(icon string) addValueOption + func WithSensorID(id string) newMQTTSensorOption + func WithSensorValueID(id string) addValueOption + func WithUnitOfMeasurement(unitOfMeasurement string) addValueOption + type MQTTPublisher interface + Publish func(topic string, qos byte, retained bool, payload interface{}) + type MQTTPublisherFunc func(topic string, qos byte, retained bool, payload interface{}) + func (f MQTTPublisherFunc) Publish(topic string, qos byte, retained bool, payload interface{}) + type MQTTSensor struct + func NewMQTTSensor(client MQTTPublisher, sensorName string, opts ...newMQTTSensorOption) *MQTTSensor + func (ms *MQTTSensor) AddValue(valueName string, opts ...addValueOption) MQTTSensorValue + func (s MQTTSensor) ID() string + func (s MQTTSensor) Name() string + type MQTTSensorValue interface + PublishConfig func() + Update func(float64) + type Sensor interface + ID func() string + Name func() string + type SensorValue interface + ID func() string + Name func() string