Documentation ¶
Index ¶
- Constants
- Variables
- func AvailabilityFunc() string
- func GetDiscoveryTopic(e Entity) string
- func GetTopic(e Entity, rawTopicString string) string
- func GetTopicPrefix(e Entity) string
- func MakeMessageHandler(e Entity) func(client mqtt.Client, msg mqtt.Message)
- func NewLightRef(opts *LightRefOptions)
- type AlarmControlPanel
- func (d *AlarmControlPanel) AddMessageHandler()
- func (d *AlarmControlPanel) AnnounceAvailable()
- func (d *AlarmControlPanel) DeleteTopic()
- func (d *AlarmControlPanel) GetDomainEntity() string
- func (d *AlarmControlPanel) GetMQTTFields() (fields MQTTFields)
- func (d *AlarmControlPanel) GetName() string
- func (d *AlarmControlPanel) GetRawId() string
- func (d *AlarmControlPanel) GetUniqueId() string
- func (d *AlarmControlPanel) Initialize()
- func (d *AlarmControlPanel) JsonAttributes(s string)
- func (d *AlarmControlPanel) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *AlarmControlPanel) SetMQTTFields(fields MQTTFields)
- func (d *AlarmControlPanel) State(s string)
- func (d *AlarmControlPanel) Subscribe()
- func (d *AlarmControlPanel) UnSubscribe()
- func (d *AlarmControlPanel) UpdateState()
- type AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) AvailabilityFunc(f func() string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) AvailabilityMode(mode string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) AvailabilityTemplate(template string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Code(code string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) CodeArmRequired(required bool) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) CodeDisarmRequired(required bool) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) CodeTriggerRequired(required bool) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) CommandTemplate(template string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) EnabledByDefault(d bool) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Encoding(encoding string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) EntityCategory(category string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Icon(icon string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) JsonAttributesFunc(f func() string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) JsonAttributesTemplate(template string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Name(name string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) ObjectId(id string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadArmAway(away string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadArmCustomBypass(bypass string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadArmHome(home string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadArmNight(night string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadArmVacation(vacation string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadAvailable(available string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadDisarm(disarm string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadNotAvailable(available string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) PayloadTrigger(trigger string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Qos(qos int) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) Retain(retain bool) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) StateFunc(f func() string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) States() *AlarmControlPanelState
- func (o *AlarmControlPanelOptions) UniqueId(id string) *AlarmControlPanelOptions
- func (o *AlarmControlPanelOptions) ValueTemplate(template string) *AlarmControlPanelOptions
- type AlarmControlPanelState
- type BinarySensor
- func (d *BinarySensor) AddMessageHandler()
- func (d *BinarySensor) AnnounceAvailable()
- func (d *BinarySensor) DeleteTopic()
- func (d *BinarySensor) GetDomainEntity() string
- func (d *BinarySensor) GetMQTTFields() (fields MQTTFields)
- func (d *BinarySensor) GetName() string
- func (d *BinarySensor) GetRawId() string
- func (d *BinarySensor) GetUniqueId() string
- func (d *BinarySensor) Initialize()
- func (d *BinarySensor) JsonAttributes(s string)
- func (d *BinarySensor) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *BinarySensor) SetMQTTFields(fields MQTTFields)
- func (d *BinarySensor) State(s string)
- func (d *BinarySensor) Subscribe()
- func (d *BinarySensor) UnSubscribe()
- func (d *BinarySensor) UpdateState()
- type BinarySensorOptions
- func (o *BinarySensorOptions) AvailabilityFunc(f func() string) *BinarySensorOptions
- func (o *BinarySensorOptions) AvailabilityMode(mode string) *BinarySensorOptions
- func (o *BinarySensorOptions) AvailabilityTemplate(template string) *BinarySensorOptions
- func (o *BinarySensorOptions) DeviceClass(class string) *BinarySensorOptions
- func (o *BinarySensorOptions) EnabledByDefault(d bool) *BinarySensorOptions
- func (o *BinarySensorOptions) Encoding(encoding string) *BinarySensorOptions
- func (o *BinarySensorOptions) EntityCategory(category string) *BinarySensorOptions
- func (o *BinarySensorOptions) ExpireAfter(after int) *BinarySensorOptions
- func (o *BinarySensorOptions) ForceUpdate(update bool) *BinarySensorOptions
- func (o *BinarySensorOptions) Icon(icon string) *BinarySensorOptions
- func (o *BinarySensorOptions) JsonAttributesFunc(f func() string) *BinarySensorOptions
- func (o *BinarySensorOptions) JsonAttributesTemplate(template string) *BinarySensorOptions
- func (o *BinarySensorOptions) Name(name string) *BinarySensorOptions
- func (o *BinarySensorOptions) ObjectId(id string) *BinarySensorOptions
- func (o *BinarySensorOptions) OffDelay(delay int) *BinarySensorOptions
- func (o *BinarySensorOptions) PayloadAvailable(available string) *BinarySensorOptions
- func (o *BinarySensorOptions) PayloadNotAvailable(available string) *BinarySensorOptions
- func (o *BinarySensorOptions) PayloadOff(off string) *BinarySensorOptions
- func (o *BinarySensorOptions) PayloadOn(on string) *BinarySensorOptions
- func (o *BinarySensorOptions) Qos(qos int) *BinarySensorOptions
- func (o *BinarySensorOptions) StateFunc(f func() string) *BinarySensorOptions
- func (o *BinarySensorOptions) States() *BinarySensorState
- func (o *BinarySensorOptions) UniqueId(id string) *BinarySensorOptions
- func (o *BinarySensorOptions) ValueTemplate(template string) *BinarySensorOptions
- type BinarySensorState
- type Button
- func (d *Button) AddMessageHandler()
- func (d *Button) AnnounceAvailable()
- func (d *Button) DeleteTopic()
- func (d *Button) GetDomainEntity() string
- func (d *Button) GetMQTTFields() (fields MQTTFields)
- func (d *Button) GetName() string
- func (d *Button) GetRawId() string
- func (d *Button) GetUniqueId() string
- func (d *Button) Initialize()
- func (d *Button) JsonAttributes(s string)
- func (d *Button) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Button) SetMQTTFields(fields MQTTFields)
- func (d *Button) Subscribe()
- func (d *Button) UnSubscribe()
- func (d *Button) UpdateState()
- type ButtonOptions
- func (o *ButtonOptions) AvailabilityFunc(f func() string) *ButtonOptions
- func (o *ButtonOptions) AvailabilityMode(mode string) *ButtonOptions
- func (o *ButtonOptions) AvailabilityTemplate(template string) *ButtonOptions
- func (o *ButtonOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *ButtonOptions
- func (o *ButtonOptions) CommandTemplate(template string) *ButtonOptions
- func (o *ButtonOptions) DeviceClass(class string) *ButtonOptions
- func (o *ButtonOptions) EnabledByDefault(d bool) *ButtonOptions
- func (o *ButtonOptions) Encoding(encoding string) *ButtonOptions
- func (o *ButtonOptions) EntityCategory(category string) *ButtonOptions
- func (o *ButtonOptions) Icon(icon string) *ButtonOptions
- func (o *ButtonOptions) JsonAttributesFunc(f func() string) *ButtonOptions
- func (o *ButtonOptions) JsonAttributesTemplate(template string) *ButtonOptions
- func (o *ButtonOptions) Name(name string) *ButtonOptions
- func (o *ButtonOptions) ObjectId(id string) *ButtonOptions
- func (o *ButtonOptions) PayloadAvailable(available string) *ButtonOptions
- func (o *ButtonOptions) PayloadNotAvailable(available string) *ButtonOptions
- func (o *ButtonOptions) PayloadPress(press string) *ButtonOptions
- func (o *ButtonOptions) Qos(qos int) *ButtonOptions
- func (o *ButtonOptions) Retain(retain bool) *ButtonOptions
- func (o *ButtonOptions) States() *ButtonState
- func (o *ButtonOptions) UniqueId(id string) *ButtonOptions
- type ButtonState
- type Camera
- func (d *Camera) AddMessageHandler()
- func (d *Camera) AnnounceAvailable()
- func (d *Camera) DeleteTopic()
- func (d *Camera) GetDomainEntity() string
- func (d *Camera) GetMQTTFields() (fields MQTTFields)
- func (d *Camera) GetName() string
- func (d *Camera) GetRawId() string
- func (d *Camera) GetUniqueId() string
- func (d *Camera) Initialize()
- func (d *Camera) JsonAttributes(s string)
- func (d *Camera) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Camera) SetMQTTFields(fields MQTTFields)
- func (d *Camera) State(s string)
- func (d *Camera) Subscribe()
- func (d *Camera) UnSubscribe()
- func (d *Camera) UpdateState()
- type CameraOptions
- func (o *CameraOptions) AvailabilityFunc(f func() string) *CameraOptions
- func (o *CameraOptions) AvailabilityMode(mode string) *CameraOptions
- func (o *CameraOptions) AvailabilityTemplate(template string) *CameraOptions
- func (o *CameraOptions) EnabledByDefault(d bool) *CameraOptions
- func (o *CameraOptions) Encoding(encoding string) *CameraOptions
- func (o *CameraOptions) EntityCategory(category string) *CameraOptions
- func (o *CameraOptions) Icon(icon string) *CameraOptions
- func (o *CameraOptions) ImageEncoding(encoding string) *CameraOptions
- func (o *CameraOptions) JsonAttributesFunc(f func() string) *CameraOptions
- func (o *CameraOptions) JsonAttributesTemplate(template string) *CameraOptions
- func (o *CameraOptions) Name(name string) *CameraOptions
- func (o *CameraOptions) ObjectId(id string) *CameraOptions
- func (o *CameraOptions) StateFunc(f func() string) *CameraOptions
- func (o *CameraOptions) States() *CameraState
- func (o *CameraOptions) UniqueId(id string) *CameraOptions
- type CameraState
- type Climate
- func (d *Climate) AddMessageHandler()
- func (d *Climate) AnnounceAvailable()
- func (d *Climate) Aux(s string)
- func (d *Climate) CurrentHumidity(s string)
- func (d *Climate) CurrentTemperature(s string)
- func (d *Climate) DeleteTopic()
- func (d *Climate) FanMode(s string)
- func (d *Climate) GetDomainEntity() string
- func (d *Climate) GetMQTTFields() (fields MQTTFields)
- func (d *Climate) GetName() string
- func (d *Climate) GetRawId() string
- func (d *Climate) GetUniqueId() string
- func (d *Climate) Initialize()
- func (d *Climate) JsonAttributes(s string)
- func (d *Climate) Mode(s string)
- func (d *Climate) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Climate) PresetMode(s string)
- func (d *Climate) SetMQTTFields(fields MQTTFields)
- func (d *Climate) Subscribe()
- func (d *Climate) SwingMode(s string)
- func (d *Climate) TargetHumidity(s string)
- func (d *Climate) Temperature(s string)
- func (d *Climate) TemperatureHigh(s string)
- func (d *Climate) TemperatureLow(s string)
- func (d *Climate) UnSubscribe()
- func (d *Climate) UpdateState()
- type ClimateOptions
- func (o *ClimateOptions) ActionFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) ActionTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) AuxCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) AuxStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) AuxStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) AvailabilityFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) AvailabilityMode(mode string) *ClimateOptions
- func (o *ClimateOptions) AvailabilityTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) CurrentHumidityFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) CurrentHumidityTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) CurrentTemperatureFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) CurrentTemperatureTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) EnableAux() *ClimateOptions
- func (o *ClimateOptions) EnableFanMode() *ClimateOptions
- func (o *ClimateOptions) EnableMode() *ClimateOptions
- func (o *ClimateOptions) EnablePresetMode() *ClimateOptions
- func (o *ClimateOptions) EnableSwingMode() *ClimateOptions
- func (o *ClimateOptions) EnableTargetHumidity() *ClimateOptions
- func (o *ClimateOptions) EnableTemperature() *ClimateOptions
- func (o *ClimateOptions) EnableTemperatureHigh() *ClimateOptions
- func (o *ClimateOptions) EnableTemperatureLow() *ClimateOptions
- func (o *ClimateOptions) EnabledByDefault(d bool) *ClimateOptions
- func (o *ClimateOptions) Encoding(encoding string) *ClimateOptions
- func (o *ClimateOptions) EntityCategory(category string) *ClimateOptions
- func (o *ClimateOptions) FanModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) FanModeCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) FanModeStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) FanModeStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) FanModes(modes []string) *ClimateOptions
- func (o *ClimateOptions) Icon(icon string) *ClimateOptions
- func (o *ClimateOptions) Initial(initial int) *ClimateOptions
- func (o *ClimateOptions) JsonAttributesFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) JsonAttributesTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) MaxHumidity(humidity int) *ClimateOptions
- func (o *ClimateOptions) MaxTemp(temp float64) *ClimateOptions
- func (o *ClimateOptions) MinHumidity(humidity int) *ClimateOptions
- func (o *ClimateOptions) MinTemp(temp float64) *ClimateOptions
- func (o *ClimateOptions) ModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) ModeCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) ModeStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) ModeStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) Modes(modes []string) *ClimateOptions
- func (o *ClimateOptions) Name(name string) *ClimateOptions
- func (o *ClimateOptions) ObjectId(id string) *ClimateOptions
- func (o *ClimateOptions) Optimistic(optimistic bool) *ClimateOptions
- func (o *ClimateOptions) PayloadAvailable(available string) *ClimateOptions
- func (o *ClimateOptions) PayloadNotAvailable(available string) *ClimateOptions
- func (o *ClimateOptions) PayloadOff(off string) *ClimateOptions
- func (o *ClimateOptions) PayloadOn(on string) *ClimateOptions
- func (o *ClimateOptions) Precision(precision float64) *ClimateOptions
- func (o *ClimateOptions) PresetModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) PresetModeCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) PresetModeStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) PresetModeValueTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) PresetModes(modes []string) *ClimateOptions
- func (o *ClimateOptions) Qos(qos int) *ClimateOptions
- func (o *ClimateOptions) Retain(retain bool) *ClimateOptions
- func (o *ClimateOptions) States() *ClimateState
- func (o *ClimateOptions) SwingModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) SwingModeCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) SwingModeStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) SwingModeStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) SwingModes(modes []string) *ClimateOptions
- func (o *ClimateOptions) TargetHumidityCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) TargetHumidityCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TargetHumidityStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) TargetHumidityStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TempStep(step float64) *ClimateOptions
- func (o *ClimateOptions) TemperatureCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) TemperatureCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureHighCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) TemperatureHighCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureHighStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) TemperatureHighStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureLowCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
- func (o *ClimateOptions) TemperatureLowCommandTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureLowStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) TemperatureLowStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureStateFunc(f func() string) *ClimateOptions
- func (o *ClimateOptions) TemperatureStateTemplate(template string) *ClimateOptions
- func (o *ClimateOptions) TemperatureUnit(unit string) *ClimateOptions
- func (o *ClimateOptions) UniqueId(id string) *ClimateOptions
- func (o *ClimateOptions) ValueTemplate(template string) *ClimateOptions
- type ClimateState
- type Device
- type DeviceTracker
- func (d *DeviceTracker) AddMessageHandler()
- func (d *DeviceTracker) AnnounceAvailable()
- func (d *DeviceTracker) DeleteTopic()
- func (d *DeviceTracker) GetDomainEntity() string
- func (d *DeviceTracker) GetMQTTFields() (fields MQTTFields)
- func (d *DeviceTracker) GetName() string
- func (d *DeviceTracker) GetRawId() string
- func (d *DeviceTracker) GetUniqueId() string
- func (d *DeviceTracker) Initialize()
- func (d *DeviceTracker) JsonAttributes(s string)
- func (d *DeviceTracker) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *DeviceTracker) SetMQTTFields(fields MQTTFields)
- func (d *DeviceTracker) State(s string)
- func (d *DeviceTracker) Subscribe()
- func (d *DeviceTracker) UnSubscribe()
- func (d *DeviceTracker) UpdateState()
- type DeviceTrackerOptions
- func (o *DeviceTrackerOptions) AvailabilityFunc(f func() string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) AvailabilityMode(mode string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) AvailabilityTemplate(template string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) Icon(icon string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) JsonAttributesFunc(f func() string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) JsonAttributesTemplate(template string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) Name(name string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) ObjectId(id string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) PayloadAvailable(available string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) PayloadHome(home string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) PayloadNotAvailable(available string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) PayloadNotHome(home string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) PayloadReset(reset string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) Qos(qos int) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) SourceType(t string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) StateFunc(f func() string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) States() *DeviceTrackerState
- func (o *DeviceTrackerOptions) UniqueId(id string) *DeviceTrackerOptions
- func (o *DeviceTrackerOptions) ValueTemplate(template string) *DeviceTrackerOptions
- type DeviceTrackerState
- type DeviceTrigger
- func (d *DeviceTrigger) AddMessageHandler()
- func (d *DeviceTrigger) AnnounceAvailable()
- func (d *DeviceTrigger) DeleteTopic()
- func (d DeviceTrigger) GetDomainEntity() string
- func (d *DeviceTrigger) GetMQTTFields() (fields MQTTFields)
- func (d DeviceTrigger) GetName() string
- func (d *DeviceTrigger) GetRawId() string
- func (d DeviceTrigger) GetUniqueId() string
- func (d *DeviceTrigger) Initialize()
- func (d *DeviceTrigger) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *DeviceTrigger) SetMQTTFields(fields MQTTFields)
- func (d *DeviceTrigger) State(s string)
- func (d *DeviceTrigger) Subscribe()
- func (d *DeviceTrigger) UnSubscribe()
- func (d *DeviceTrigger) UpdateState()
- type DeviceTriggerOptions
- func (o *DeviceTriggerOptions) AutomationType(t string) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) Payload(payload string) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) Qos(qos int) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) StateFunc(f func() string) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) States() *DeviceTriggerState
- func (o *DeviceTriggerOptions) Subtype(subtype string) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) Type(t string) *DeviceTriggerOptions
- func (o *DeviceTriggerOptions) ValueTemplate(template string) *DeviceTriggerOptions
- type DeviceTriggerState
- type Entity
- type Fan
- func (d *Fan) AddMessageHandler()
- func (d *Fan) AnnounceAvailable()
- func (d *Fan) DeleteTopic()
- func (d *Fan) GetDomainEntity() string
- func (d *Fan) GetMQTTFields() (fields MQTTFields)
- func (d *Fan) GetName() string
- func (d *Fan) GetRawId() string
- func (d *Fan) GetUniqueId() string
- func (d *Fan) Initialize()
- func (d *Fan) JsonAttributes(s string)
- func (d *Fan) Oscillation(s string)
- func (d *Fan) Percentage(s string)
- func (d *Fan) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Fan) PresetMode(s string)
- func (d *Fan) SetMQTTFields(fields MQTTFields)
- func (d *Fan) State(s string)
- func (d *Fan) Subscribe()
- func (d *Fan) UnSubscribe()
- func (d *Fan) UpdateState()
- type FanOptions
- func (o *FanOptions) AvailabilityFunc(f func() string) *FanOptions
- func (o *FanOptions) AvailabilityMode(mode string) *FanOptions
- func (o *FanOptions) AvailabilityTemplate(template string) *FanOptions
- func (o *FanOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
- func (o *FanOptions) CommandTemplate(template string) *FanOptions
- func (o *FanOptions) EnableOscillation() *FanOptions
- func (o *FanOptions) EnablePercentage() *FanOptions
- func (o *FanOptions) EnablePresetMode() *FanOptions
- func (o *FanOptions) EnabledByDefault(d bool) *FanOptions
- func (o *FanOptions) Encoding(encoding string) *FanOptions
- func (o *FanOptions) EntityCategory(category string) *FanOptions
- func (o *FanOptions) Icon(icon string) *FanOptions
- func (o *FanOptions) JsonAttributesFunc(f func() string) *FanOptions
- func (o *FanOptions) JsonAttributesTemplate(template string) *FanOptions
- func (o *FanOptions) Name(name string) *FanOptions
- func (o *FanOptions) ObjectId(id string) *FanOptions
- func (o *FanOptions) Optimistic(optimistic bool) *FanOptions
- func (o *FanOptions) OscillationCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
- func (o *FanOptions) OscillationCommandTemplate(template string) *FanOptions
- func (o *FanOptions) OscillationStateFunc(f func() string) *FanOptions
- func (o *FanOptions) OscillationValueTemplate(template string) *FanOptions
- func (o *FanOptions) PayloadAvailable(available string) *FanOptions
- func (o *FanOptions) PayloadNotAvailable(available string) *FanOptions
- func (o *FanOptions) PayloadOff(off string) *FanOptions
- func (o *FanOptions) PayloadOn(on string) *FanOptions
- func (o *FanOptions) PayloadOscillationOff(off string) *FanOptions
- func (o *FanOptions) PayloadOscillationOn(on string) *FanOptions
- func (o *FanOptions) PayloadResetPercentage(percentage string) *FanOptions
- func (o *FanOptions) PayloadResetPresetMode(mode string) *FanOptions
- func (o *FanOptions) PercentageCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
- func (o *FanOptions) PercentageCommandTemplate(template string) *FanOptions
- func (o *FanOptions) PercentageStateFunc(f func() string) *FanOptions
- func (o *FanOptions) PercentageValueTemplate(template string) *FanOptions
- func (o *FanOptions) PresetModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
- func (o *FanOptions) PresetModeCommandTemplate(template string) *FanOptions
- func (o *FanOptions) PresetModeStateFunc(f func() string) *FanOptions
- func (o *FanOptions) PresetModeValueTemplate(template string) *FanOptions
- func (o *FanOptions) PresetModes(modes []string) *FanOptions
- func (o *FanOptions) Qos(qos int) *FanOptions
- func (o *FanOptions) Retain(retain bool) *FanOptions
- func (o *FanOptions) SpeedRangeMax(max int) *FanOptions
- func (o *FanOptions) SpeedRangeMin(min int) *FanOptions
- func (o *FanOptions) StateFunc(f func() string) *FanOptions
- func (o *FanOptions) StateValueTemplate(template string) *FanOptions
- func (o *FanOptions) States() *FanState
- func (o *FanOptions) UniqueId(id string) *FanOptions
- type FanState
- type Humidifier
- func (d *Humidifier) AddMessageHandler()
- func (d *Humidifier) AnnounceAvailable()
- func (d *Humidifier) DeleteTopic()
- func (d *Humidifier) GetDomainEntity() string
- func (d *Humidifier) GetMQTTFields() (fields MQTTFields)
- func (d *Humidifier) GetName() string
- func (d *Humidifier) GetRawId() string
- func (d *Humidifier) GetUniqueId() string
- func (d *Humidifier) Initialize()
- func (d *Humidifier) JsonAttributes(s string)
- func (d *Humidifier) Mode(s string)
- func (d *Humidifier) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Humidifier) SetMQTTFields(fields MQTTFields)
- func (d *Humidifier) State(s string)
- func (d *Humidifier) Subscribe()
- func (d *Humidifier) TargetHumidity(s string)
- func (d *Humidifier) UnSubscribe()
- func (d *Humidifier) UpdateState()
- type HumidifierOptions
- func (o *HumidifierOptions) AvailabilityFunc(f func() string) *HumidifierOptions
- func (o *HumidifierOptions) AvailabilityMode(mode string) *HumidifierOptions
- func (o *HumidifierOptions) AvailabilityTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
- func (o *HumidifierOptions) CommandTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) DeviceClass(class string) *HumidifierOptions
- func (o *HumidifierOptions) EnableMode() *HumidifierOptions
- func (o *HumidifierOptions) EnableTargetHumidity() *HumidifierOptions
- func (o *HumidifierOptions) EnabledByDefault(d bool) *HumidifierOptions
- func (o *HumidifierOptions) Encoding(encoding string) *HumidifierOptions
- func (o *HumidifierOptions) EntityCategory(category string) *HumidifierOptions
- func (o *HumidifierOptions) Icon(icon string) *HumidifierOptions
- func (o *HumidifierOptions) JsonAttributesFunc(f func() string) *HumidifierOptions
- func (o *HumidifierOptions) JsonAttributesTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) MaxHumidity(humidity int) *HumidifierOptions
- func (o *HumidifierOptions) MinHumidity(humidity int) *HumidifierOptions
- func (o *HumidifierOptions) ModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
- func (o *HumidifierOptions) ModeCommandTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) ModeStateFunc(f func() string) *HumidifierOptions
- func (o *HumidifierOptions) ModeStateTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) Modes(modes []string) *HumidifierOptions
- func (o *HumidifierOptions) Name(name string) *HumidifierOptions
- func (o *HumidifierOptions) ObjectId(id string) *HumidifierOptions
- func (o *HumidifierOptions) Optimistic(optimistic bool) *HumidifierOptions
- func (o *HumidifierOptions) PayloadAvailable(available string) *HumidifierOptions
- func (o *HumidifierOptions) PayloadNotAvailable(available string) *HumidifierOptions
- func (o *HumidifierOptions) PayloadOff(off string) *HumidifierOptions
- func (o *HumidifierOptions) PayloadOn(on string) *HumidifierOptions
- func (o *HumidifierOptions) PayloadResetHumidity(humidity string) *HumidifierOptions
- func (o *HumidifierOptions) PayloadResetMode(mode string) *HumidifierOptions
- func (o *HumidifierOptions) Qos(qos int) *HumidifierOptions
- func (o *HumidifierOptions) Retain(retain bool) *HumidifierOptions
- func (o *HumidifierOptions) StateFunc(f func() string) *HumidifierOptions
- func (o *HumidifierOptions) StateValueTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) States() *HumidifierState
- func (o *HumidifierOptions) TargetHumidityCommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
- func (o *HumidifierOptions) TargetHumidityCommandTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) TargetHumidityStateFunc(f func() string) *HumidifierOptions
- func (o *HumidifierOptions) TargetHumidityStateTemplate(template string) *HumidifierOptions
- func (o *HumidifierOptions) UniqueId(id string) *HumidifierOptions
- type HumidifierState
- type Light
- func (d *Light) AddMessageHandler()
- func (d *Light) AnnounceAvailable()
- func (d *Light) Brightness(s string)
- func (d *Light) ColorMode(s string)
- func (d *Light) ColorTemp(s string)
- func (d *Light) DeleteTopic()
- func (d *Light) Effect(s string)
- func (d *Light) GetDomainEntity() string
- func (d *Light) GetMQTTFields() (fields MQTTFields)
- func (d *Light) GetName() string
- func (d *Light) GetRawId() string
- func (d *Light) GetUniqueId() string
- func (d *Light) Hs(s string)
- func (d *Light) Initialize()
- func (d *Light) JsonAttributes(s string)
- func (d *Light) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Light) Rgb(s string)
- func (d *Light) Rgbw(s string)
- func (d *Light) Rgbww(s string)
- func (d *Light) SetMQTTFields(fields MQTTFields)
- func (d *Light) State(s string)
- func (d *Light) Subscribe()
- func (d *Light) UnSubscribe()
- func (d *Light) UpdateState()
- func (d *Light) Xy(s string)
- type LightOptions
- func (o *LightOptions) AvailabilityFunc(f func() string) *LightOptions
- func (o *LightOptions) AvailabilityMode(mode string) *LightOptions
- func (o *LightOptions) AvailabilityTemplate(template string) *LightOptions
- func (o *LightOptions) BrightnessCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) BrightnessCommandTemplate(template string) *LightOptions
- func (o *LightOptions) BrightnessScale(scale int) *LightOptions
- func (o *LightOptions) BrightnessStateFunc(f func() string) *LightOptions
- func (o *LightOptions) BrightnessValueTemplate(template string) *LightOptions
- func (o *LightOptions) ColorModeStateFunc(f func() string) *LightOptions
- func (o *LightOptions) ColorModeValueTemplate(template string) *LightOptions
- func (o *LightOptions) ColorTempCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) ColorTempCommandTemplate(template string) *LightOptions
- func (o *LightOptions) ColorTempStateFunc(f func() string) *LightOptions
- func (o *LightOptions) ColorTempValueTemplate(template string) *LightOptions
- func (o *LightOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) EffectCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) EffectCommandTemplate(template string) *LightOptions
- func (o *LightOptions) EffectList(list []string) *LightOptions
- func (o *LightOptions) EffectStateFunc(f func() string) *LightOptions
- func (o *LightOptions) EffectValueTemplate(template string) *LightOptions
- func (o *LightOptions) EnableBrightness() *LightOptions
- func (o *LightOptions) EnableColorTemp() *LightOptions
- func (o *LightOptions) EnableEffect() *LightOptions
- func (o *LightOptions) EnableHs() *LightOptions
- func (o *LightOptions) EnableRgb() *LightOptions
- func (o *LightOptions) EnableRgbw() *LightOptions
- func (o *LightOptions) EnableRgbww() *LightOptions
- func (o *LightOptions) EnableXy() *LightOptions
- func (o *LightOptions) EnabledByDefault(d bool) *LightOptions
- func (o *LightOptions) Encoding(encoding string) *LightOptions
- func (o *LightOptions) EntityCategory(category string) *LightOptions
- func (o *LightOptions) HsCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) HsCommandTemplate(template string) *LightOptions
- func (o *LightOptions) HsStateFunc(f func() string) *LightOptions
- func (o *LightOptions) HsValueTemplate(template string) *LightOptions
- func (o *LightOptions) Icon(icon string) *LightOptions
- func (o *LightOptions) JsonAttributesFunc(f func() string) *LightOptions
- func (o *LightOptions) JsonAttributesTemplate(template string) *LightOptions
- func (o *LightOptions) MaxMireds(mireds int) *LightOptions
- func (o *LightOptions) MinMireds(mireds int) *LightOptions
- func (o *LightOptions) Name(name string) *LightOptions
- func (o *LightOptions) ObjectId(id string) *LightOptions
- func (o *LightOptions) OnCommandType(t string) *LightOptions
- func (o *LightOptions) Optimistic(optimistic bool) *LightOptions
- func (o *LightOptions) PayloadAvailable(available string) *LightOptions
- func (o *LightOptions) PayloadNotAvailable(available string) *LightOptions
- func (o *LightOptions) PayloadOff(off string) *LightOptions
- func (o *LightOptions) PayloadOn(on string) *LightOptions
- func (o *LightOptions) Qos(qos int) *LightOptions
- func (o *LightOptions) Retain(retain bool) *LightOptions
- func (o *LightOptions) RgbCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) RgbCommandTemplate(template string) *LightOptions
- func (o *LightOptions) RgbStateFunc(f func() string) *LightOptions
- func (o *LightOptions) RgbValueTemplate(template string) *LightOptions
- func (o *LightOptions) RgbwCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) RgbwCommandTemplate(template string) *LightOptions
- func (o *LightOptions) RgbwStateFunc(f func() string) *LightOptions
- func (o *LightOptions) RgbwValueTemplate(template string) *LightOptions
- func (o *LightOptions) RgbwwCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) RgbwwCommandTemplate(template string) *LightOptions
- func (o *LightOptions) RgbwwStateFunc(f func() string) *LightOptions
- func (o *LightOptions) RgbwwValueTemplate(template string) *LightOptions
- func (o *LightOptions) Schema(schema string) *LightOptions
- func (o *LightOptions) StateFunc(f func() string) *LightOptions
- func (o *LightOptions) StateValueTemplate(template string) *LightOptions
- func (o *LightOptions) States() *LightState
- func (o *LightOptions) UniqueId(id string) *LightOptions
- func (o *LightOptions) WhiteCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) WhiteScale(scale int) *LightOptions
- func (o *LightOptions) XyCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
- func (o *LightOptions) XyCommandTemplate(template string) *LightOptions
- func (o *LightOptions) XyStateFunc(f func() string) *LightOptions
- func (o *LightOptions) XyValueTemplate(template string) *LightOptions
- type LightRef
- type LightRefOptions
- type LightState
- type Lock
- func (d *Lock) AddMessageHandler()
- func (d *Lock) AnnounceAvailable()
- func (d *Lock) DeleteTopic()
- func (d *Lock) GetDomainEntity() string
- func (d *Lock) GetMQTTFields() (fields MQTTFields)
- func (d *Lock) GetName() string
- func (d *Lock) GetRawId() string
- func (d *Lock) GetUniqueId() string
- func (d *Lock) Initialize()
- func (d *Lock) JsonAttributes(s string)
- func (d *Lock) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Lock) SetMQTTFields(fields MQTTFields)
- func (d *Lock) State(s string)
- func (d *Lock) Subscribe()
- func (d *Lock) UnSubscribe()
- func (d *Lock) UpdateState()
- type LockOptions
- func (o *LockOptions) AvailabilityFunc(f func() string) *LockOptions
- func (o *LockOptions) AvailabilityMode(mode string) *LockOptions
- func (o *LockOptions) AvailabilityTemplate(template string) *LockOptions
- func (o *LockOptions) CodeFormat(format string) *LockOptions
- func (o *LockOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *LockOptions
- func (o *LockOptions) CommandTemplate(template string) *LockOptions
- func (o *LockOptions) EnabledByDefault(d bool) *LockOptions
- func (o *LockOptions) Encoding(encoding string) *LockOptions
- func (o *LockOptions) EntityCategory(category string) *LockOptions
- func (o *LockOptions) Icon(icon string) *LockOptions
- func (o *LockOptions) JsonAttributesFunc(f func() string) *LockOptions
- func (o *LockOptions) JsonAttributesTemplate(template string) *LockOptions
- func (o *LockOptions) Name(name string) *LockOptions
- func (o *LockOptions) ObjectId(id string) *LockOptions
- func (o *LockOptions) Optimistic(optimistic bool) *LockOptions
- func (o *LockOptions) PayloadAvailable(available string) *LockOptions
- func (o *LockOptions) PayloadLock(lock string) *LockOptions
- func (o *LockOptions) PayloadNotAvailable(available string) *LockOptions
- func (o *LockOptions) PayloadOpen(open string) *LockOptions
- func (o *LockOptions) PayloadUnlock(unlock string) *LockOptions
- func (o *LockOptions) Qos(qos int) *LockOptions
- func (o *LockOptions) Retain(retain bool) *LockOptions
- func (o *LockOptions) StateFunc(f func() string) *LockOptions
- func (o *LockOptions) StateJammed(jammed string) *LockOptions
- func (o *LockOptions) StateLocked(locked string) *LockOptions
- func (o *LockOptions) StateLocking(locking string) *LockOptions
- func (o *LockOptions) StateUnlocked(unlocked string) *LockOptions
- func (o *LockOptions) StateUnlocking(unlocking string) *LockOptions
- func (o *LockOptions) States() *LockState
- func (o *LockOptions) UniqueId(id string) *LockOptions
- func (o *LockOptions) ValueTemplate(template string) *LockOptions
- type LockState
- type MQTTFields
- type Number
- func (d *Number) AddMessageHandler()
- func (d *Number) AnnounceAvailable()
- func (d *Number) DeleteTopic()
- func (d *Number) GetDomainEntity() string
- func (d *Number) GetMQTTFields() (fields MQTTFields)
- func (d *Number) GetName() string
- func (d *Number) GetRawId() string
- func (d *Number) GetUniqueId() string
- func (d *Number) Initialize()
- func (d *Number) JsonAttributes(s string)
- func (d *Number) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Number) SetMQTTFields(fields MQTTFields)
- func (d *Number) State(s string)
- func (d *Number) Subscribe()
- func (d *Number) UnSubscribe()
- func (d *Number) UpdateState()
- type NumberOptions
- func (o *NumberOptions) AvailabilityFunc(f func() string) *NumberOptions
- func (o *NumberOptions) AvailabilityMode(mode string) *NumberOptions
- func (o *NumberOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *NumberOptions
- func (o *NumberOptions) CommandTemplate(template string) *NumberOptions
- func (o *NumberOptions) DeviceClass(class string) *NumberOptions
- func (o *NumberOptions) EnabledByDefault(d bool) *NumberOptions
- func (o *NumberOptions) Encoding(encoding string) *NumberOptions
- func (o *NumberOptions) EntityCategory(category string) *NumberOptions
- func (o *NumberOptions) Icon(icon string) *NumberOptions
- func (o *NumberOptions) JsonAttributesFunc(f func() string) *NumberOptions
- func (o *NumberOptions) JsonAttributesTemplate(template string) *NumberOptions
- func (o *NumberOptions) Max(max float64) *NumberOptions
- func (o *NumberOptions) Min(min float64) *NumberOptions
- func (o *NumberOptions) Mode(mode string) *NumberOptions
- func (o *NumberOptions) Name(name string) *NumberOptions
- func (o *NumberOptions) ObjectId(id string) *NumberOptions
- func (o *NumberOptions) Optimistic(optimistic bool) *NumberOptions
- func (o *NumberOptions) PayloadReset(reset string) *NumberOptions
- func (o *NumberOptions) Qos(qos int) *NumberOptions
- func (o *NumberOptions) Retain(retain bool) *NumberOptions
- func (o *NumberOptions) StateFunc(f func() string) *NumberOptions
- func (o *NumberOptions) States() *NumberState
- func (o *NumberOptions) Step(step float64) *NumberOptions
- func (o *NumberOptions) UniqueId(id string) *NumberOptions
- func (o *NumberOptions) UnitOfMeasurement(measurement string) *NumberOptions
- func (o *NumberOptions) ValueTemplate(template string) *NumberOptions
- type NumberState
- type Scene
- func (d *Scene) AddMessageHandler()
- func (d *Scene) AnnounceAvailable()
- func (d *Scene) DeleteTopic()
- func (d *Scene) GetDomainEntity() string
- func (d *Scene) GetMQTTFields() (fields MQTTFields)
- func (d *Scene) GetName() string
- func (d *Scene) GetRawId() string
- func (d *Scene) GetUniqueId() string
- func (d *Scene) Initialize()
- func (d *Scene) PopulateDevice(_ string, _ string, _ string, _ string, _ string)
- func (d *Scene) SetMQTTFields(fields MQTTFields)
- func (d *Scene) Subscribe()
- func (d *Scene) UnSubscribe()
- func (d *Scene) UpdateState()
- type SceneOptions
- func (o *SceneOptions) AvailabilityFunc(f func() string) *SceneOptions
- func (o *SceneOptions) AvailabilityMode(mode string) *SceneOptions
- func (o *SceneOptions) AvailabilityTemplate(template string) *SceneOptions
- func (o *SceneOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SceneOptions
- func (o *SceneOptions) EnabledByDefault(d bool) *SceneOptions
- func (o *SceneOptions) EntityCategory(category string) *SceneOptions
- func (o *SceneOptions) Icon(icon string) *SceneOptions
- func (o *SceneOptions) Name(name string) *SceneOptions
- func (o *SceneOptions) ObjectId(id string) *SceneOptions
- func (o *SceneOptions) PayloadAvailable(available string) *SceneOptions
- func (o *SceneOptions) PayloadNotAvailable(available string) *SceneOptions
- func (o *SceneOptions) PayloadOn(on string) *SceneOptions
- func (o *SceneOptions) Qos(qos int) *SceneOptions
- func (o *SceneOptions) Retain(retain bool) *SceneOptions
- func (o *SceneOptions) States() *SceneState
- func (o *SceneOptions) UniqueId(id string) *SceneOptions
- type SceneState
- type Select
- func (d *Select) AddMessageHandler()
- func (d *Select) AnnounceAvailable()
- func (d *Select) DeleteTopic()
- func (d *Select) GetDomainEntity() string
- func (d *Select) GetMQTTFields() (fields MQTTFields)
- func (d *Select) GetName() string
- func (d *Select) GetRawId() string
- func (d *Select) GetUniqueId() string
- func (d *Select) Initialize()
- func (d *Select) JsonAttributes(s string)
- func (d *Select) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Select) SetMQTTFields(fields MQTTFields)
- func (d *Select) State(s string)
- func (d *Select) Subscribe()
- func (d *Select) UnSubscribe()
- func (d *Select) UpdateState()
- type SelectOptions
- func (o *SelectOptions) AvailabilityFunc(f func() string) *SelectOptions
- func (o *SelectOptions) AvailabilityMode(mode string) *SelectOptions
- func (o *SelectOptions) AvailabilityTemplate(template string) *SelectOptions
- func (o *SelectOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SelectOptions
- func (o *SelectOptions) CommandTemplate(template string) *SelectOptions
- func (o *SelectOptions) EnabledByDefault(d bool) *SelectOptions
- func (o *SelectOptions) Encoding(encoding string) *SelectOptions
- func (o *SelectOptions) EntityCategory(category string) *SelectOptions
- func (o *SelectOptions) Icon(icon string) *SelectOptions
- func (o *SelectOptions) JsonAttributesFunc(f func() string) *SelectOptions
- func (o *SelectOptions) JsonAttributesTemplate(template string) *SelectOptions
- func (o *SelectOptions) Name(name string) *SelectOptions
- func (o *SelectOptions) ObjectId(id string) *SelectOptions
- func (o *SelectOptions) Optimistic(optimistic bool) *SelectOptions
- func (o *SelectOptions) Options(options []string) *SelectOptions
- func (o *SelectOptions) Qos(qos int) *SelectOptions
- func (o *SelectOptions) Retain(retain bool) *SelectOptions
- func (o *SelectOptions) StateFunc(f func() string) *SelectOptions
- func (o *SelectOptions) States() *SelectState
- func (o *SelectOptions) UniqueId(id string) *SelectOptions
- func (o *SelectOptions) ValueTemplate(template string) *SelectOptions
- type SelectState
- type Sensor
- func (d *Sensor) AddMessageHandler()
- func (d *Sensor) AnnounceAvailable()
- func (d *Sensor) DeleteTopic()
- func (d *Sensor) GetDomainEntity() string
- func (d *Sensor) GetMQTTFields() (fields MQTTFields)
- func (d *Sensor) GetName() string
- func (d *Sensor) GetRawId() string
- func (d *Sensor) GetUniqueId() string
- func (d *Sensor) Initialize()
- func (d *Sensor) JsonAttributes(s string)
- func (d *Sensor) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Sensor) SetMQTTFields(fields MQTTFields)
- func (d *Sensor) State(s string)
- func (d *Sensor) Subscribe()
- func (d *Sensor) UnSubscribe()
- func (d *Sensor) UpdateState()
- type SensorOptions
- func (o *SensorOptions) AvailabilityFunc(f func() string) *SensorOptions
- func (o *SensorOptions) AvailabilityMode(mode string) *SensorOptions
- func (o *SensorOptions) AvailabilityTemplate(template string) *SensorOptions
- func (o *SensorOptions) DeviceClass(class string) *SensorOptions
- func (o *SensorOptions) EnabledByDefault(d bool) *SensorOptions
- func (o *SensorOptions) Encoding(encoding string) *SensorOptions
- func (o *SensorOptions) EntityCategory(category string) *SensorOptions
- func (o *SensorOptions) ExpireAfter(after int) *SensorOptions
- func (o *SensorOptions) ForceUpdate(update bool) *SensorOptions
- func (o *SensorOptions) Icon(icon string) *SensorOptions
- func (o *SensorOptions) JsonAttributesFunc(f func() string) *SensorOptions
- func (o *SensorOptions) JsonAttributesTemplate(template string) *SensorOptions
- func (o *SensorOptions) LastResetValueTemplate(template string) *SensorOptions
- func (o *SensorOptions) Name(name string) *SensorOptions
- func (o *SensorOptions) ObjectId(id string) *SensorOptions
- func (o *SensorOptions) PayloadAvailable(available string) *SensorOptions
- func (o *SensorOptions) PayloadNotAvailable(available string) *SensorOptions
- func (o *SensorOptions) Qos(qos int) *SensorOptions
- func (o *SensorOptions) StateClass(class string) *SensorOptions
- func (o *SensorOptions) StateFunc(f func() string) *SensorOptions
- func (o *SensorOptions) States() *SensorState
- func (o *SensorOptions) SuggestedDisplayPrecision(precision int) *SensorOptions
- func (o *SensorOptions) UniqueId(id string) *SensorOptions
- func (o *SensorOptions) UnitOfMeasurement(measurement string) *SensorOptions
- func (o *SensorOptions) ValueTemplate(template string) *SensorOptions
- type SensorState
- type Siren
- func (d *Siren) AddMessageHandler()
- func (d *Siren) AnnounceAvailable()
- func (d *Siren) DeleteTopic()
- func (d *Siren) GetDomainEntity() string
- func (d *Siren) GetMQTTFields() (fields MQTTFields)
- func (d *Siren) GetName() string
- func (d *Siren) GetRawId() string
- func (d *Siren) GetUniqueId() string
- func (d *Siren) Initialize()
- func (d *Siren) JsonAttributes(s string)
- func (d *Siren) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Siren) SetMQTTFields(fields MQTTFields)
- func (d *Siren) State(s string)
- func (d *Siren) Subscribe()
- func (d *Siren) UnSubscribe()
- func (d *Siren) UpdateState()
- type SirenOptions
- func (o *SirenOptions) AvailabilityFunc(f func() string) *SirenOptions
- func (o *SirenOptions) AvailabilityMode(mode string) *SirenOptions
- func (o *SirenOptions) AvailabilityTemplate(template string) *SirenOptions
- func (o *SirenOptions) AvailableTones(tones []string) *SirenOptions
- func (o *SirenOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SirenOptions
- func (o *SirenOptions) CommandOffTemplate(template string) *SirenOptions
- func (o *SirenOptions) CommandTemplate(template string) *SirenOptions
- func (o *SirenOptions) EnabledByDefault(d bool) *SirenOptions
- func (o *SirenOptions) Encoding(encoding string) *SirenOptions
- func (o *SirenOptions) EntityCategory(category string) *SirenOptions
- func (o *SirenOptions) Icon(icon string) *SirenOptions
- func (o *SirenOptions) JsonAttributesFunc(f func() string) *SirenOptions
- func (o *SirenOptions) JsonAttributesTemplate(template string) *SirenOptions
- func (o *SirenOptions) Name(name string) *SirenOptions
- func (o *SirenOptions) ObjectId(id string) *SirenOptions
- func (o *SirenOptions) Optimistic(optimistic bool) *SirenOptions
- func (o *SirenOptions) PayloadAvailable(available string) *SirenOptions
- func (o *SirenOptions) PayloadNotAvailable(available string) *SirenOptions
- func (o *SirenOptions) PayloadOff(off string) *SirenOptions
- func (o *SirenOptions) PayloadOn(on string) *SirenOptions
- func (o *SirenOptions) Qos(qos int) *SirenOptions
- func (o *SirenOptions) Retain(retain bool) *SirenOptions
- func (o *SirenOptions) StateFunc(f func() string) *SirenOptions
- func (o *SirenOptions) StateOff(off string) *SirenOptions
- func (o *SirenOptions) StateOn(on string) *SirenOptions
- func (o *SirenOptions) StateValueTemplate(template string) *SirenOptions
- func (o *SirenOptions) States() *SirenState
- func (o *SirenOptions) SupportDuration(duration bool) *SirenOptions
- func (o *SirenOptions) SupportVolumeSet(set bool) *SirenOptions
- func (o *SirenOptions) UniqueId(id string) *SirenOptions
- type SirenState
- type StateStore
- type Switch
- func (d *Switch) AddMessageHandler()
- func (d *Switch) AnnounceAvailable()
- func (d *Switch) DeleteTopic()
- func (d *Switch) GetDomainEntity() string
- func (d *Switch) GetMQTTFields() (fields MQTTFields)
- func (d *Switch) GetName() string
- func (d *Switch) GetRawId() string
- func (d *Switch) GetUniqueId() string
- func (d *Switch) Initialize()
- func (d *Switch) JsonAttributes(s string)
- func (d *Switch) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Switch) SetMQTTFields(fields MQTTFields)
- func (d *Switch) State(s string)
- func (d *Switch) Subscribe()
- func (d *Switch) UnSubscribe()
- func (d *Switch) UpdateState()
- type SwitchOptions
- func (o *SwitchOptions) AvailabilityFunc(f func() string) *SwitchOptions
- func (o *SwitchOptions) AvailabilityMode(mode string) *SwitchOptions
- func (o *SwitchOptions) AvailabilityTemplate(template string) *SwitchOptions
- func (o *SwitchOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SwitchOptions
- func (o *SwitchOptions) DeviceClass(class string) *SwitchOptions
- func (o *SwitchOptions) EnabledByDefault(d bool) *SwitchOptions
- func (o *SwitchOptions) Encoding(encoding string) *SwitchOptions
- func (o *SwitchOptions) EntityCategory(category string) *SwitchOptions
- func (o *SwitchOptions) Icon(icon string) *SwitchOptions
- func (o *SwitchOptions) JsonAttributesFunc(f func() string) *SwitchOptions
- func (o *SwitchOptions) JsonAttributesTemplate(template string) *SwitchOptions
- func (o *SwitchOptions) Name(name string) *SwitchOptions
- func (o *SwitchOptions) ObjectId(id string) *SwitchOptions
- func (o *SwitchOptions) Optimistic(optimistic bool) *SwitchOptions
- func (o *SwitchOptions) PayloadAvailable(available string) *SwitchOptions
- func (o *SwitchOptions) PayloadNotAvailable(available string) *SwitchOptions
- func (o *SwitchOptions) PayloadOff(off string) *SwitchOptions
- func (o *SwitchOptions) PayloadOn(on string) *SwitchOptions
- func (o *SwitchOptions) Qos(qos int) *SwitchOptions
- func (o *SwitchOptions) Retain(retain bool) *SwitchOptions
- func (o *SwitchOptions) StateFunc(f func() string) *SwitchOptions
- func (o *SwitchOptions) StateOff(off string) *SwitchOptions
- func (o *SwitchOptions) StateOn(on string) *SwitchOptions
- func (o *SwitchOptions) States() *SwitchState
- func (o *SwitchOptions) UniqueId(id string) *SwitchOptions
- func (o *SwitchOptions) ValueTemplate(template string) *SwitchOptions
- type SwitchState
- type Tag
- func (d *Tag) AddMessageHandler()
- func (d *Tag) AnnounceAvailable()
- func (d *Tag) DeleteTopic()
- func (d Tag) GetDomainEntity() string
- func (d *Tag) GetMQTTFields() (fields MQTTFields)
- func (d Tag) GetName() string
- func (d *Tag) GetRawId() string
- func (d Tag) GetUniqueId() string
- func (d *Tag) Initialize()
- func (d *Tag) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Tag) SetMQTTFields(fields MQTTFields)
- func (d *Tag) State(s string)
- func (d *Tag) Subscribe()
- func (d *Tag) UnSubscribe()
- func (d *Tag) UpdateState()
- type TagOptions
- type TagState
- type Text
- func (d *Text) AddMessageHandler()
- func (d *Text) AnnounceAvailable()
- func (d *Text) DeleteTopic()
- func (d *Text) GetDomainEntity() string
- func (d *Text) GetMQTTFields() (fields MQTTFields)
- func (d *Text) GetName() string
- func (d *Text) GetRawId() string
- func (d *Text) GetUniqueId() string
- func (d *Text) Initialize()
- func (d *Text) JsonAttributes(s string)
- func (d *Text) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Text) SetMQTTFields(fields MQTTFields)
- func (d *Text) State(s string)
- func (d *Text) Subscribe()
- func (d *Text) UnSubscribe()
- func (d *Text) UpdateState()
- type TextOptions
- func (o *TextOptions) AvailabilityFunc(f func() string) *TextOptions
- func (o *TextOptions) AvailabilityMode(mode string) *TextOptions
- func (o *TextOptions) AvailabilityTemplate(template string) *TextOptions
- func (o *TextOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *TextOptions
- func (o *TextOptions) CommandTemplate(template string) *TextOptions
- func (o *TextOptions) EnabledByDefault(d bool) *TextOptions
- func (o *TextOptions) Encoding(encoding string) *TextOptions
- func (o *TextOptions) EntityCategory(category string) *TextOptions
- func (o *TextOptions) JsonAttributesFunc(f func() string) *TextOptions
- func (o *TextOptions) JsonAttributesTemplate(template string) *TextOptions
- func (o *TextOptions) Max(max int) *TextOptions
- func (o *TextOptions) Min(min int) *TextOptions
- func (o *TextOptions) Mode(mode string) *TextOptions
- func (o *TextOptions) Name(name string) *TextOptions
- func (o *TextOptions) ObjectId(id string) *TextOptions
- func (o *TextOptions) Pattern(pattern string) *TextOptions
- func (o *TextOptions) Qos(qos int) *TextOptions
- func (o *TextOptions) Retain(retain bool) *TextOptions
- func (o *TextOptions) StateFunc(f func() string) *TextOptions
- func (o *TextOptions) States() *TextState
- func (o *TextOptions) UniqueId(id string) *TextOptions
- func (o *TextOptions) ValueTemplate(template string) *TextOptions
- type TextState
- type Topic
- type Update
- func (d *Update) AddMessageHandler()
- func (d *Update) AnnounceAvailable()
- func (d *Update) DeleteTopic()
- func (d *Update) GetDomainEntity() string
- func (d *Update) GetMQTTFields() (fields MQTTFields)
- func (d *Update) GetName() string
- func (d *Update) GetRawId() string
- func (d *Update) GetUniqueId() string
- func (d *Update) Initialize()
- func (d *Update) JsonAttributes(s string)
- func (d *Update) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Update) SetMQTTFields(fields MQTTFields)
- func (d *Update) State(s string)
- func (d *Update) Subscribe()
- func (d *Update) UnSubscribe()
- func (d *Update) UpdateState()
- type UpdateOptions
- func (o *UpdateOptions) AvailabilityFunc(f func() string) *UpdateOptions
- func (o *UpdateOptions) AvailabilityMode(mode string) *UpdateOptions
- func (o *UpdateOptions) AvailabilityTemplate(template string) *UpdateOptions
- func (o *UpdateOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *UpdateOptions
- func (o *UpdateOptions) DeviceClass(class string) *UpdateOptions
- func (o *UpdateOptions) EnabledByDefault(d bool) *UpdateOptions
- func (o *UpdateOptions) Encoding(encoding string) *UpdateOptions
- func (o *UpdateOptions) EntityCategory(category string) *UpdateOptions
- func (o *UpdateOptions) EntityPicture(picture string) *UpdateOptions
- func (o *UpdateOptions) Icon(icon string) *UpdateOptions
- func (o *UpdateOptions) JsonAttributesFunc(f func() string) *UpdateOptions
- func (o *UpdateOptions) JsonAttributesTemplate(template string) *UpdateOptions
- func (o *UpdateOptions) LatestVersionFunc(f func(mqtt.Message, mqtt.Client)) *UpdateOptions
- func (o *UpdateOptions) LatestVersionTemplate(template string) *UpdateOptions
- func (o *UpdateOptions) Name(name string) *UpdateOptions
- func (o *UpdateOptions) ObjectId(id string) *UpdateOptions
- func (o *UpdateOptions) PayloadInstall(install string) *UpdateOptions
- func (o *UpdateOptions) Qos(qos int) *UpdateOptions
- func (o *UpdateOptions) ReleaseSummary(summary string) *UpdateOptions
- func (o *UpdateOptions) ReleaseUrl(url string) *UpdateOptions
- func (o *UpdateOptions) Retain(retain bool) *UpdateOptions
- func (o *UpdateOptions) StateFunc(f func() string) *UpdateOptions
- func (o *UpdateOptions) States() *UpdateState
- func (o *UpdateOptions) Title(title string) *UpdateOptions
- func (o *UpdateOptions) UniqueId(id string) *UpdateOptions
- func (o *UpdateOptions) ValueTemplate(template string) *UpdateOptions
- type UpdateState
- type Vacuum
- func (d *Vacuum) AddMessageHandler()
- func (d *Vacuum) AnnounceAvailable()
- func (d *Vacuum) DeleteTopic()
- func (d *Vacuum) GetDomainEntity() string
- func (d *Vacuum) GetMQTTFields() (fields MQTTFields)
- func (d *Vacuum) GetName() string
- func (d *Vacuum) GetRawId() string
- func (d *Vacuum) GetUniqueId() string
- func (d *Vacuum) Initialize()
- func (d *Vacuum) JsonAttributes(s string)
- func (d *Vacuum) PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, ...)
- func (d *Vacuum) SetMQTTFields(fields MQTTFields)
- func (d *Vacuum) State(s string)
- func (d *Vacuum) Subscribe()
- func (d *Vacuum) UnSubscribe()
- func (d *Vacuum) UpdateState()
- type VacuumOptions
- func (o *VacuumOptions) AvailabilityFunc(f func() string) *VacuumOptions
- func (o *VacuumOptions) AvailabilityMode(mode string) *VacuumOptions
- func (o *VacuumOptions) AvailabilityTemplate(template string) *VacuumOptions
- func (o *VacuumOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
- func (o *VacuumOptions) Encoding(encoding string) *VacuumOptions
- func (o *VacuumOptions) FanSpeedList(list []string) *VacuumOptions
- func (o *VacuumOptions) JsonAttributesFunc(f func() string) *VacuumOptions
- func (o *VacuumOptions) JsonAttributesTemplate(template string) *VacuumOptions
- func (o *VacuumOptions) Name(name string) *VacuumOptions
- func (o *VacuumOptions) ObjectId(id string) *VacuumOptions
- func (o *VacuumOptions) PayloadAvailable(available string) *VacuumOptions
- func (o *VacuumOptions) PayloadCleanSpot(spot string) *VacuumOptions
- func (o *VacuumOptions) PayloadLocate(locate string) *VacuumOptions
- func (o *VacuumOptions) PayloadNotAvailable(available string) *VacuumOptions
- func (o *VacuumOptions) PayloadPause(pause string) *VacuumOptions
- func (o *VacuumOptions) PayloadReturnToBase(base string) *VacuumOptions
- func (o *VacuumOptions) PayloadStart(start string) *VacuumOptions
- func (o *VacuumOptions) PayloadStop(stop string) *VacuumOptions
- func (o *VacuumOptions) Qos(qos int) *VacuumOptions
- func (o *VacuumOptions) Retain(retain bool) *VacuumOptions
- func (o *VacuumOptions) Schema(schema string) *VacuumOptions
- func (o *VacuumOptions) SendCommandFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
- func (o *VacuumOptions) SetFanSpeedFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
- func (o *VacuumOptions) StateFunc(f func() string) *VacuumOptions
- func (o *VacuumOptions) States() *VacuumState
- func (o *VacuumOptions) SupportedFeatures(features []string) *VacuumOptions
- func (o *VacuumOptions) UniqueId(id string) *VacuumOptions
- type VacuumState
Constants ¶
const DiscoveryPrefix = "homeassistant"
DiscoveryPrefix is the prefix that HA uses to discover on. Does not usually need changing.
Variables ¶
var InstanceName = "Better MQTT Room"
InstanceName is the instance name, helpful for identifying a given client
var Manufacturer = "Kjell Breiland"
var NodeID = "better-mqtt-room"
NodeID is the Node ID, that is, what that node connects under.
var SWVersion = "0.0.1"
SWVersion is the software version.
var SoftwareName = "Better MQTT Room"
Functions ¶
func AvailabilityFunc ¶
func AvailabilityFunc() string
func GetDiscoveryTopic ¶
func GetTopicPrefix ¶
func MakeMessageHandler ¶
func NewLightRef ¶ added in v0.2.0
func NewLightRef(opts *LightRefOptions)
Types ¶
type AlarmControlPanel ¶
type AlarmControlPanel struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." Code *string `json:"code,omitempty"` // "If defined, specifies a code to enable or disable the alarm in the frontend. Note that the code is validated locally and blocks sending MQTT messages to the remote device. For remote code validation, the code can be configured to either of the special values `REMOTE_CODE` (numeric code) or `REMOTE_CODE_TEXT` (text code). In this case, local code validation is bypassed but the frontend will still show a numeric or text code dialog. Use `command_template` to send the code to the remote device. Example configurations for remote code validation [can be found here](./#configurations-with-remote-code-validation)." CodeArmRequired *bool `json:"code_arm_required,omitempty"` // "If true the code is required to arm the alarm. If false the code is not validated." CodeDisarmRequired *bool `json:"code_disarm_required,omitempty"` // "If true the code is required to disarm the alarm. If false the code is not validated." CodeTriggerRequired *bool `json:"code_trigger_required,omitempty"` // "If true the code is required to trigger the alarm. If false the code is not validated." CommandTemplate *string `json:"command_template,omitempty"` // "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) used for the command payload. Available variables: `action` and `code`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the alarm state." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the alarm." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadArmAway *string `json:"payload_arm_away,omitempty"` // "The payload to set armed-away mode on your Alarm Panel." PayloadArmCustomBypass *string `json:"payload_arm_custom_bypass,omitempty"` // "The payload to set armed-custom-bypass mode on your Alarm Panel." PayloadArmHome *string `json:"payload_arm_home,omitempty"` // "The payload to set armed-home mode on your Alarm Panel." PayloadArmNight *string `json:"payload_arm_night,omitempty"` // "The payload to set armed-night mode on your Alarm Panel." PayloadArmVacation *string `json:"payload_arm_vacation,omitempty"` // "The payload to set armed-vacation mode on your Alarm Panel." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadDisarm *string `json:"payload_disarm,omitempty"` // "The payload to disarm your Alarm Panel." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadTrigger *string `json:"payload_trigger,omitempty"` // "The payload to trigger the alarm on your Alarm Panel." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this alarm panel. If two alarm panels have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the value." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *AlarmControlPanelState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewAlarmControlPanel ¶ added in v0.2.0
func NewAlarmControlPanel(o *AlarmControlPanelOptions) (*AlarmControlPanel, error)
func (*AlarmControlPanel) AddMessageHandler ¶
func (d *AlarmControlPanel) AddMessageHandler()
func (*AlarmControlPanel) AnnounceAvailable ¶
func (d *AlarmControlPanel) AnnounceAvailable()
func (*AlarmControlPanel) DeleteTopic ¶
func (d *AlarmControlPanel) DeleteTopic()
func (*AlarmControlPanel) GetDomainEntity ¶ added in v0.2.3
func (d *AlarmControlPanel) GetDomainEntity() string
func (*AlarmControlPanel) GetMQTTFields ¶
func (d *AlarmControlPanel) GetMQTTFields() (fields MQTTFields)
func (*AlarmControlPanel) GetName ¶
func (d *AlarmControlPanel) GetName() string
func (*AlarmControlPanel) GetRawId ¶
func (d *AlarmControlPanel) GetRawId() string
func (*AlarmControlPanel) GetUniqueId ¶
func (d *AlarmControlPanel) GetUniqueId() string
func (*AlarmControlPanel) Initialize ¶
func (d *AlarmControlPanel) Initialize()
func (*AlarmControlPanel) JsonAttributes ¶ added in v0.2.1
func (d *AlarmControlPanel) JsonAttributes(s string)
func (*AlarmControlPanel) PopulateDevice ¶
func (*AlarmControlPanel) SetMQTTFields ¶
func (d *AlarmControlPanel) SetMQTTFields(fields MQTTFields)
func (*AlarmControlPanel) State ¶ added in v0.2.1
func (d *AlarmControlPanel) State(s string)
func (*AlarmControlPanel) Subscribe ¶
func (d *AlarmControlPanel) Subscribe()
func (*AlarmControlPanel) UnSubscribe ¶
func (d *AlarmControlPanel) UnSubscribe()
func (*AlarmControlPanel) UpdateState ¶
func (d *AlarmControlPanel) UpdateState()
type AlarmControlPanelOptions ¶ added in v0.2.0
type AlarmControlPanelOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewAlarmControlPanelOptions ¶ added in v0.2.0
func NewAlarmControlPanelOptions() *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) AvailabilityFunc(f func() string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) AvailabilityMode ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) AvailabilityMode(mode string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) AvailabilityTemplate(template string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Code ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Code(code string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) CodeArmRequired ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) CodeArmRequired(required bool) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) CodeDisarmRequired ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) CodeDisarmRequired(required bool) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) CodeTriggerRequired ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) CodeTriggerRequired(required bool) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) CommandFunc ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) CommandTemplate ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) CommandTemplate(template string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) EnabledByDefault ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) EnabledByDefault(d bool) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Encoding ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Encoding(encoding string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) EntityCategory ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) EntityCategory(category string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Icon ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Icon(icon string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) JsonAttributesFunc(f func() string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) JsonAttributesTemplate(template string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Name ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Name(name string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) ObjectId ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) ObjectId(id string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadArmAway ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadArmAway(away string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadArmCustomBypass ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadArmCustomBypass(bypass string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadArmHome ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadArmHome(home string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadArmNight ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadArmNight(night string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadArmVacation ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadArmVacation(vacation string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadAvailable ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadAvailable(available string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadDisarm ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadDisarm(disarm string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadNotAvailable(available string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) PayloadTrigger ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) PayloadTrigger(trigger string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Qos ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Qos(qos int) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) Retain ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) Retain(retain bool) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) StateFunc ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) StateFunc(f func() string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) States ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) States() *AlarmControlPanelState
func (*AlarmControlPanelOptions) UniqueId ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) UniqueId(id string) *AlarmControlPanelOptions
func (*AlarmControlPanelOptions) ValueTemplate ¶ added in v0.2.0
func (o *AlarmControlPanelOptions) ValueTemplate(template string) *AlarmControlPanelOptions
type AlarmControlPanelState ¶ added in v0.2.0
type BinarySensor ¶
type BinarySensor struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If `availability` is not defined, the binary sensor will always be considered `available` and its state will be `on`, `off` or `unknown`. If `availability` is defined, the binary sensor will be considered as `unavailable` by default and the sensor's initial state will be `unavailable`. Must not be used together with `availability`." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "Sets the [class of the device](/integrations/binary_sensor/#device-class), changing the device state and icon that is displayed on the frontend." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." ExpireAfter *int `json:"expire_after,omitempty"` // "If set, it defines the number of seconds after the sensor's state expires, if it's not updated. After expiry, the sensor's state becomes `unavailable`. Default the sensors state never expires." ForceUpdate *bool `json:"force_update,omitempty"` // "Sends update events (which results in update of [state object](/docs/configuration/state_object/)'s `last_changed`) even if the sensor's state hasn't changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on *every* incoming state message (not only when the sensor's new state is different to the current one)." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the binary sensor." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" OffDelay *int `json:"off_delay,omitempty"` // "For sensors that only send `on` state updates (like PIRs), this variable sets a delay in seconds after which the sensor's state will be updated back to `off`." PayloadAvailable *string `json:"payload_available,omitempty"` // "The string that represents the `online` state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The string that represents the `offline` state." PayloadOff *string `json:"payload_off,omitempty"` // "The string that represents the `off` state. It will be compared to the message in the `state_topic` (see `value_template` for details)" PayloadOn *string `json:"payload_on,omitempty"` // "The string that represents the `on` state. It will be compared to the message in the `state_topic` (see `value_template` for details)" Qos *int `json:"qos,omitempty"` // "The maximum QoS level to be used when receiving messages." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive sensor's state." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that returns a string to be compared to `payload_on`/`payload_off` or an empty string, in which case the MQTT message will be removed. Remove this option when `payload_on` and `payload_off` are sufficient to match your payloads (i.e no pre-processing of original message is required)." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *BinarySensorState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewBinarySensor ¶ added in v0.2.0
func NewBinarySensor(o *BinarySensorOptions) (*BinarySensor, error)
func (*BinarySensor) AddMessageHandler ¶
func (d *BinarySensor) AddMessageHandler()
func (*BinarySensor) AnnounceAvailable ¶
func (d *BinarySensor) AnnounceAvailable()
func (*BinarySensor) DeleteTopic ¶
func (d *BinarySensor) DeleteTopic()
func (*BinarySensor) GetDomainEntity ¶ added in v0.2.3
func (d *BinarySensor) GetDomainEntity() string
func (*BinarySensor) GetMQTTFields ¶
func (d *BinarySensor) GetMQTTFields() (fields MQTTFields)
func (*BinarySensor) GetName ¶
func (d *BinarySensor) GetName() string
func (*BinarySensor) GetRawId ¶
func (d *BinarySensor) GetRawId() string
func (*BinarySensor) GetUniqueId ¶
func (d *BinarySensor) GetUniqueId() string
func (*BinarySensor) Initialize ¶
func (d *BinarySensor) Initialize()
func (*BinarySensor) JsonAttributes ¶ added in v0.2.1
func (d *BinarySensor) JsonAttributes(s string)
func (*BinarySensor) PopulateDevice ¶
func (*BinarySensor) SetMQTTFields ¶
func (d *BinarySensor) SetMQTTFields(fields MQTTFields)
func (*BinarySensor) State ¶ added in v0.2.1
func (d *BinarySensor) State(s string)
func (*BinarySensor) Subscribe ¶
func (d *BinarySensor) Subscribe()
func (*BinarySensor) UnSubscribe ¶
func (d *BinarySensor) UnSubscribe()
func (*BinarySensor) UpdateState ¶
func (d *BinarySensor) UpdateState()
type BinarySensorOptions ¶ added in v0.2.0
type BinarySensorOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewBinarySensorOptions ¶ added in v0.2.0
func NewBinarySensorOptions() *BinarySensorOptions
func (*BinarySensorOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *BinarySensorOptions) AvailabilityFunc(f func() string) *BinarySensorOptions
func (*BinarySensorOptions) AvailabilityMode ¶ added in v0.2.0
func (o *BinarySensorOptions) AvailabilityMode(mode string) *BinarySensorOptions
func (*BinarySensorOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *BinarySensorOptions) AvailabilityTemplate(template string) *BinarySensorOptions
func (*BinarySensorOptions) DeviceClass ¶ added in v0.2.0
func (o *BinarySensorOptions) DeviceClass(class string) *BinarySensorOptions
func (*BinarySensorOptions) EnabledByDefault ¶ added in v0.2.0
func (o *BinarySensorOptions) EnabledByDefault(d bool) *BinarySensorOptions
func (*BinarySensorOptions) Encoding ¶ added in v0.2.0
func (o *BinarySensorOptions) Encoding(encoding string) *BinarySensorOptions
func (*BinarySensorOptions) EntityCategory ¶ added in v0.2.0
func (o *BinarySensorOptions) EntityCategory(category string) *BinarySensorOptions
func (*BinarySensorOptions) ExpireAfter ¶ added in v0.2.0
func (o *BinarySensorOptions) ExpireAfter(after int) *BinarySensorOptions
func (*BinarySensorOptions) ForceUpdate ¶ added in v0.2.0
func (o *BinarySensorOptions) ForceUpdate(update bool) *BinarySensorOptions
func (*BinarySensorOptions) Icon ¶ added in v0.2.0
func (o *BinarySensorOptions) Icon(icon string) *BinarySensorOptions
func (*BinarySensorOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *BinarySensorOptions) JsonAttributesFunc(f func() string) *BinarySensorOptions
func (*BinarySensorOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *BinarySensorOptions) JsonAttributesTemplate(template string) *BinarySensorOptions
func (*BinarySensorOptions) Name ¶ added in v0.2.0
func (o *BinarySensorOptions) Name(name string) *BinarySensorOptions
func (*BinarySensorOptions) ObjectId ¶ added in v0.2.0
func (o *BinarySensorOptions) ObjectId(id string) *BinarySensorOptions
func (*BinarySensorOptions) OffDelay ¶ added in v0.2.0
func (o *BinarySensorOptions) OffDelay(delay int) *BinarySensorOptions
func (*BinarySensorOptions) PayloadAvailable ¶ added in v0.2.0
func (o *BinarySensorOptions) PayloadAvailable(available string) *BinarySensorOptions
func (*BinarySensorOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *BinarySensorOptions) PayloadNotAvailable(available string) *BinarySensorOptions
func (*BinarySensorOptions) PayloadOff ¶ added in v0.2.0
func (o *BinarySensorOptions) PayloadOff(off string) *BinarySensorOptions
func (*BinarySensorOptions) PayloadOn ¶ added in v0.2.0
func (o *BinarySensorOptions) PayloadOn(on string) *BinarySensorOptions
func (*BinarySensorOptions) Qos ¶ added in v0.2.0
func (o *BinarySensorOptions) Qos(qos int) *BinarySensorOptions
func (*BinarySensorOptions) StateFunc ¶ added in v0.2.0
func (o *BinarySensorOptions) StateFunc(f func() string) *BinarySensorOptions
func (*BinarySensorOptions) States ¶ added in v0.2.0
func (o *BinarySensorOptions) States() *BinarySensorState
func (*BinarySensorOptions) UniqueId ¶ added in v0.2.0
func (o *BinarySensorOptions) UniqueId(id string) *BinarySensorOptions
func (*BinarySensorOptions) ValueTemplate ¶ added in v0.2.0
func (o *BinarySensorOptions) ValueTemplate(template string) *BinarySensorOptions
type BinarySensorState ¶ added in v0.2.0
type Button ¶
type Button struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to trigger the button." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The [type/class](/integrations/button/#device-class) of the button to set the icon in the frontend." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the published messages." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name to use when displaying this button." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadPress *string `json:"payload_press,omitempty"` // "The payload To send to trigger the button." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this button entity. If two buttons have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *ButtonState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewButton ¶ added in v0.2.0
func NewButton(o *ButtonOptions) (*Button, error)
func (*Button) AddMessageHandler ¶
func (d *Button) AddMessageHandler()
func (*Button) AnnounceAvailable ¶
func (d *Button) AnnounceAvailable()
func (*Button) DeleteTopic ¶
func (d *Button) DeleteTopic()
func (*Button) GetDomainEntity ¶ added in v0.2.3
func (*Button) GetMQTTFields ¶
func (d *Button) GetMQTTFields() (fields MQTTFields)
func (*Button) GetUniqueId ¶
func (*Button) Initialize ¶
func (d *Button) Initialize()
func (*Button) JsonAttributes ¶ added in v0.2.1
func (*Button) PopulateDevice ¶
func (*Button) SetMQTTFields ¶
func (d *Button) SetMQTTFields(fields MQTTFields)
func (*Button) UnSubscribe ¶
func (d *Button) UnSubscribe()
func (*Button) UpdateState ¶
func (d *Button) UpdateState()
type ButtonOptions ¶ added in v0.2.0
type ButtonOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewButtonOptions ¶ added in v0.2.0
func NewButtonOptions() *ButtonOptions
func (*ButtonOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *ButtonOptions) AvailabilityFunc(f func() string) *ButtonOptions
func (*ButtonOptions) AvailabilityMode ¶ added in v0.2.0
func (o *ButtonOptions) AvailabilityMode(mode string) *ButtonOptions
func (*ButtonOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *ButtonOptions) AvailabilityTemplate(template string) *ButtonOptions
func (*ButtonOptions) CommandFunc ¶ added in v0.2.0
func (o *ButtonOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *ButtonOptions
func (*ButtonOptions) CommandTemplate ¶ added in v0.2.0
func (o *ButtonOptions) CommandTemplate(template string) *ButtonOptions
func (*ButtonOptions) DeviceClass ¶ added in v0.2.0
func (o *ButtonOptions) DeviceClass(class string) *ButtonOptions
func (*ButtonOptions) EnabledByDefault ¶ added in v0.2.0
func (o *ButtonOptions) EnabledByDefault(d bool) *ButtonOptions
func (*ButtonOptions) Encoding ¶ added in v0.2.0
func (o *ButtonOptions) Encoding(encoding string) *ButtonOptions
func (*ButtonOptions) EntityCategory ¶ added in v0.2.0
func (o *ButtonOptions) EntityCategory(category string) *ButtonOptions
func (*ButtonOptions) Icon ¶ added in v0.2.0
func (o *ButtonOptions) Icon(icon string) *ButtonOptions
func (*ButtonOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *ButtonOptions) JsonAttributesFunc(f func() string) *ButtonOptions
func (*ButtonOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *ButtonOptions) JsonAttributesTemplate(template string) *ButtonOptions
func (*ButtonOptions) Name ¶ added in v0.2.0
func (o *ButtonOptions) Name(name string) *ButtonOptions
func (*ButtonOptions) ObjectId ¶ added in v0.2.0
func (o *ButtonOptions) ObjectId(id string) *ButtonOptions
func (*ButtonOptions) PayloadAvailable ¶ added in v0.2.0
func (o *ButtonOptions) PayloadAvailable(available string) *ButtonOptions
func (*ButtonOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *ButtonOptions) PayloadNotAvailable(available string) *ButtonOptions
func (*ButtonOptions) PayloadPress ¶ added in v0.2.0
func (o *ButtonOptions) PayloadPress(press string) *ButtonOptions
func (*ButtonOptions) Qos ¶ added in v0.2.0
func (o *ButtonOptions) Qos(qos int) *ButtonOptions
func (*ButtonOptions) Retain ¶ added in v0.2.0
func (o *ButtonOptions) Retain(retain bool) *ButtonOptions
func (*ButtonOptions) States ¶ added in v0.2.0
func (o *ButtonOptions) States() *ButtonState
func (*ButtonOptions) UniqueId ¶ added in v0.2.0
func (o *ButtonOptions) UniqueId(id string) *ButtonOptions
type ButtonState ¶ added in v0.2.0
type ButtonState struct {
JsonAttributes string
}
type Camera ¶
type Camera struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received. Set to `\"\"` to disable decoding of incoming payload. Use `image_encoding` to enable `Base64` decoding on `topic`." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." ImageEncoding *string `json:"image_encoding,omitempty"` // "The encoding of the image payloads received. Set to `\"b64\"` to enable base64 decoding of image payload. If not set, the image payload must be raw binary data." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies `force_update` of the current sensor state when a message is received on this topic." Name *string `json:"name,omitempty"` // "The name of the camera." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" StateTopic *string `json:"topic,omitempty"` // "The MQTT topic to subscribe to." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this camera. If two cameras have the same unique ID Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *CameraState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewCamera ¶ added in v0.2.0
func NewCamera(o *CameraOptions) (*Camera, error)
func (*Camera) AddMessageHandler ¶
func (d *Camera) AddMessageHandler()
func (*Camera) AnnounceAvailable ¶
func (d *Camera) AnnounceAvailable()
func (*Camera) DeleteTopic ¶
func (d *Camera) DeleteTopic()
func (*Camera) GetDomainEntity ¶ added in v0.2.3
func (*Camera) GetMQTTFields ¶
func (d *Camera) GetMQTTFields() (fields MQTTFields)
func (*Camera) GetUniqueId ¶
func (*Camera) Initialize ¶
func (d *Camera) Initialize()
func (*Camera) JsonAttributes ¶ added in v0.2.1
func (*Camera) PopulateDevice ¶
func (*Camera) SetMQTTFields ¶
func (d *Camera) SetMQTTFields(fields MQTTFields)
func (*Camera) UnSubscribe ¶
func (d *Camera) UnSubscribe()
func (*Camera) UpdateState ¶
func (d *Camera) UpdateState()
type CameraOptions ¶ added in v0.2.0
type CameraOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewCameraOptions ¶ added in v0.2.0
func NewCameraOptions() *CameraOptions
func (*CameraOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *CameraOptions) AvailabilityFunc(f func() string) *CameraOptions
func (*CameraOptions) AvailabilityMode ¶ added in v0.2.0
func (o *CameraOptions) AvailabilityMode(mode string) *CameraOptions
func (*CameraOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *CameraOptions) AvailabilityTemplate(template string) *CameraOptions
func (*CameraOptions) EnabledByDefault ¶ added in v0.2.0
func (o *CameraOptions) EnabledByDefault(d bool) *CameraOptions
func (*CameraOptions) Encoding ¶ added in v0.2.0
func (o *CameraOptions) Encoding(encoding string) *CameraOptions
func (*CameraOptions) EntityCategory ¶ added in v0.2.0
func (o *CameraOptions) EntityCategory(category string) *CameraOptions
func (*CameraOptions) Icon ¶ added in v0.2.0
func (o *CameraOptions) Icon(icon string) *CameraOptions
func (*CameraOptions) ImageEncoding ¶ added in v0.2.0
func (o *CameraOptions) ImageEncoding(encoding string) *CameraOptions
func (*CameraOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *CameraOptions) JsonAttributesFunc(f func() string) *CameraOptions
func (*CameraOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *CameraOptions) JsonAttributesTemplate(template string) *CameraOptions
func (*CameraOptions) Name ¶ added in v0.2.0
func (o *CameraOptions) Name(name string) *CameraOptions
func (*CameraOptions) ObjectId ¶ added in v0.2.0
func (o *CameraOptions) ObjectId(id string) *CameraOptions
func (*CameraOptions) StateFunc ¶ added in v0.2.0
func (o *CameraOptions) StateFunc(f func() string) *CameraOptions
func (*CameraOptions) States ¶ added in v0.2.0
func (o *CameraOptions) States() *CameraState
func (*CameraOptions) UniqueId ¶ added in v0.2.0
func (o *CameraOptions) UniqueId(id string) *CameraOptions
type CameraState ¶ added in v0.2.0
type Climate ¶
type Climate struct { ActionTemplate *string `json:"action_template,omitempty"` // "A template to render the value received on the `action_topic` with." ActionTopic *string `json:"action_topic,omitempty"` // "The MQTT topic to subscribe for changes of the current action. If this is set, the climate graph uses the value received as data source. Valid values: `off`, `heating`, `cooling`, `drying`, `idle`, `fan`." AuxCommandTopic *string `json:"aux_command_topic,omitempty"` // "The MQTT topic to publish commands to switch auxiliary heat." AuxStateTemplate *string `json:"aux_state_template,omitempty"` // "A template to render the value received on the `aux_state_topic` with." AuxStateTopic *string `json:"aux_state_topic,omitempty"` // "The MQTT topic to subscribe for changes of the auxiliary heat mode. If this is not set, the auxiliary heat mode works in optimistic mode (see below)." AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CurrentHumidityTemplate *string `json:"current_humidity_template,omitempty"` // "A template with which the value received on `current_humidity_topic` will be rendered." CurrentHumidityTopic *string `json:"current_humidity_topic,omitempty"` // "The MQTT topic on which to listen for the current humidity. A `\"None\"` value received will reset the current temperature. Empty values (`”'`) will be ignored." CurrentTemperatureTemplate *string `json:"current_temperature_template,omitempty"` // "A template with which the value received on `current_temperature_topic` will be rendered." CurrentTemperatureTopic *string `json:"current_temperature_topic,omitempty"` // "The MQTT topic on which to listen for the current temperature. A `\"None\"` value received will reset the current humidity. Empty values (`”'`) will be ignored." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." FanModeCommandTemplate *string `json:"fan_mode_command_template,omitempty"` // "A template to render the value sent to the `fan_mode_command_topic` with." FanModeCommandTopic *string `json:"fan_mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the fan mode." FanModeStateTemplate *string `json:"fan_mode_state_template,omitempty"` // "A template to render the value received on the `fan_mode_state_topic` with." FanModeStateTopic *string `json:"fan_mode_state_topic,omitempty"` // "The MQTT topic to subscribe for changes of the HVAC fan mode. If this is not set, the fan mode works in optimistic mode (see below)." FanModes *([]string) `json:"fan_modes,omitempty"` // "A list of supported fan modes." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." Initial *int `json:"initial,omitempty"` // "Set the initial target temperature." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." MaxHumidity *int `json:"max_humidity,omitempty"` // "The minimum target humidity percentage that can be set." MaxTemp *float64 `json:"max_temp,omitempty"` // "Maximum set point available." MinHumidity *int `json:"min_humidity,omitempty"` // "The maximum target humidity percentage that can be set." MinTemp *float64 `json:"min_temp,omitempty"` // "Minimum set point available." ModeCommandTemplate *string `json:"mode_command_template,omitempty"` // "A template to render the value sent to the `mode_command_topic` with." ModeCommandTopic *string `json:"mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the HVAC operation mode. Use with `mode_command_template` if you only want to publish the power state." ModeStateTemplate *string `json:"mode_state_template,omitempty"` // "A template to render the value received on the `mode_state_topic` with." ModeStateTopic *string `json:"mode_state_topic,omitempty"` // "The MQTT topic to subscribe for changes of the HVAC operation mode. If this is not set, the operation mode works in optimistic mode (see below)." Modes *([]string) `json:"modes,omitempty"` // "A list of supported modes. Needs to be a subset of the default values." Name *string `json:"name,omitempty"` // "The name of the HVAC." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if the climate works in optimistic mode" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents disabled state." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents enabled state." Precision *float64 `json:"precision,omitempty"` // "The desired precision for this device. Can be used to match your actual thermostat's precision. Supported values are `0.1`, `0.5` and `1.0`." PresetModeCommandTemplate *string `json:"preset_mode_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `preset_mode_command_topic`." PresetModeCommandTopic *string `json:"preset_mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the preset mode." PresetModeStateTopic *string `json:"preset_mode_state_topic,omitempty"` // "The MQTT topic subscribed to receive climate speed based on presets. When preset 'none' is received or `None` the `preset_mode` will be reset." PresetModeValueTemplate *string `json:"preset_mode_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the `preset_mode` value from the payload received on `preset_mode_state_topic`." PresetModes *([]string) `json:"preset_modes,omitempty"` // "List of preset modes this climate is supporting. Common examples include `eco`, `away`, `boost`, `comfort`, `home`, `sleep` and `activity`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level to be used when receiving and publishing messages." Retain *bool `json:"retain,omitempty"` // "Defines if published messages should have the retain flag set." SwingModeCommandTemplate *string `json:"swing_mode_command_template,omitempty"` // "A template to render the value sent to the `swing_mode_command_topic` with." SwingModeCommandTopic *string `json:"swing_mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the swing mode." SwingModeStateTemplate *string `json:"swing_mode_state_template,omitempty"` // "A template to render the value received on the `swing_mode_state_topic` with." SwingModeStateTopic *string `json:"swing_mode_state_topic,omitempty"` // "The MQTT topic to subscribe for changes of the HVAC swing mode. If this is not set, the swing mode works in optimistic mode (see below)." SwingModes *([]string) `json:"swing_modes,omitempty"` // "A list of supported swing modes." TargetHumidityCommandTemplate *string `json:"target_humidity_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `target_humidity_command_topic`." TargetHumidityCommandTopic *string `json:"target_humidity_command_topic,omitempty"` // "The MQTT topic to publish commands to change the target humidity." TargetHumidityStateTemplate *string `json:"target_humidity_state_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the climate `target_humidity` state." TargetHumidityStateTopic *string `json:"target_humidity_state_topic,omitempty"` // "The MQTT topic subscribed to receive the target humidity. If this is not set, the target humidity works in optimistic mode (see below). A `\"None\"` value received will reset the target humidity. Empty values (`”'`) will be ignored." TempStep *float64 `json:"temp_step,omitempty"` // "Step size for temperature set point." TemperatureCommandTemplate *string `json:"temperature_command_template,omitempty"` // "A template to render the value sent to the `temperature_command_topic` with." TemperatureCommandTopic *string `json:"temperature_command_topic,omitempty"` // "The MQTT topic to publish commands to change the target temperature." TemperatureHighCommandTemplate *string `json:"temperature_high_command_template,omitempty"` // "A template to render the value sent to the `temperature_high_command_topic` with." TemperatureHighCommandTopic *string `json:"temperature_high_command_topic,omitempty"` // "The MQTT topic to publish commands to change the high target temperature." TemperatureHighStateTemplate *string `json:"temperature_high_state_template,omitempty"` // "A template to render the value received on the `temperature_high_state_topic` with. A `\"None\"` value received will reset the temperature high set point. Empty values (`”'`) will be ignored." TemperatureHighStateTopic *string `json:"temperature_high_state_topic,omitempty"` // "The MQTT topic to subscribe for changes in the target high temperature. If this is not set, the target high temperature works in optimistic mode (see below)." TemperatureLowCommandTemplate *string `json:"temperature_low_command_template,omitempty"` // "A template to render the value sent to the `temperature_low_command_topic` with." TemperatureLowCommandTopic *string `json:"temperature_low_command_topic,omitempty"` // "The MQTT topic to publish commands to change the target low temperature." TemperatureLowStateTemplate *string `json:"temperature_low_state_template,omitempty"` // "A template to render the value received on the `temperature_low_state_topic` with. A `\"None\"` value received will reset the temperature low set point. Empty values (`”'`) will be ignored." TemperatureLowStateTopic *string `json:"temperature_low_state_topic,omitempty"` // "The MQTT topic to subscribe for changes in the target low temperature. If this is not set, the target low temperature works in optimistic mode (see below)." TemperatureStateTemplate *string `json:"temperature_state_template,omitempty"` // "A template to render the value received on the `temperature_state_topic` with." TemperatureStateTopic *string `json:"temperature_state_topic,omitempty"` // "The MQTT topic to subscribe for changes in the target temperature. If this is not set, the target temperature works in optimistic mode (see below). A `\"None\"` value received will reset the temperature set point. Empty values (`”'`) will be ignored." TemperatureUnit *string `json:"temperature_unit,omitempty"` // "Defines the temperature unit of the device, `C` or `F`. If this is not set, the temperature unit is set to the system temperature unit." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this HVAC device. If two HVAC devices have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Default template to render the payloads on *all* `*_state_topic`s with." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *ClimateState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewClimate ¶ added in v0.2.0
func NewClimate(o *ClimateOptions) (*Climate, error)
func (*Climate) AddMessageHandler ¶
func (d *Climate) AddMessageHandler()
func (*Climate) AnnounceAvailable ¶
func (d *Climate) AnnounceAvailable()
func (*Climate) CurrentHumidity ¶ added in v0.2.1
func (*Climate) CurrentTemperature ¶ added in v0.2.1
func (*Climate) DeleteTopic ¶
func (d *Climate) DeleteTopic()
func (*Climate) GetDomainEntity ¶ added in v0.2.3
func (*Climate) GetMQTTFields ¶
func (d *Climate) GetMQTTFields() (fields MQTTFields)
func (*Climate) GetUniqueId ¶
func (*Climate) Initialize ¶
func (d *Climate) Initialize()
func (*Climate) JsonAttributes ¶ added in v0.2.1
func (*Climate) PopulateDevice ¶
func (*Climate) PresetMode ¶ added in v0.2.1
func (*Climate) SetMQTTFields ¶
func (d *Climate) SetMQTTFields(fields MQTTFields)
func (*Climate) TargetHumidity ¶ added in v0.2.1
func (*Climate) Temperature ¶ added in v0.2.1
func (*Climate) TemperatureHigh ¶ added in v0.2.1
func (*Climate) TemperatureLow ¶ added in v0.2.1
func (*Climate) UnSubscribe ¶
func (d *Climate) UnSubscribe()
func (*Climate) UpdateState ¶
func (d *Climate) UpdateState()
type ClimateOptions ¶ added in v0.2.0
type ClimateOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewClimateOptions ¶ added in v0.2.0
func NewClimateOptions() *ClimateOptions
func (*ClimateOptions) ActionFunc ¶ added in v0.2.0
func (o *ClimateOptions) ActionFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) ActionTemplate ¶ added in v0.2.0
func (o *ClimateOptions) ActionTemplate(template string) *ClimateOptions
func (*ClimateOptions) AuxCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) AuxCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) AuxStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) AuxStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) AuxStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) AuxStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *ClimateOptions) AvailabilityFunc(f func() string) *ClimateOptions
func (*ClimateOptions) AvailabilityMode ¶ added in v0.2.0
func (o *ClimateOptions) AvailabilityMode(mode string) *ClimateOptions
func (*ClimateOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *ClimateOptions) AvailabilityTemplate(template string) *ClimateOptions
func (*ClimateOptions) CurrentHumidityFunc ¶ added in v0.2.0
func (o *ClimateOptions) CurrentHumidityFunc(f func() string) *ClimateOptions
func (*ClimateOptions) CurrentHumidityTemplate ¶ added in v0.2.0
func (o *ClimateOptions) CurrentHumidityTemplate(template string) *ClimateOptions
func (*ClimateOptions) CurrentTemperatureFunc ¶ added in v0.2.0
func (o *ClimateOptions) CurrentTemperatureFunc(f func() string) *ClimateOptions
func (*ClimateOptions) CurrentTemperatureTemplate ¶ added in v0.2.0
func (o *ClimateOptions) CurrentTemperatureTemplate(template string) *ClimateOptions
func (*ClimateOptions) EnableAux ¶ added in v0.2.1
func (o *ClimateOptions) EnableAux() *ClimateOptions
func (*ClimateOptions) EnableFanMode ¶ added in v0.2.1
func (o *ClimateOptions) EnableFanMode() *ClimateOptions
func (*ClimateOptions) EnableMode ¶ added in v0.2.1
func (o *ClimateOptions) EnableMode() *ClimateOptions
func (*ClimateOptions) EnablePresetMode ¶ added in v0.2.1
func (o *ClimateOptions) EnablePresetMode() *ClimateOptions
func (*ClimateOptions) EnableSwingMode ¶ added in v0.2.1
func (o *ClimateOptions) EnableSwingMode() *ClimateOptions
func (*ClimateOptions) EnableTargetHumidity ¶ added in v0.2.1
func (o *ClimateOptions) EnableTargetHumidity() *ClimateOptions
func (*ClimateOptions) EnableTemperature ¶ added in v0.2.1
func (o *ClimateOptions) EnableTemperature() *ClimateOptions
func (*ClimateOptions) EnableTemperatureHigh ¶ added in v0.2.1
func (o *ClimateOptions) EnableTemperatureHigh() *ClimateOptions
func (*ClimateOptions) EnableTemperatureLow ¶ added in v0.2.1
func (o *ClimateOptions) EnableTemperatureLow() *ClimateOptions
func (*ClimateOptions) EnabledByDefault ¶ added in v0.2.0
func (o *ClimateOptions) EnabledByDefault(d bool) *ClimateOptions
func (*ClimateOptions) Encoding ¶ added in v0.2.0
func (o *ClimateOptions) Encoding(encoding string) *ClimateOptions
func (*ClimateOptions) EntityCategory ¶ added in v0.2.0
func (o *ClimateOptions) EntityCategory(category string) *ClimateOptions
func (*ClimateOptions) FanModeCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) FanModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) FanModeCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) FanModeCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) FanModeStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) FanModeStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) FanModeStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) FanModeStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) FanModes ¶ added in v0.2.0
func (o *ClimateOptions) FanModes(modes []string) *ClimateOptions
func (*ClimateOptions) Icon ¶ added in v0.2.0
func (o *ClimateOptions) Icon(icon string) *ClimateOptions
func (*ClimateOptions) Initial ¶ added in v0.2.0
func (o *ClimateOptions) Initial(initial int) *ClimateOptions
func (*ClimateOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *ClimateOptions) JsonAttributesFunc(f func() string) *ClimateOptions
func (*ClimateOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *ClimateOptions) JsonAttributesTemplate(template string) *ClimateOptions
func (*ClimateOptions) MaxHumidity ¶ added in v0.2.0
func (o *ClimateOptions) MaxHumidity(humidity int) *ClimateOptions
func (*ClimateOptions) MaxTemp ¶ added in v0.2.0
func (o *ClimateOptions) MaxTemp(temp float64) *ClimateOptions
func (*ClimateOptions) MinHumidity ¶ added in v0.2.0
func (o *ClimateOptions) MinHumidity(humidity int) *ClimateOptions
func (*ClimateOptions) MinTemp ¶ added in v0.2.0
func (o *ClimateOptions) MinTemp(temp float64) *ClimateOptions
func (*ClimateOptions) ModeCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) ModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) ModeCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) ModeCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) ModeStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) ModeStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) ModeStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) ModeStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) Modes ¶ added in v0.2.0
func (o *ClimateOptions) Modes(modes []string) *ClimateOptions
func (*ClimateOptions) Name ¶ added in v0.2.0
func (o *ClimateOptions) Name(name string) *ClimateOptions
func (*ClimateOptions) ObjectId ¶ added in v0.2.0
func (o *ClimateOptions) ObjectId(id string) *ClimateOptions
func (*ClimateOptions) Optimistic ¶ added in v0.2.0
func (o *ClimateOptions) Optimistic(optimistic bool) *ClimateOptions
func (*ClimateOptions) PayloadAvailable ¶ added in v0.2.0
func (o *ClimateOptions) PayloadAvailable(available string) *ClimateOptions
func (*ClimateOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *ClimateOptions) PayloadNotAvailable(available string) *ClimateOptions
func (*ClimateOptions) PayloadOff ¶ added in v0.2.0
func (o *ClimateOptions) PayloadOff(off string) *ClimateOptions
func (*ClimateOptions) PayloadOn ¶ added in v0.2.0
func (o *ClimateOptions) PayloadOn(on string) *ClimateOptions
func (*ClimateOptions) Precision ¶ added in v0.2.0
func (o *ClimateOptions) Precision(precision float64) *ClimateOptions
func (*ClimateOptions) PresetModeCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) PresetModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) PresetModeCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) PresetModeCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) PresetModeStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) PresetModeStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) PresetModeValueTemplate ¶ added in v0.2.0
func (o *ClimateOptions) PresetModeValueTemplate(template string) *ClimateOptions
func (*ClimateOptions) PresetModes ¶ added in v0.2.0
func (o *ClimateOptions) PresetModes(modes []string) *ClimateOptions
func (*ClimateOptions) Qos ¶ added in v0.2.0
func (o *ClimateOptions) Qos(qos int) *ClimateOptions
func (*ClimateOptions) Retain ¶ added in v0.2.0
func (o *ClimateOptions) Retain(retain bool) *ClimateOptions
func (*ClimateOptions) States ¶ added in v0.2.0
func (o *ClimateOptions) States() *ClimateState
func (*ClimateOptions) SwingModeCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) SwingModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) SwingModeCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) SwingModeCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) SwingModeStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) SwingModeStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) SwingModeStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) SwingModeStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) SwingModes ¶ added in v0.2.0
func (o *ClimateOptions) SwingModes(modes []string) *ClimateOptions
func (*ClimateOptions) TargetHumidityCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) TargetHumidityCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) TargetHumidityCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TargetHumidityCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) TargetHumidityStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) TargetHumidityStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) TargetHumidityStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TargetHumidityStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) TempStep ¶ added in v0.2.0
func (o *ClimateOptions) TempStep(step float64) *ClimateOptions
func (*ClimateOptions) TemperatureCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) TemperatureCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureHighCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureHighCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) TemperatureHighCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureHighCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureHighStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureHighStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) TemperatureHighStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureHighStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureLowCommandFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureLowCommandFunc(f func(mqtt.Message, mqtt.Client)) *ClimateOptions
func (*ClimateOptions) TemperatureLowCommandTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureLowCommandTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureLowStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureLowStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) TemperatureLowStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureLowStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureStateFunc ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureStateFunc(f func() string) *ClimateOptions
func (*ClimateOptions) TemperatureStateTemplate ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureStateTemplate(template string) *ClimateOptions
func (*ClimateOptions) TemperatureUnit ¶ added in v0.2.0
func (o *ClimateOptions) TemperatureUnit(unit string) *ClimateOptions
func (*ClimateOptions) UniqueId ¶ added in v0.2.0
func (o *ClimateOptions) UniqueId(id string) *ClimateOptions
func (*ClimateOptions) ValueTemplate ¶ added in v0.2.0
func (o *ClimateOptions) ValueTemplate(template string) *ClimateOptions
type ClimateState ¶ added in v0.2.0
type Device ¶ added in v0.2.0
type Device struct { ConfigurationUrl *string `json:"configuration_url,omitempty"` Connections *string `json:"connections,omitempty"` Identifiers *string `json:"identifiers,omitempty"` Manufacturer *string `json:"manufacturer,omitempty"` Model *string `json:"model,omitempty"` Name *string `json:"name,omitempty"` SuggestedArea *string `json:"suggested_area,omitempty"` SwVersion *string `json:"sw_version,omitempty"` ViaDevice *string `json:"via_device,omitempty"` }
type DeviceTracker ¶
type DeviceTracker struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." Device Device `json:"device,omitempty"` // Device configuration parameters Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as device_tracker attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the MQTT device_tracker." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadHome *string `json:"payload_home,omitempty"` // "The payload value that represents the 'home' state for the device." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadNotHome *string `json:"payload_not_home,omitempty"` // "The payload value that represents the 'not_home' state for the device." PayloadReset *string `json:"payload_reset,omitempty"` // "The payload value that will have the device's location automatically derived from Home Assistant's zones." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." SourceType *string `json:"source_type,omitempty"` // "Attribute of a device tracker that affects state when being used to track a [person](/integrations/person/). Valid options are `gps`, `router`, `bluetooth`, or `bluetooth_le`." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive device tracker state changes." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this device_tracker. If two device_trackers have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that returns a device tracker state." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *DeviceTrackerState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewDeviceTracker ¶ added in v0.2.0
func NewDeviceTracker(o *DeviceTrackerOptions) (*DeviceTracker, error)
func (*DeviceTracker) AddMessageHandler ¶
func (d *DeviceTracker) AddMessageHandler()
func (*DeviceTracker) AnnounceAvailable ¶
func (d *DeviceTracker) AnnounceAvailable()
func (*DeviceTracker) DeleteTopic ¶
func (d *DeviceTracker) DeleteTopic()
func (*DeviceTracker) GetDomainEntity ¶ added in v0.2.3
func (d *DeviceTracker) GetDomainEntity() string
func (*DeviceTracker) GetMQTTFields ¶
func (d *DeviceTracker) GetMQTTFields() (fields MQTTFields)
func (*DeviceTracker) GetName ¶
func (d *DeviceTracker) GetName() string
func (*DeviceTracker) GetRawId ¶
func (d *DeviceTracker) GetRawId() string
func (*DeviceTracker) GetUniqueId ¶
func (d *DeviceTracker) GetUniqueId() string
func (*DeviceTracker) Initialize ¶
func (d *DeviceTracker) Initialize()
func (*DeviceTracker) JsonAttributes ¶ added in v0.2.1
func (d *DeviceTracker) JsonAttributes(s string)
func (*DeviceTracker) PopulateDevice ¶
func (*DeviceTracker) SetMQTTFields ¶
func (d *DeviceTracker) SetMQTTFields(fields MQTTFields)
func (*DeviceTracker) State ¶ added in v0.2.1
func (d *DeviceTracker) State(s string)
func (*DeviceTracker) Subscribe ¶
func (d *DeviceTracker) Subscribe()
func (*DeviceTracker) UnSubscribe ¶
func (d *DeviceTracker) UnSubscribe()
func (*DeviceTracker) UpdateState ¶
func (d *DeviceTracker) UpdateState()
type DeviceTrackerOptions ¶ added in v0.2.0
type DeviceTrackerOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewDeviceTrackerOptions ¶ added in v0.2.0
func NewDeviceTrackerOptions() *DeviceTrackerOptions
func (*DeviceTrackerOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *DeviceTrackerOptions) AvailabilityFunc(f func() string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) AvailabilityMode ¶ added in v0.2.0
func (o *DeviceTrackerOptions) AvailabilityMode(mode string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *DeviceTrackerOptions) AvailabilityTemplate(template string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) Icon ¶ added in v0.2.0
func (o *DeviceTrackerOptions) Icon(icon string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *DeviceTrackerOptions) JsonAttributesFunc(f func() string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *DeviceTrackerOptions) JsonAttributesTemplate(template string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) Name ¶ added in v0.2.0
func (o *DeviceTrackerOptions) Name(name string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) ObjectId ¶ added in v0.2.0
func (o *DeviceTrackerOptions) ObjectId(id string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) PayloadAvailable ¶ added in v0.2.0
func (o *DeviceTrackerOptions) PayloadAvailable(available string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) PayloadHome ¶ added in v0.2.0
func (o *DeviceTrackerOptions) PayloadHome(home string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *DeviceTrackerOptions) PayloadNotAvailable(available string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) PayloadNotHome ¶ added in v0.2.0
func (o *DeviceTrackerOptions) PayloadNotHome(home string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) PayloadReset ¶ added in v0.2.0
func (o *DeviceTrackerOptions) PayloadReset(reset string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) Qos ¶ added in v0.2.0
func (o *DeviceTrackerOptions) Qos(qos int) *DeviceTrackerOptions
func (*DeviceTrackerOptions) SourceType ¶ added in v0.2.0
func (o *DeviceTrackerOptions) SourceType(t string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) StateFunc ¶ added in v0.2.0
func (o *DeviceTrackerOptions) StateFunc(f func() string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) States ¶ added in v0.2.0
func (o *DeviceTrackerOptions) States() *DeviceTrackerState
func (*DeviceTrackerOptions) UniqueId ¶ added in v0.2.0
func (o *DeviceTrackerOptions) UniqueId(id string) *DeviceTrackerOptions
func (*DeviceTrackerOptions) ValueTemplate ¶ added in v0.2.0
func (o *DeviceTrackerOptions) ValueTemplate(template string) *DeviceTrackerOptions
type DeviceTrackerState ¶ added in v0.2.0
type DeviceTrigger ¶
type DeviceTrigger struct { AutomationType *string `json:"automation_type,omitempty"` // "The type of automation, must be 'trigger'." Device Device `json:"device,omitempty"` // Device configuration parameters Payload *string `json:"payload,omitempty"` // "Optional payload to match the payload being sent over the topic." Qos *int `json:"qos,omitempty"` // "The maximum QoS level to be used when receiving messages." Subtype *string `json:"subtype,omitempty"` // "The subtype of the trigger, e.g. `button_1`. Entries supported by the frontend: `turn_on`, `turn_off`, `button_1`, `button_2`, `button_3`, `button_4`, `button_5`, `button_6`. If set to an unsupported value, will render as `subtype type`, e.g. `left_button pressed` with `type` set to `button_short_press` and `subtype` set to `left_button`" StateTopic *string `json:"topic,omitempty"` // "The MQTT topic subscribed to receive trigger events." Type *string `json:"type,omitempty"` // "The type of the trigger, e.g. `button_short_press`. Entries supported by the frontend: `button_short_press`, `button_short_release`, `button_long_press`, `button_long_release`, `button_double_press`, `button_triple_press`, `button_quadruple_press`, `button_quintuple_press`. If set to an unsupported value, will render as `subtype type`, e.g. `button_1 spammed` with `type` set to `spammed` and `subtype` set to `button_1`" ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the value." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *DeviceTriggerState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewDeviceTrigger ¶ added in v0.2.0
func NewDeviceTrigger(o *DeviceTriggerOptions) (*DeviceTrigger, error)
func (*DeviceTrigger) AddMessageHandler ¶
func (d *DeviceTrigger) AddMessageHandler()
func (*DeviceTrigger) AnnounceAvailable ¶
func (d *DeviceTrigger) AnnounceAvailable()
func (*DeviceTrigger) DeleteTopic ¶
func (d *DeviceTrigger) DeleteTopic()
func (DeviceTrigger) GetDomainEntity ¶ added in v0.2.3
func (d DeviceTrigger) GetDomainEntity() string
func (*DeviceTrigger) GetMQTTFields ¶
func (d *DeviceTrigger) GetMQTTFields() (fields MQTTFields)
func (DeviceTrigger) GetName ¶
func (d DeviceTrigger) GetName() string
func (*DeviceTrigger) GetRawId ¶
func (d *DeviceTrigger) GetRawId() string
func (DeviceTrigger) GetUniqueId ¶
func (d DeviceTrigger) GetUniqueId() string
func (*DeviceTrigger) Initialize ¶
func (d *DeviceTrigger) Initialize()
func (*DeviceTrigger) PopulateDevice ¶
func (*DeviceTrigger) SetMQTTFields ¶
func (d *DeviceTrigger) SetMQTTFields(fields MQTTFields)
func (*DeviceTrigger) State ¶ added in v0.2.1
func (d *DeviceTrigger) State(s string)
func (*DeviceTrigger) Subscribe ¶
func (d *DeviceTrigger) Subscribe()
func (*DeviceTrigger) UnSubscribe ¶
func (d *DeviceTrigger) UnSubscribe()
func (*DeviceTrigger) UpdateState ¶
func (d *DeviceTrigger) UpdateState()
type DeviceTriggerOptions ¶ added in v0.2.0
type DeviceTriggerOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewDeviceTriggerOptions ¶ added in v0.2.0
func NewDeviceTriggerOptions() *DeviceTriggerOptions
func (*DeviceTriggerOptions) AutomationType ¶ added in v0.2.0
func (o *DeviceTriggerOptions) AutomationType(t string) *DeviceTriggerOptions
func (*DeviceTriggerOptions) Payload ¶ added in v0.2.0
func (o *DeviceTriggerOptions) Payload(payload string) *DeviceTriggerOptions
func (*DeviceTriggerOptions) Qos ¶ added in v0.2.0
func (o *DeviceTriggerOptions) Qos(qos int) *DeviceTriggerOptions
func (*DeviceTriggerOptions) StateFunc ¶ added in v0.2.0
func (o *DeviceTriggerOptions) StateFunc(f func() string) *DeviceTriggerOptions
func (*DeviceTriggerOptions) States ¶ added in v0.2.0
func (o *DeviceTriggerOptions) States() *DeviceTriggerState
func (*DeviceTriggerOptions) Subtype ¶ added in v0.2.0
func (o *DeviceTriggerOptions) Subtype(subtype string) *DeviceTriggerOptions
func (*DeviceTriggerOptions) Type ¶ added in v0.2.0
func (o *DeviceTriggerOptions) Type(t string) *DeviceTriggerOptions
func (*DeviceTriggerOptions) ValueTemplate ¶ added in v0.2.0
func (o *DeviceTriggerOptions) ValueTemplate(template string) *DeviceTriggerOptions
type DeviceTriggerState ¶ added in v0.2.0
type DeviceTriggerState struct {
State string
}
type Entity ¶
type Entity interface { GetRawId() string GetUniqueId() string GetDomainEntity() string GetName() string PopulateDevice(Manufacturer string, SoftwareName string, InstanceName string, SWVersion string, Identifier string) UpdateState() Subscribe() UnSubscribe() AddMessageHandler() DeleteTopic() Initialize() SetMQTTFields(MQTTFields) GetMQTTFields() MQTTFields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
type Fan ¶
type Fan struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the fan state." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the fan." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if fan works in optimistic mode" OscillationCommandTemplate *string `json:"oscillation_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `oscillation_command_topic`." OscillationCommandTopic *string `json:"oscillation_command_topic,omitempty"` // "The MQTT topic to publish commands to change the oscillation state." OscillationStateTopic *string `json:"oscillation_state_topic,omitempty"` // "The MQTT topic subscribed to receive oscillation state updates." OscillationValueTemplate *string `json:"oscillation_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value from the oscillation." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents the stop state." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents the running state." PayloadOscillationOff *string `json:"payload_oscillation_off,omitempty"` // "The payload that represents the oscillation off state." PayloadOscillationOn *string `json:"payload_oscillation_on,omitempty"` // "The payload that represents the oscillation on state." PayloadResetPercentage *string `json:"payload_reset_percentage,omitempty"` // "A special payload that resets the `percentage` state attribute to `None` when received at the `percentage_state_topic`." PayloadResetPresetMode *string `json:"payload_reset_preset_mode,omitempty"` // "A special payload that resets the `preset_mode` state attribute to `None` when received at the `preset_mode_state_topic`." PercentageCommandTemplate *string `json:"percentage_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `percentage_command_topic`." PercentageCommandTopic *string `json:"percentage_command_topic,omitempty"` // "The MQTT topic to publish commands to change the fan speed state based on a percentage." PercentageStateTopic *string `json:"percentage_state_topic,omitempty"` // "The MQTT topic subscribed to receive fan speed based on percentage." PercentageValueTemplate *string `json:"percentage_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the `percentage` value from the payload received on `percentage_state_topic`." PresetModeCommandTemplate *string `json:"preset_mode_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `preset_mode_command_topic`." PresetModeCommandTopic *string `json:"preset_mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the preset mode." PresetModeStateTopic *string `json:"preset_mode_state_topic,omitempty"` // "The MQTT topic subscribed to receive fan speed based on presets." PresetModeValueTemplate *string `json:"preset_mode_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the `preset_mode` value from the payload received on `preset_mode_state_topic`." PresetModes *([]string) `json:"preset_modes,omitempty"` // "List of preset modes this fan is capable of running at. Common examples include `auto`, `smart`, `whoosh`, `eco` and `breeze`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." SpeedRangeMax *int `json:"speed_range_max,omitempty"` // "The maximum of numeric output range (representing 100 %). The number of speeds within the `speed_range` / `100` will determine the `percentage_step`." SpeedRangeMin *int `json:"speed_range_min,omitempty"` // "The minimum of numeric output range (`off` not included, so `speed_range_min` - `1` represents 0 %). The number of speeds within the speed_range / 100 will determine the `percentage_step`." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates." StateValueTemplate *string `json:"state_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value from the state." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this fan. If two fans have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *FanState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewFan ¶ added in v0.2.0
func NewFan(o *FanOptions) (*Fan, error)
func (*Fan) AddMessageHandler ¶
func (d *Fan) AddMessageHandler()
func (*Fan) AnnounceAvailable ¶
func (d *Fan) AnnounceAvailable()
func (*Fan) DeleteTopic ¶
func (d *Fan) DeleteTopic()
func (*Fan) GetDomainEntity ¶ added in v0.2.3
func (*Fan) GetMQTTFields ¶
func (d *Fan) GetMQTTFields() (fields MQTTFields)
func (*Fan) GetUniqueId ¶
func (*Fan) Initialize ¶
func (d *Fan) Initialize()
func (*Fan) JsonAttributes ¶ added in v0.2.1
func (*Fan) Oscillation ¶ added in v0.2.1
func (*Fan) Percentage ¶ added in v0.2.1
func (*Fan) PopulateDevice ¶
func (*Fan) PresetMode ¶ added in v0.2.1
func (*Fan) SetMQTTFields ¶
func (d *Fan) SetMQTTFields(fields MQTTFields)
func (*Fan) UnSubscribe ¶
func (d *Fan) UnSubscribe()
func (*Fan) UpdateState ¶
func (d *Fan) UpdateState()
type FanOptions ¶ added in v0.2.0
type FanOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewFanOptions ¶ added in v0.2.0
func NewFanOptions() *FanOptions
func (*FanOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *FanOptions) AvailabilityFunc(f func() string) *FanOptions
func (*FanOptions) AvailabilityMode ¶ added in v0.2.0
func (o *FanOptions) AvailabilityMode(mode string) *FanOptions
func (*FanOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *FanOptions) AvailabilityTemplate(template string) *FanOptions
func (*FanOptions) CommandFunc ¶ added in v0.2.0
func (o *FanOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
func (*FanOptions) CommandTemplate ¶ added in v0.2.0
func (o *FanOptions) CommandTemplate(template string) *FanOptions
func (*FanOptions) EnableOscillation ¶ added in v0.2.1
func (o *FanOptions) EnableOscillation() *FanOptions
func (*FanOptions) EnablePercentage ¶ added in v0.2.1
func (o *FanOptions) EnablePercentage() *FanOptions
func (*FanOptions) EnablePresetMode ¶ added in v0.2.1
func (o *FanOptions) EnablePresetMode() *FanOptions
func (*FanOptions) EnabledByDefault ¶ added in v0.2.0
func (o *FanOptions) EnabledByDefault(d bool) *FanOptions
func (*FanOptions) Encoding ¶ added in v0.2.0
func (o *FanOptions) Encoding(encoding string) *FanOptions
func (*FanOptions) EntityCategory ¶ added in v0.2.0
func (o *FanOptions) EntityCategory(category string) *FanOptions
func (*FanOptions) Icon ¶ added in v0.2.0
func (o *FanOptions) Icon(icon string) *FanOptions
func (*FanOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *FanOptions) JsonAttributesFunc(f func() string) *FanOptions
func (*FanOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *FanOptions) JsonAttributesTemplate(template string) *FanOptions
func (*FanOptions) Name ¶ added in v0.2.0
func (o *FanOptions) Name(name string) *FanOptions
func (*FanOptions) ObjectId ¶ added in v0.2.0
func (o *FanOptions) ObjectId(id string) *FanOptions
func (*FanOptions) Optimistic ¶ added in v0.2.0
func (o *FanOptions) Optimistic(optimistic bool) *FanOptions
func (*FanOptions) OscillationCommandFunc ¶ added in v0.2.0
func (o *FanOptions) OscillationCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
func (*FanOptions) OscillationCommandTemplate ¶ added in v0.2.0
func (o *FanOptions) OscillationCommandTemplate(template string) *FanOptions
func (*FanOptions) OscillationStateFunc ¶ added in v0.2.0
func (o *FanOptions) OscillationStateFunc(f func() string) *FanOptions
func (*FanOptions) OscillationValueTemplate ¶ added in v0.2.0
func (o *FanOptions) OscillationValueTemplate(template string) *FanOptions
func (*FanOptions) PayloadAvailable ¶ added in v0.2.0
func (o *FanOptions) PayloadAvailable(available string) *FanOptions
func (*FanOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *FanOptions) PayloadNotAvailable(available string) *FanOptions
func (*FanOptions) PayloadOff ¶ added in v0.2.0
func (o *FanOptions) PayloadOff(off string) *FanOptions
func (*FanOptions) PayloadOn ¶ added in v0.2.0
func (o *FanOptions) PayloadOn(on string) *FanOptions
func (*FanOptions) PayloadOscillationOff ¶ added in v0.2.0
func (o *FanOptions) PayloadOscillationOff(off string) *FanOptions
func (*FanOptions) PayloadOscillationOn ¶ added in v0.2.0
func (o *FanOptions) PayloadOscillationOn(on string) *FanOptions
func (*FanOptions) PayloadResetPercentage ¶ added in v0.2.0
func (o *FanOptions) PayloadResetPercentage(percentage string) *FanOptions
func (*FanOptions) PayloadResetPresetMode ¶ added in v0.2.0
func (o *FanOptions) PayloadResetPresetMode(mode string) *FanOptions
func (*FanOptions) PercentageCommandFunc ¶ added in v0.2.0
func (o *FanOptions) PercentageCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
func (*FanOptions) PercentageCommandTemplate ¶ added in v0.2.0
func (o *FanOptions) PercentageCommandTemplate(template string) *FanOptions
func (*FanOptions) PercentageStateFunc ¶ added in v0.2.0
func (o *FanOptions) PercentageStateFunc(f func() string) *FanOptions
func (*FanOptions) PercentageValueTemplate ¶ added in v0.2.0
func (o *FanOptions) PercentageValueTemplate(template string) *FanOptions
func (*FanOptions) PresetModeCommandFunc ¶ added in v0.2.0
func (o *FanOptions) PresetModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *FanOptions
func (*FanOptions) PresetModeCommandTemplate ¶ added in v0.2.0
func (o *FanOptions) PresetModeCommandTemplate(template string) *FanOptions
func (*FanOptions) PresetModeStateFunc ¶ added in v0.2.0
func (o *FanOptions) PresetModeStateFunc(f func() string) *FanOptions
func (*FanOptions) PresetModeValueTemplate ¶ added in v0.2.0
func (o *FanOptions) PresetModeValueTemplate(template string) *FanOptions
func (*FanOptions) PresetModes ¶ added in v0.2.0
func (o *FanOptions) PresetModes(modes []string) *FanOptions
func (*FanOptions) Qos ¶ added in v0.2.0
func (o *FanOptions) Qos(qos int) *FanOptions
func (*FanOptions) Retain ¶ added in v0.2.0
func (o *FanOptions) Retain(retain bool) *FanOptions
func (*FanOptions) SpeedRangeMax ¶ added in v0.2.0
func (o *FanOptions) SpeedRangeMax(max int) *FanOptions
func (*FanOptions) SpeedRangeMin ¶ added in v0.2.0
func (o *FanOptions) SpeedRangeMin(min int) *FanOptions
func (*FanOptions) StateFunc ¶ added in v0.2.0
func (o *FanOptions) StateFunc(f func() string) *FanOptions
func (*FanOptions) StateValueTemplate ¶ added in v0.2.0
func (o *FanOptions) StateValueTemplate(template string) *FanOptions
func (*FanOptions) States ¶ added in v0.2.0
func (o *FanOptions) States() *FanState
func (*FanOptions) UniqueId ¶ added in v0.2.0
func (o *FanOptions) UniqueId(id string) *FanOptions
type Humidifier ¶
type Humidifier struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the humidifier state." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The device class of the MQTT device. Must be either `humidifier` or `dehumidifier`." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." MaxHumidity *int `json:"max_humidity,omitempty"` // "The minimum target humidity percentage that can be set." MinHumidity *int `json:"min_humidity,omitempty"` // "The maximum target humidity percentage that can be set." ModeCommandTemplate *string `json:"mode_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `mode_command_topic`." ModeCommandTopic *string `json:"mode_command_topic,omitempty"` // "The MQTT topic to publish commands to change the `mode` on the humidifier. This attribute ust be configured together with the `modes` attribute." ModeStateTemplate *string `json:"mode_state_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the humidifier `mode` state." ModeStateTopic *string `json:"mode_state_topic,omitempty"` // "The MQTT topic subscribed to receive the humidifier `mode`." Modes *([]string) `json:"modes,omitempty"` // "List of available modes this humidifier is capable of running at. Common examples include `normal`, `eco`, `away`, `boost`, `comfort`, `home`, `sleep`, `auto` and `baby`. These examples offer built-in translations but other custom modes are allowed as well. This attribute ust be configured together with the `mode_command_topic` attribute." Name *string `json:"name,omitempty"` // "The name of the humidifier." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if humidifier works in optimistic mode" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents the stop state." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents the running state." PayloadResetHumidity *string `json:"payload_reset_humidity,omitempty"` // "A special payload that resets the `target_humidity` state attribute to `None` when received at the `target_humidity_state_topic`." PayloadResetMode *string `json:"payload_reset_mode,omitempty"` // "A special payload that resets the `mode` state attribute to `None` when received at the `mode_state_topic`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates." StateValueTemplate *string `json:"state_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value from the state." TargetHumidityCommandTemplate *string `json:"target_humidity_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `target_humidity_command_topic`." TargetHumidityCommandTopic *string `json:"target_humidity_command_topic,omitempty"` // "The MQTT topic to publish commands to change the humidifier target humidity state based on a percentage." TargetHumidityStateTemplate *string `json:"target_humidity_state_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the humidifier `target_humidity` state." TargetHumidityStateTopic *string `json:"target_humidity_state_topic,omitempty"` // "The MQTT topic subscribed to receive humidifier target humidity." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this humidifier. If two humidifiers have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *HumidifierState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewHumidifier ¶ added in v0.2.0
func NewHumidifier(o *HumidifierOptions) (*Humidifier, error)
func (*Humidifier) AddMessageHandler ¶
func (d *Humidifier) AddMessageHandler()
func (*Humidifier) AnnounceAvailable ¶
func (d *Humidifier) AnnounceAvailable()
func (*Humidifier) DeleteTopic ¶
func (d *Humidifier) DeleteTopic()
func (*Humidifier) GetDomainEntity ¶ added in v0.2.3
func (d *Humidifier) GetDomainEntity() string
func (*Humidifier) GetMQTTFields ¶
func (d *Humidifier) GetMQTTFields() (fields MQTTFields)
func (*Humidifier) GetName ¶
func (d *Humidifier) GetName() string
func (*Humidifier) GetRawId ¶
func (d *Humidifier) GetRawId() string
func (*Humidifier) GetUniqueId ¶
func (d *Humidifier) GetUniqueId() string
func (*Humidifier) Initialize ¶
func (d *Humidifier) Initialize()
func (*Humidifier) JsonAttributes ¶ added in v0.2.1
func (d *Humidifier) JsonAttributes(s string)
func (*Humidifier) Mode ¶ added in v0.2.1
func (d *Humidifier) Mode(s string)
func (*Humidifier) PopulateDevice ¶
func (*Humidifier) SetMQTTFields ¶
func (d *Humidifier) SetMQTTFields(fields MQTTFields)
func (*Humidifier) State ¶ added in v0.2.1
func (d *Humidifier) State(s string)
func (*Humidifier) Subscribe ¶
func (d *Humidifier) Subscribe()
func (*Humidifier) TargetHumidity ¶ added in v0.2.1
func (d *Humidifier) TargetHumidity(s string)
func (*Humidifier) UnSubscribe ¶
func (d *Humidifier) UnSubscribe()
func (*Humidifier) UpdateState ¶
func (d *Humidifier) UpdateState()
type HumidifierOptions ¶ added in v0.2.0
type HumidifierOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewHumidifierOptions ¶ added in v0.2.0
func NewHumidifierOptions() *HumidifierOptions
func (*HumidifierOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *HumidifierOptions) AvailabilityFunc(f func() string) *HumidifierOptions
func (*HumidifierOptions) AvailabilityMode ¶ added in v0.2.0
func (o *HumidifierOptions) AvailabilityMode(mode string) *HumidifierOptions
func (*HumidifierOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) AvailabilityTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) CommandFunc ¶ added in v0.2.0
func (o *HumidifierOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
func (*HumidifierOptions) CommandTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) CommandTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) DeviceClass ¶ added in v0.2.0
func (o *HumidifierOptions) DeviceClass(class string) *HumidifierOptions
func (*HumidifierOptions) EnableMode ¶ added in v0.2.1
func (o *HumidifierOptions) EnableMode() *HumidifierOptions
func (*HumidifierOptions) EnableTargetHumidity ¶ added in v0.2.1
func (o *HumidifierOptions) EnableTargetHumidity() *HumidifierOptions
func (*HumidifierOptions) EnabledByDefault ¶ added in v0.2.0
func (o *HumidifierOptions) EnabledByDefault(d bool) *HumidifierOptions
func (*HumidifierOptions) Encoding ¶ added in v0.2.0
func (o *HumidifierOptions) Encoding(encoding string) *HumidifierOptions
func (*HumidifierOptions) EntityCategory ¶ added in v0.2.0
func (o *HumidifierOptions) EntityCategory(category string) *HumidifierOptions
func (*HumidifierOptions) Icon ¶ added in v0.2.0
func (o *HumidifierOptions) Icon(icon string) *HumidifierOptions
func (*HumidifierOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *HumidifierOptions) JsonAttributesFunc(f func() string) *HumidifierOptions
func (*HumidifierOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) JsonAttributesTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) MaxHumidity ¶ added in v0.2.0
func (o *HumidifierOptions) MaxHumidity(humidity int) *HumidifierOptions
func (*HumidifierOptions) MinHumidity ¶ added in v0.2.0
func (o *HumidifierOptions) MinHumidity(humidity int) *HumidifierOptions
func (*HumidifierOptions) ModeCommandFunc ¶ added in v0.2.0
func (o *HumidifierOptions) ModeCommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
func (*HumidifierOptions) ModeCommandTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) ModeCommandTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) ModeStateFunc ¶ added in v0.2.0
func (o *HumidifierOptions) ModeStateFunc(f func() string) *HumidifierOptions
func (*HumidifierOptions) ModeStateTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) ModeStateTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) Modes ¶ added in v0.2.0
func (o *HumidifierOptions) Modes(modes []string) *HumidifierOptions
func (*HumidifierOptions) Name ¶ added in v0.2.0
func (o *HumidifierOptions) Name(name string) *HumidifierOptions
func (*HumidifierOptions) ObjectId ¶ added in v0.2.0
func (o *HumidifierOptions) ObjectId(id string) *HumidifierOptions
func (*HumidifierOptions) Optimistic ¶ added in v0.2.0
func (o *HumidifierOptions) Optimistic(optimistic bool) *HumidifierOptions
func (*HumidifierOptions) PayloadAvailable ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadAvailable(available string) *HumidifierOptions
func (*HumidifierOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadNotAvailable(available string) *HumidifierOptions
func (*HumidifierOptions) PayloadOff ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadOff(off string) *HumidifierOptions
func (*HumidifierOptions) PayloadOn ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadOn(on string) *HumidifierOptions
func (*HumidifierOptions) PayloadResetHumidity ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadResetHumidity(humidity string) *HumidifierOptions
func (*HumidifierOptions) PayloadResetMode ¶ added in v0.2.0
func (o *HumidifierOptions) PayloadResetMode(mode string) *HumidifierOptions
func (*HumidifierOptions) Qos ¶ added in v0.2.0
func (o *HumidifierOptions) Qos(qos int) *HumidifierOptions
func (*HumidifierOptions) Retain ¶ added in v0.2.0
func (o *HumidifierOptions) Retain(retain bool) *HumidifierOptions
func (*HumidifierOptions) StateFunc ¶ added in v0.2.0
func (o *HumidifierOptions) StateFunc(f func() string) *HumidifierOptions
func (*HumidifierOptions) StateValueTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) StateValueTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) States ¶ added in v0.2.0
func (o *HumidifierOptions) States() *HumidifierState
func (*HumidifierOptions) TargetHumidityCommandFunc ¶ added in v0.2.0
func (o *HumidifierOptions) TargetHumidityCommandFunc(f func(mqtt.Message, mqtt.Client)) *HumidifierOptions
func (*HumidifierOptions) TargetHumidityCommandTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) TargetHumidityCommandTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) TargetHumidityStateFunc ¶ added in v0.2.0
func (o *HumidifierOptions) TargetHumidityStateFunc(f func() string) *HumidifierOptions
func (*HumidifierOptions) TargetHumidityStateTemplate ¶ added in v0.2.0
func (o *HumidifierOptions) TargetHumidityStateTemplate(template string) *HumidifierOptions
func (*HumidifierOptions) UniqueId ¶ added in v0.2.0
func (o *HumidifierOptions) UniqueId(id string) *HumidifierOptions
type HumidifierState ¶ added in v0.2.0
type Light ¶
type Light struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." BrightnessCommandTemplate *string `json:"brightness_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `brightness_command_topic`. Available variables: `value`." BrightnessCommandTopic *string `json:"brightness_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light’s brightness." BrightnessScale *int `json:"brightness_scale,omitempty"` // "Defines the maximum brightness value (i.e., 100%) of the MQTT device." BrightnessStateTopic *string `json:"brightness_state_topic,omitempty"` // "The MQTT topic subscribed to receive brightness state updates." BrightnessValueTemplate *string `json:"brightness_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the brightness value." ColorModeStateTopic *string `json:"color_mode_state_topic,omitempty"` // "The MQTT topic subscribed to receive color mode updates. If this is not configured, `color_mode` will be automatically set according to the last received valid color or color temperature" ColorModeValueTemplate *string `json:"color_mode_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the color mode." ColorTempCommandTemplate *string `json:"color_temp_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `color_temp_command_topic`. Available variables: `value`." ColorTempCommandTopic *string `json:"color_temp_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light’s color temperature state. The color temperature command slider has a range of 153 to 500 mireds (micro reciprocal degrees)." ColorTempStateTopic *string `json:"color_temp_state_topic,omitempty"` // "The MQTT topic subscribed to receive color temperature state updates." ColorTempValueTemplate *string `json:"color_temp_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the color temperature value." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the switch state." Device Device `json:"device,omitempty"` // Device configuration parameters EffectCommandTemplate *string `json:"effect_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `effect_command_topic`. Available variables: `value`." EffectCommandTopic *string `json:"effect_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's effect state." EffectList *([]string) `json:"effect_list,omitempty"` // "The list of effects the light supports." EffectStateTopic *string `json:"effect_state_topic,omitempty"` // "The MQTT topic subscribed to receive effect state updates." EffectValueTemplate *string `json:"effect_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the effect value." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." HsCommandTemplate *string `json:"hs_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `hs_command_topic`. Available variables: `hue` and `sat`." HsCommandTopic *string `json:"hs_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's color state in HS format (Hue Saturation). Range for Hue: 0° .. 360°, Range of Saturation: 0..100. Note: Brightness is sent separately in the `brightness_command_topic`." HsStateTopic *string `json:"hs_state_topic,omitempty"` // "The MQTT topic subscribed to receive color state updates in HS format. The expected payload is the hue and saturation values separated by commas, for example, `359.5,100.0`. Note: Brightness is received separately in the `brightness_state_topic`." HsValueTemplate *string `json:"hs_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the HS value." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." MaxMireds *int `json:"max_mireds,omitempty"` // "The maximum color temperature in mireds." MinMireds *int `json:"min_mireds,omitempty"` // "The minimum color temperature in mireds." Name *string `json:"name,omitempty"` // "The name of the light." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" OnCommandType *string `json:"on_command_type,omitempty"` // "Defines when on the payload_on is sent. Using `last` (the default) will send any style (brightness, color, etc) topics first and then a `payload_on` to the `command_topic`. Using `first` will send the `payload_on` and then any style topics. Using `brightness` will only send brightness commands instead of the `payload_on` to turn the light on." Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if switch works in optimistic mode." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents disabled state." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents enabled state." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." RgbCommandTemplate *string `json:"rgb_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgb_command_topic`. Available variables: `red`, `green` and `blue`." RgbCommandTopic *string `json:"rgb_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's RGB state." RgbStateTopic *string `json:"rgb_state_topic,omitempty"` // "The MQTT topic subscribed to receive RGB state updates. The expected payload is the RGB values separated by commas, for example, `255,0,127`." RgbValueTemplate *string `json:"rgb_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGB value." RgbwCommandTemplate *string `json:"rgbw_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgbw_command_topic`. Available variables: `red`, `green`, `blue` and `white`." RgbwCommandTopic *string `json:"rgbw_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's RGBW state." RgbwStateTopic *string `json:"rgbw_state_topic,omitempty"` // "The MQTT topic subscribed to receive RGBW state updates. The expected payload is the RGBW values separated by commas, for example, `255,0,127,64`." RgbwValueTemplate *string `json:"rgbw_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGBW value." RgbwwCommandTemplate *string `json:"rgbww_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgbww_command_topic`. Available variables: `red`, `green`, `blue`, `cold_white` and `warm_white`." RgbwwCommandTopic *string `json:"rgbww_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's RGBWW state." RgbwwStateTopic *string `json:"rgbww_state_topic,omitempty"` // "The MQTT topic subscribed to receive RGBWW state updates. The expected payload is the RGBWW values separated by commas, for example, `255,0,127,64,32`." RgbwwValueTemplate *string `json:"rgbww_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGBWW value." Schema *string `json:"schema,omitempty"` // "The schema to use. Must be `default` or omitted to select the default schema." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates." StateValueTemplate *string `json:"state_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the state value. The template should match the payload `on` and `off` values, so if your light uses `power on` to turn on, your `state_value_template` string should return `power on` when the switch is on. For example if the message is just `on`, your `state_value_template` should be `power {{ value }}`." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this light. If two lights have the same unique ID, Home Assistant will raise an exception." WhiteCommandTopic *string `json:"white_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light to white mode with a given brightness." WhiteScale *int `json:"white_scale,omitempty"` // "Defines the maximum white level (i.e., 100%) of the MQTT device." XyCommandTemplate *string `json:"xy_command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `xy_command_topic`. Available variables: `x` and `y`." XyCommandTopic *string `json:"xy_command_topic,omitempty"` // "The MQTT topic to publish commands to change the light's XY state." XyStateTopic *string `json:"xy_state_topic,omitempty"` // "The MQTT topic subscribed to receive XY state updates. The expected payload is the X and Y color values separated by commas, for example, `0.675,0.322`." XyValueTemplate *string `json:"xy_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the XY value." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *LightState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewLight ¶ added in v0.2.0
func NewLight(o *LightOptions) (*Light, error)
func (*Light) AddMessageHandler ¶
func (d *Light) AddMessageHandler()
func (*Light) AnnounceAvailable ¶
func (d *Light) AnnounceAvailable()
func (*Light) Brightness ¶ added in v0.2.1
func (*Light) DeleteTopic ¶
func (d *Light) DeleteTopic()
func (*Light) GetDomainEntity ¶ added in v0.2.3
func (*Light) GetMQTTFields ¶
func (d *Light) GetMQTTFields() (fields MQTTFields)
func (*Light) GetUniqueId ¶
func (*Light) Initialize ¶
func (d *Light) Initialize()
func (*Light) JsonAttributes ¶ added in v0.2.1
func (*Light) PopulateDevice ¶
func (*Light) SetMQTTFields ¶
func (d *Light) SetMQTTFields(fields MQTTFields)
func (*Light) UnSubscribe ¶
func (d *Light) UnSubscribe()
func (*Light) UpdateState ¶
func (d *Light) UpdateState()
type LightOptions ¶ added in v0.2.0
type LightOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewLightOptions ¶ added in v0.2.0
func NewLightOptions() *LightOptions
func (*LightOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *LightOptions) AvailabilityFunc(f func() string) *LightOptions
func (*LightOptions) AvailabilityMode ¶ added in v0.2.0
func (o *LightOptions) AvailabilityMode(mode string) *LightOptions
func (*LightOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *LightOptions) AvailabilityTemplate(template string) *LightOptions
func (*LightOptions) BrightnessCommandFunc ¶ added in v0.2.0
func (o *LightOptions) BrightnessCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) BrightnessCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) BrightnessCommandTemplate(template string) *LightOptions
func (*LightOptions) BrightnessScale ¶ added in v0.2.0
func (o *LightOptions) BrightnessScale(scale int) *LightOptions
func (*LightOptions) BrightnessStateFunc ¶ added in v0.2.0
func (o *LightOptions) BrightnessStateFunc(f func() string) *LightOptions
func (*LightOptions) BrightnessValueTemplate ¶ added in v0.2.0
func (o *LightOptions) BrightnessValueTemplate(template string) *LightOptions
func (*LightOptions) ColorModeStateFunc ¶ added in v0.2.0
func (o *LightOptions) ColorModeStateFunc(f func() string) *LightOptions
func (*LightOptions) ColorModeValueTemplate ¶ added in v0.2.0
func (o *LightOptions) ColorModeValueTemplate(template string) *LightOptions
func (*LightOptions) ColorTempCommandFunc ¶ added in v0.2.0
func (o *LightOptions) ColorTempCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) ColorTempCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) ColorTempCommandTemplate(template string) *LightOptions
func (*LightOptions) ColorTempStateFunc ¶ added in v0.2.0
func (o *LightOptions) ColorTempStateFunc(f func() string) *LightOptions
func (*LightOptions) ColorTempValueTemplate ¶ added in v0.2.0
func (o *LightOptions) ColorTempValueTemplate(template string) *LightOptions
func (*LightOptions) CommandFunc ¶ added in v0.2.0
func (o *LightOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) EffectCommandFunc ¶ added in v0.2.0
func (o *LightOptions) EffectCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) EffectCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) EffectCommandTemplate(template string) *LightOptions
func (*LightOptions) EffectList ¶ added in v0.2.0
func (o *LightOptions) EffectList(list []string) *LightOptions
func (*LightOptions) EffectStateFunc ¶ added in v0.2.0
func (o *LightOptions) EffectStateFunc(f func() string) *LightOptions
func (*LightOptions) EffectValueTemplate ¶ added in v0.2.0
func (o *LightOptions) EffectValueTemplate(template string) *LightOptions
func (*LightOptions) EnableBrightness ¶ added in v0.2.1
func (o *LightOptions) EnableBrightness() *LightOptions
func (*LightOptions) EnableColorTemp ¶ added in v0.2.1
func (o *LightOptions) EnableColorTemp() *LightOptions
func (*LightOptions) EnableEffect ¶ added in v0.2.1
func (o *LightOptions) EnableEffect() *LightOptions
func (*LightOptions) EnableHs ¶ added in v0.2.1
func (o *LightOptions) EnableHs() *LightOptions
func (*LightOptions) EnableRgb ¶ added in v0.2.1
func (o *LightOptions) EnableRgb() *LightOptions
func (*LightOptions) EnableRgbw ¶ added in v0.2.1
func (o *LightOptions) EnableRgbw() *LightOptions
func (*LightOptions) EnableRgbww ¶ added in v0.2.1
func (o *LightOptions) EnableRgbww() *LightOptions
func (*LightOptions) EnableXy ¶ added in v0.2.1
func (o *LightOptions) EnableXy() *LightOptions
func (*LightOptions) EnabledByDefault ¶ added in v0.2.0
func (o *LightOptions) EnabledByDefault(d bool) *LightOptions
func (*LightOptions) Encoding ¶ added in v0.2.0
func (o *LightOptions) Encoding(encoding string) *LightOptions
func (*LightOptions) EntityCategory ¶ added in v0.2.0
func (o *LightOptions) EntityCategory(category string) *LightOptions
func (*LightOptions) HsCommandFunc ¶ added in v0.2.0
func (o *LightOptions) HsCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) HsCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) HsCommandTemplate(template string) *LightOptions
func (*LightOptions) HsStateFunc ¶ added in v0.2.0
func (o *LightOptions) HsStateFunc(f func() string) *LightOptions
func (*LightOptions) HsValueTemplate ¶ added in v0.2.0
func (o *LightOptions) HsValueTemplate(template string) *LightOptions
func (*LightOptions) Icon ¶ added in v0.2.0
func (o *LightOptions) Icon(icon string) *LightOptions
func (*LightOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *LightOptions) JsonAttributesFunc(f func() string) *LightOptions
func (*LightOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *LightOptions) JsonAttributesTemplate(template string) *LightOptions
func (*LightOptions) MaxMireds ¶ added in v0.2.0
func (o *LightOptions) MaxMireds(mireds int) *LightOptions
func (*LightOptions) MinMireds ¶ added in v0.2.0
func (o *LightOptions) MinMireds(mireds int) *LightOptions
func (*LightOptions) Name ¶ added in v0.2.0
func (o *LightOptions) Name(name string) *LightOptions
func (*LightOptions) ObjectId ¶ added in v0.2.0
func (o *LightOptions) ObjectId(id string) *LightOptions
func (*LightOptions) OnCommandType ¶ added in v0.2.0
func (o *LightOptions) OnCommandType(t string) *LightOptions
func (*LightOptions) Optimistic ¶ added in v0.2.0
func (o *LightOptions) Optimistic(optimistic bool) *LightOptions
func (*LightOptions) PayloadAvailable ¶ added in v0.2.0
func (o *LightOptions) PayloadAvailable(available string) *LightOptions
func (*LightOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *LightOptions) PayloadNotAvailable(available string) *LightOptions
func (*LightOptions) PayloadOff ¶ added in v0.2.0
func (o *LightOptions) PayloadOff(off string) *LightOptions
func (*LightOptions) PayloadOn ¶ added in v0.2.0
func (o *LightOptions) PayloadOn(on string) *LightOptions
func (*LightOptions) Qos ¶ added in v0.2.0
func (o *LightOptions) Qos(qos int) *LightOptions
func (*LightOptions) Retain ¶ added in v0.2.0
func (o *LightOptions) Retain(retain bool) *LightOptions
func (*LightOptions) RgbCommandFunc ¶ added in v0.2.0
func (o *LightOptions) RgbCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) RgbCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbCommandTemplate(template string) *LightOptions
func (*LightOptions) RgbStateFunc ¶ added in v0.2.0
func (o *LightOptions) RgbStateFunc(f func() string) *LightOptions
func (*LightOptions) RgbValueTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbValueTemplate(template string) *LightOptions
func (*LightOptions) RgbwCommandFunc ¶ added in v0.2.0
func (o *LightOptions) RgbwCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) RgbwCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbwCommandTemplate(template string) *LightOptions
func (*LightOptions) RgbwStateFunc ¶ added in v0.2.0
func (o *LightOptions) RgbwStateFunc(f func() string) *LightOptions
func (*LightOptions) RgbwValueTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbwValueTemplate(template string) *LightOptions
func (*LightOptions) RgbwwCommandFunc ¶ added in v0.2.0
func (o *LightOptions) RgbwwCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) RgbwwCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbwwCommandTemplate(template string) *LightOptions
func (*LightOptions) RgbwwStateFunc ¶ added in v0.2.0
func (o *LightOptions) RgbwwStateFunc(f func() string) *LightOptions
func (*LightOptions) RgbwwValueTemplate ¶ added in v0.2.0
func (o *LightOptions) RgbwwValueTemplate(template string) *LightOptions
func (*LightOptions) Schema ¶ added in v0.2.0
func (o *LightOptions) Schema(schema string) *LightOptions
func (*LightOptions) StateFunc ¶ added in v0.2.0
func (o *LightOptions) StateFunc(f func() string) *LightOptions
func (*LightOptions) StateValueTemplate ¶ added in v0.2.0
func (o *LightOptions) StateValueTemplate(template string) *LightOptions
func (*LightOptions) States ¶ added in v0.2.0
func (o *LightOptions) States() *LightState
func (*LightOptions) UniqueId ¶ added in v0.2.0
func (o *LightOptions) UniqueId(id string) *LightOptions
func (*LightOptions) WhiteCommandFunc ¶ added in v0.2.0
func (o *LightOptions) WhiteCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) WhiteScale ¶ added in v0.2.0
func (o *LightOptions) WhiteScale(scale int) *LightOptions
func (*LightOptions) XyCommandFunc ¶ added in v0.2.0
func (o *LightOptions) XyCommandFunc(f func(mqtt.Message, mqtt.Client)) *LightOptions
func (*LightOptions) XyCommandTemplate ¶ added in v0.2.0
func (o *LightOptions) XyCommandTemplate(template string) *LightOptions
func (*LightOptions) XyStateFunc ¶ added in v0.2.0
func (o *LightOptions) XyStateFunc(f func() string) *LightOptions
func (*LightOptions) XyValueTemplate ¶ added in v0.2.0
func (o *LightOptions) XyValueTemplate(template string) *LightOptions
type LightRef ¶ added in v0.2.0
type LightRef struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
type LightRefOptions ¶ added in v0.2.0
func NewLightRefOptions ¶ added in v0.2.0
func NewLightRefOptions() *LightRefOptions
func (*LightRefOptions) EnableBrightness ¶ added in v0.2.0
func (o *LightRefOptions) EnableBrightness(scale int) *LightRefOptions
type LightState ¶ added in v0.2.0
type Lock ¶
type Lock struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CodeFormat *string `json:"code_format,omitempty"` // "A regular expression to validate a supplied code when it is set during the service call to `open`, `lock` or `unlock` the MQTT lock." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`. The lock command template accepts the parameters `value` and `code`. The `value` parameter will contain the configured value for either `payload_open`, `payload_lock` or `payload_unlock`. The `code` parameter is set during the service call to `open`, `lock` or `unlock` the MQTT lock and will be set `None` if no code was passed." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the lock state." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the lock." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if lock works in optimistic mode." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadLock *string `json:"payload_lock,omitempty"` // "The payload sent to the lock to lock it." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOpen *string `json:"payload_open,omitempty"` // "The payload sent to the lock to open it." PayloadUnlock *string `json:"payload_unlock,omitempty"` // "The payload sent to the lock to unlock it." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. It will also be used for messages published to command topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateJammed *string `json:"state_jammed,omitempty"` // "The payload sent to `state_topic` by the lock when it's jammed." StateLocked *string `json:"state_locked,omitempty"` // "The payload sent to `state_topic` by the lock when it's locked." StateLocking *string `json:"state_locking,omitempty"` // "The payload sent to `state_topic` by the lock when it's locking." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates. It accepts states configured with `state_jammed`, `state_locked`, `state_unlocked`, `state_locking` or `state_unlocking`." StateUnlocked *string `json:"state_unlocked,omitempty"` // "The payload sent to `state_topic` by the lock when it's unlocked." StateUnlocking *string `json:"state_unlocking,omitempty"` // "The payload sent to `state_topic` by the lock when it's unlocking." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this lock. If two locks have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a state value from the payload." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *LockState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewLock ¶ added in v0.2.0
func NewLock(o *LockOptions) (*Lock, error)
func (*Lock) AddMessageHandler ¶
func (d *Lock) AddMessageHandler()
func (*Lock) AnnounceAvailable ¶
func (d *Lock) AnnounceAvailable()
func (*Lock) DeleteTopic ¶
func (d *Lock) DeleteTopic()
func (*Lock) GetDomainEntity ¶ added in v0.2.3
func (*Lock) GetMQTTFields ¶
func (d *Lock) GetMQTTFields() (fields MQTTFields)
func (*Lock) GetUniqueId ¶
func (*Lock) Initialize ¶
func (d *Lock) Initialize()
func (*Lock) JsonAttributes ¶ added in v0.2.1
func (*Lock) PopulateDevice ¶
func (*Lock) SetMQTTFields ¶
func (d *Lock) SetMQTTFields(fields MQTTFields)
func (*Lock) UnSubscribe ¶
func (d *Lock) UnSubscribe()
func (*Lock) UpdateState ¶
func (d *Lock) UpdateState()
type LockOptions ¶ added in v0.2.0
type LockOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewLockOptions ¶ added in v0.2.0
func NewLockOptions() *LockOptions
func (*LockOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *LockOptions) AvailabilityFunc(f func() string) *LockOptions
func (*LockOptions) AvailabilityMode ¶ added in v0.2.0
func (o *LockOptions) AvailabilityMode(mode string) *LockOptions
func (*LockOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *LockOptions) AvailabilityTemplate(template string) *LockOptions
func (*LockOptions) CodeFormat ¶ added in v0.2.0
func (o *LockOptions) CodeFormat(format string) *LockOptions
func (*LockOptions) CommandFunc ¶ added in v0.2.0
func (o *LockOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *LockOptions
func (*LockOptions) CommandTemplate ¶ added in v0.2.0
func (o *LockOptions) CommandTemplate(template string) *LockOptions
func (*LockOptions) EnabledByDefault ¶ added in v0.2.0
func (o *LockOptions) EnabledByDefault(d bool) *LockOptions
func (*LockOptions) Encoding ¶ added in v0.2.0
func (o *LockOptions) Encoding(encoding string) *LockOptions
func (*LockOptions) EntityCategory ¶ added in v0.2.0
func (o *LockOptions) EntityCategory(category string) *LockOptions
func (*LockOptions) Icon ¶ added in v0.2.0
func (o *LockOptions) Icon(icon string) *LockOptions
func (*LockOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *LockOptions) JsonAttributesFunc(f func() string) *LockOptions
func (*LockOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *LockOptions) JsonAttributesTemplate(template string) *LockOptions
func (*LockOptions) Name ¶ added in v0.2.0
func (o *LockOptions) Name(name string) *LockOptions
func (*LockOptions) ObjectId ¶ added in v0.2.0
func (o *LockOptions) ObjectId(id string) *LockOptions
func (*LockOptions) Optimistic ¶ added in v0.2.0
func (o *LockOptions) Optimistic(optimistic bool) *LockOptions
func (*LockOptions) PayloadAvailable ¶ added in v0.2.0
func (o *LockOptions) PayloadAvailable(available string) *LockOptions
func (*LockOptions) PayloadLock ¶ added in v0.2.0
func (o *LockOptions) PayloadLock(lock string) *LockOptions
func (*LockOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *LockOptions) PayloadNotAvailable(available string) *LockOptions
func (*LockOptions) PayloadOpen ¶ added in v0.2.0
func (o *LockOptions) PayloadOpen(open string) *LockOptions
func (*LockOptions) PayloadUnlock ¶ added in v0.2.0
func (o *LockOptions) PayloadUnlock(unlock string) *LockOptions
func (*LockOptions) Qos ¶ added in v0.2.0
func (o *LockOptions) Qos(qos int) *LockOptions
func (*LockOptions) Retain ¶ added in v0.2.0
func (o *LockOptions) Retain(retain bool) *LockOptions
func (*LockOptions) StateFunc ¶ added in v0.2.0
func (o *LockOptions) StateFunc(f func() string) *LockOptions
func (*LockOptions) StateJammed ¶ added in v0.2.0
func (o *LockOptions) StateJammed(jammed string) *LockOptions
func (*LockOptions) StateLocked ¶ added in v0.2.0
func (o *LockOptions) StateLocked(locked string) *LockOptions
func (*LockOptions) StateLocking ¶ added in v0.2.0
func (o *LockOptions) StateLocking(locking string) *LockOptions
func (*LockOptions) StateUnlocked ¶ added in v0.2.0
func (o *LockOptions) StateUnlocked(unlocked string) *LockOptions
func (*LockOptions) StateUnlocking ¶ added in v0.2.0
func (o *LockOptions) StateUnlocking(unlocking string) *LockOptions
func (*LockOptions) States ¶ added in v0.2.0
func (o *LockOptions) States() *LockState
func (*LockOptions) UniqueId ¶ added in v0.2.0
func (o *LockOptions) UniqueId(id string) *LockOptions
func (*LockOptions) ValueTemplate ¶ added in v0.2.0
func (o *LockOptions) ValueTemplate(template string) *LockOptions
type MQTTFields ¶
type Number ¶
type Number struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the number." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The [type/class](/integrations/number/#device-class) of the number." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as number attributes. Implies `force_update` of the current number state when a message is received on this topic." Max *float64 `json:"max,omitempty"` // "Maximum value." Min *float64 `json:"min,omitempty"` // "Minimum value." Mode *string `json:"mode,omitempty"` // "Control how the number should be displayed in the UI. Can be set to `box` or `slider` to force a display mode." Name *string `json:"name,omitempty"` // "The name of the Number." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if number works in optimistic mode." PayloadReset *string `json:"payload_reset,omitempty"` // "A special payload that resets the state to `None` when received on the `state_topic`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive number values." Step *float64 `json:"step,omitempty"` // "Step value. Smallest value `0.001`." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this Number. If two Numbers have the same unique ID Home Assistant will raise an exception." UnitOfMeasurement *string `json:"unit_of_measurement,omitempty"` // "Defines the unit of measurement of the sensor, if any." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the value." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *NumberState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewNumber ¶ added in v0.2.0
func NewNumber(o *NumberOptions) (*Number, error)
func (*Number) AddMessageHandler ¶
func (d *Number) AddMessageHandler()
func (*Number) AnnounceAvailable ¶
func (d *Number) AnnounceAvailable()
func (*Number) DeleteTopic ¶
func (d *Number) DeleteTopic()
func (*Number) GetDomainEntity ¶ added in v0.2.3
func (*Number) GetMQTTFields ¶
func (d *Number) GetMQTTFields() (fields MQTTFields)
func (*Number) GetUniqueId ¶
func (*Number) Initialize ¶
func (d *Number) Initialize()
func (*Number) JsonAttributes ¶ added in v0.2.1
func (*Number) PopulateDevice ¶
func (*Number) SetMQTTFields ¶
func (d *Number) SetMQTTFields(fields MQTTFields)
func (*Number) UnSubscribe ¶
func (d *Number) UnSubscribe()
func (*Number) UpdateState ¶
func (d *Number) UpdateState()
type NumberOptions ¶ added in v0.2.0
type NumberOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewNumberOptions ¶ added in v0.2.0
func NewNumberOptions() *NumberOptions
func (*NumberOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *NumberOptions) AvailabilityFunc(f func() string) *NumberOptions
func (*NumberOptions) AvailabilityMode ¶ added in v0.2.0
func (o *NumberOptions) AvailabilityMode(mode string) *NumberOptions
func (*NumberOptions) CommandFunc ¶ added in v0.2.0
func (o *NumberOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *NumberOptions
func (*NumberOptions) CommandTemplate ¶ added in v0.2.0
func (o *NumberOptions) CommandTemplate(template string) *NumberOptions
func (*NumberOptions) DeviceClass ¶ added in v0.2.0
func (o *NumberOptions) DeviceClass(class string) *NumberOptions
func (*NumberOptions) EnabledByDefault ¶ added in v0.2.0
func (o *NumberOptions) EnabledByDefault(d bool) *NumberOptions
func (*NumberOptions) Encoding ¶ added in v0.2.0
func (o *NumberOptions) Encoding(encoding string) *NumberOptions
func (*NumberOptions) EntityCategory ¶ added in v0.2.0
func (o *NumberOptions) EntityCategory(category string) *NumberOptions
func (*NumberOptions) Icon ¶ added in v0.2.0
func (o *NumberOptions) Icon(icon string) *NumberOptions
func (*NumberOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *NumberOptions) JsonAttributesFunc(f func() string) *NumberOptions
func (*NumberOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *NumberOptions) JsonAttributesTemplate(template string) *NumberOptions
func (*NumberOptions) Max ¶ added in v0.2.0
func (o *NumberOptions) Max(max float64) *NumberOptions
func (*NumberOptions) Min ¶ added in v0.2.0
func (o *NumberOptions) Min(min float64) *NumberOptions
func (*NumberOptions) Mode ¶ added in v0.2.0
func (o *NumberOptions) Mode(mode string) *NumberOptions
func (*NumberOptions) Name ¶ added in v0.2.0
func (o *NumberOptions) Name(name string) *NumberOptions
func (*NumberOptions) ObjectId ¶ added in v0.2.0
func (o *NumberOptions) ObjectId(id string) *NumberOptions
func (*NumberOptions) Optimistic ¶ added in v0.2.0
func (o *NumberOptions) Optimistic(optimistic bool) *NumberOptions
func (*NumberOptions) PayloadReset ¶ added in v0.2.0
func (o *NumberOptions) PayloadReset(reset string) *NumberOptions
func (*NumberOptions) Qos ¶ added in v0.2.0
func (o *NumberOptions) Qos(qos int) *NumberOptions
func (*NumberOptions) Retain ¶ added in v0.2.0
func (o *NumberOptions) Retain(retain bool) *NumberOptions
func (*NumberOptions) StateFunc ¶ added in v0.2.0
func (o *NumberOptions) StateFunc(f func() string) *NumberOptions
func (*NumberOptions) States ¶ added in v0.2.0
func (o *NumberOptions) States() *NumberState
func (*NumberOptions) Step ¶ added in v0.2.0
func (o *NumberOptions) Step(step float64) *NumberOptions
func (*NumberOptions) UniqueId ¶ added in v0.2.0
func (o *NumberOptions) UniqueId(id string) *NumberOptions
func (*NumberOptions) UnitOfMeasurement ¶ added in v0.2.0
func (o *NumberOptions) UnitOfMeasurement(measurement string) *NumberOptions
func (*NumberOptions) ValueTemplate ¶ added in v0.2.0
func (o *NumberOptions) ValueTemplate(template string) *NumberOptions
type NumberState ¶ added in v0.2.0
type Scene ¶
type Scene struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish `payload_on` to activate the scene." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "Icon for the scene." Name *string `json:"name,omitempty"` // "The name to use when displaying this scene." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that will be sent to `command_topic` when activating the MQTT scene." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this scene entity. If two scenes have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *SceneState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewScene ¶ added in v0.2.0
func NewScene(o *SceneOptions) (*Scene, error)
func (*Scene) AddMessageHandler ¶
func (d *Scene) AddMessageHandler()
func (*Scene) AnnounceAvailable ¶
func (d *Scene) AnnounceAvailable()
func (*Scene) DeleteTopic ¶
func (d *Scene) DeleteTopic()
func (*Scene) GetDomainEntity ¶ added in v0.2.3
func (*Scene) GetMQTTFields ¶
func (d *Scene) GetMQTTFields() (fields MQTTFields)
func (*Scene) GetUniqueId ¶
func (*Scene) Initialize ¶
func (d *Scene) Initialize()
func (*Scene) PopulateDevice ¶
func (*Scene) SetMQTTFields ¶
func (d *Scene) SetMQTTFields(fields MQTTFields)
func (*Scene) UnSubscribe ¶
func (d *Scene) UnSubscribe()
func (*Scene) UpdateState ¶
func (d *Scene) UpdateState()
type SceneOptions ¶ added in v0.2.0
type SceneOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSceneOptions ¶ added in v0.2.0
func NewSceneOptions() *SceneOptions
func (*SceneOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *SceneOptions) AvailabilityFunc(f func() string) *SceneOptions
func (*SceneOptions) AvailabilityMode ¶ added in v0.2.0
func (o *SceneOptions) AvailabilityMode(mode string) *SceneOptions
func (*SceneOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *SceneOptions) AvailabilityTemplate(template string) *SceneOptions
func (*SceneOptions) CommandFunc ¶ added in v0.2.0
func (o *SceneOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SceneOptions
func (*SceneOptions) EnabledByDefault ¶ added in v0.2.0
func (o *SceneOptions) EnabledByDefault(d bool) *SceneOptions
func (*SceneOptions) EntityCategory ¶ added in v0.2.0
func (o *SceneOptions) EntityCategory(category string) *SceneOptions
func (*SceneOptions) Icon ¶ added in v0.2.0
func (o *SceneOptions) Icon(icon string) *SceneOptions
func (*SceneOptions) Name ¶ added in v0.2.0
func (o *SceneOptions) Name(name string) *SceneOptions
func (*SceneOptions) ObjectId ¶ added in v0.2.0
func (o *SceneOptions) ObjectId(id string) *SceneOptions
func (*SceneOptions) PayloadAvailable ¶ added in v0.2.0
func (o *SceneOptions) PayloadAvailable(available string) *SceneOptions
func (*SceneOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *SceneOptions) PayloadNotAvailable(available string) *SceneOptions
func (*SceneOptions) PayloadOn ¶ added in v0.2.0
func (o *SceneOptions) PayloadOn(on string) *SceneOptions
func (*SceneOptions) Qos ¶ added in v0.2.0
func (o *SceneOptions) Qos(qos int) *SceneOptions
func (*SceneOptions) Retain ¶ added in v0.2.0
func (o *SceneOptions) Retain(retain bool) *SceneOptions
func (*SceneOptions) States ¶ added in v0.2.0
func (o *SceneOptions) States() *SceneState
func (*SceneOptions) UniqueId ¶ added in v0.2.0
func (o *SceneOptions) UniqueId(id string) *SceneOptions
type SceneState ¶ added in v0.2.0
type SceneState struct{}
type Select ¶
type Select struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the selected option." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as entity attributes. Implies `force_update` of the current select state when a message is received on this topic." Name *string `json:"name,omitempty"` // "The name of the Select." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if the select works in optimistic mode." Options *([]string) `json:"options,omitempty"` // "List of options that can be selected. An empty list or a list with a single item is allowed." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive update of the selected option." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this Select. If two Selects have the same unique ID Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the value." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *SelectState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSelect ¶ added in v0.2.0
func NewSelect(o *SelectOptions) (*Select, error)
func (*Select) AddMessageHandler ¶
func (d *Select) AddMessageHandler()
func (*Select) AnnounceAvailable ¶
func (d *Select) AnnounceAvailable()
func (*Select) DeleteTopic ¶
func (d *Select) DeleteTopic()
func (*Select) GetDomainEntity ¶ added in v0.2.3
func (*Select) GetMQTTFields ¶
func (d *Select) GetMQTTFields() (fields MQTTFields)
func (*Select) GetUniqueId ¶
func (*Select) Initialize ¶
func (d *Select) Initialize()
func (*Select) JsonAttributes ¶ added in v0.2.1
func (*Select) PopulateDevice ¶
func (*Select) SetMQTTFields ¶
func (d *Select) SetMQTTFields(fields MQTTFields)
func (*Select) UnSubscribe ¶
func (d *Select) UnSubscribe()
func (*Select) UpdateState ¶
func (d *Select) UpdateState()
type SelectOptions ¶ added in v0.2.0
type SelectOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSelectOptions ¶ added in v0.2.0
func NewSelectOptions() *SelectOptions
func (*SelectOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *SelectOptions) AvailabilityFunc(f func() string) *SelectOptions
func (*SelectOptions) AvailabilityMode ¶ added in v0.2.0
func (o *SelectOptions) AvailabilityMode(mode string) *SelectOptions
func (*SelectOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *SelectOptions) AvailabilityTemplate(template string) *SelectOptions
func (*SelectOptions) CommandFunc ¶ added in v0.2.0
func (o *SelectOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SelectOptions
func (*SelectOptions) CommandTemplate ¶ added in v0.2.0
func (o *SelectOptions) CommandTemplate(template string) *SelectOptions
func (*SelectOptions) EnabledByDefault ¶ added in v0.2.0
func (o *SelectOptions) EnabledByDefault(d bool) *SelectOptions
func (*SelectOptions) Encoding ¶ added in v0.2.0
func (o *SelectOptions) Encoding(encoding string) *SelectOptions
func (*SelectOptions) EntityCategory ¶ added in v0.2.0
func (o *SelectOptions) EntityCategory(category string) *SelectOptions
func (*SelectOptions) Icon ¶ added in v0.2.0
func (o *SelectOptions) Icon(icon string) *SelectOptions
func (*SelectOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *SelectOptions) JsonAttributesFunc(f func() string) *SelectOptions
func (*SelectOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *SelectOptions) JsonAttributesTemplate(template string) *SelectOptions
func (*SelectOptions) Name ¶ added in v0.2.0
func (o *SelectOptions) Name(name string) *SelectOptions
func (*SelectOptions) ObjectId ¶ added in v0.2.0
func (o *SelectOptions) ObjectId(id string) *SelectOptions
func (*SelectOptions) Optimistic ¶ added in v0.2.0
func (o *SelectOptions) Optimistic(optimistic bool) *SelectOptions
func (*SelectOptions) Options ¶ added in v0.2.0
func (o *SelectOptions) Options(options []string) *SelectOptions
func (*SelectOptions) Qos ¶ added in v0.2.0
func (o *SelectOptions) Qos(qos int) *SelectOptions
func (*SelectOptions) Retain ¶ added in v0.2.0
func (o *SelectOptions) Retain(retain bool) *SelectOptions
func (*SelectOptions) StateFunc ¶ added in v0.2.0
func (o *SelectOptions) StateFunc(f func() string) *SelectOptions
func (*SelectOptions) States ¶ added in v0.2.0
func (o *SelectOptions) States() *SelectState
func (*SelectOptions) UniqueId ¶ added in v0.2.0
func (o *SelectOptions) UniqueId(id string) *SelectOptions
func (*SelectOptions) ValueTemplate ¶ added in v0.2.0
func (o *SelectOptions) ValueTemplate(template string) *SelectOptions
type SelectState ¶ added in v0.2.0
type Sensor ¶
type Sensor struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The [type/class](/integrations/sensor/#device-class) of the sensor to set the icon in the frontend." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." ExpireAfter *int `json:"expire_after,omitempty"` // "If set, it defines the number of seconds after the sensor's state expires, if it's not updated. After expiry, the sensor's state becomes `unavailable`. Default the sensors state never expires." ForceUpdate *bool `json:"force_update,omitempty"` // "Sends update events even if the value hasn't changed. Useful if you want to have meaningful value graphs in history." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies `force_update` of the current sensor state when a message is received on this topic." LastResetValueTemplate *string `json:"last_reset_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the last_reset. Available variables: `entity_id`. The `entity_id` can be used to reference the entity's attributes." Name *string `json:"name,omitempty"` // "The name of the MQTT sensor." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." StateClass *string `json:"state_class,omitempty"` // "The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive sensor values. If `device_class`, `state_class`, `unit_of_measurement` or `suggested_display_precision` is set, and a numeric value is expected, an empty value `”` will be ignored and will not update the state, a `'None'` value will set the sensor to an `unknown` state." SuggestedDisplayPrecision *int `json:"suggested_display_precision,omitempty"` // "The number of decimals which should be used in the sensor's state after rounding." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception." UnitOfMeasurement *string `json:"unit_of_measurement,omitempty"` // "Defines the units of measurement of the sensor, if any." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the value. If the template throws an error, the current state will be used instead." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *SensorState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSensor ¶ added in v0.2.0
func NewSensor(o *SensorOptions) (*Sensor, error)
func (*Sensor) AddMessageHandler ¶
func (d *Sensor) AddMessageHandler()
func (*Sensor) AnnounceAvailable ¶
func (d *Sensor) AnnounceAvailable()
func (*Sensor) DeleteTopic ¶
func (d *Sensor) DeleteTopic()
func (*Sensor) GetDomainEntity ¶ added in v0.2.3
func (*Sensor) GetMQTTFields ¶
func (d *Sensor) GetMQTTFields() (fields MQTTFields)
func (*Sensor) GetUniqueId ¶
func (*Sensor) Initialize ¶
func (d *Sensor) Initialize()
func (*Sensor) JsonAttributes ¶ added in v0.2.1
func (*Sensor) PopulateDevice ¶
func (*Sensor) SetMQTTFields ¶
func (d *Sensor) SetMQTTFields(fields MQTTFields)
func (*Sensor) UnSubscribe ¶
func (d *Sensor) UnSubscribe()
func (*Sensor) UpdateState ¶
func (d *Sensor) UpdateState()
type SensorOptions ¶ added in v0.2.0
type SensorOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSensorOptions ¶ added in v0.2.0
func NewSensorOptions() *SensorOptions
func (*SensorOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *SensorOptions) AvailabilityFunc(f func() string) *SensorOptions
func (*SensorOptions) AvailabilityMode ¶ added in v0.2.0
func (o *SensorOptions) AvailabilityMode(mode string) *SensorOptions
func (*SensorOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *SensorOptions) AvailabilityTemplate(template string) *SensorOptions
func (*SensorOptions) DeviceClass ¶ added in v0.2.0
func (o *SensorOptions) DeviceClass(class string) *SensorOptions
func (*SensorOptions) EnabledByDefault ¶ added in v0.2.0
func (o *SensorOptions) EnabledByDefault(d bool) *SensorOptions
func (*SensorOptions) Encoding ¶ added in v0.2.0
func (o *SensorOptions) Encoding(encoding string) *SensorOptions
func (*SensorOptions) EntityCategory ¶ added in v0.2.0
func (o *SensorOptions) EntityCategory(category string) *SensorOptions
func (*SensorOptions) ExpireAfter ¶ added in v0.2.0
func (o *SensorOptions) ExpireAfter(after int) *SensorOptions
func (*SensorOptions) ForceUpdate ¶ added in v0.2.0
func (o *SensorOptions) ForceUpdate(update bool) *SensorOptions
func (*SensorOptions) Icon ¶ added in v0.2.0
func (o *SensorOptions) Icon(icon string) *SensorOptions
func (*SensorOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *SensorOptions) JsonAttributesFunc(f func() string) *SensorOptions
func (*SensorOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *SensorOptions) JsonAttributesTemplate(template string) *SensorOptions
func (*SensorOptions) LastResetValueTemplate ¶ added in v0.2.0
func (o *SensorOptions) LastResetValueTemplate(template string) *SensorOptions
func (*SensorOptions) Name ¶ added in v0.2.0
func (o *SensorOptions) Name(name string) *SensorOptions
func (*SensorOptions) ObjectId ¶ added in v0.2.0
func (o *SensorOptions) ObjectId(id string) *SensorOptions
func (*SensorOptions) PayloadAvailable ¶ added in v0.2.0
func (o *SensorOptions) PayloadAvailable(available string) *SensorOptions
func (*SensorOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *SensorOptions) PayloadNotAvailable(available string) *SensorOptions
func (*SensorOptions) Qos ¶ added in v0.2.0
func (o *SensorOptions) Qos(qos int) *SensorOptions
func (*SensorOptions) StateClass ¶ added in v0.2.0
func (o *SensorOptions) StateClass(class string) *SensorOptions
func (*SensorOptions) StateFunc ¶ added in v0.2.0
func (o *SensorOptions) StateFunc(f func() string) *SensorOptions
func (*SensorOptions) States ¶ added in v0.2.0
func (o *SensorOptions) States() *SensorState
func (*SensorOptions) SuggestedDisplayPrecision ¶ added in v0.2.0
func (o *SensorOptions) SuggestedDisplayPrecision(precision int) *SensorOptions
func (*SensorOptions) UniqueId ¶ added in v0.2.0
func (o *SensorOptions) UniqueId(id string) *SensorOptions
func (*SensorOptions) UnitOfMeasurement ¶ added in v0.2.0
func (o *SensorOptions) UnitOfMeasurement(measurement string) *SensorOptions
func (*SensorOptions) ValueTemplate ¶ added in v0.2.0
func (o *SensorOptions) ValueTemplate(template string) *SensorOptions
type SensorState ¶ added in v0.2.0
type Siren ¶
type Siren struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." AvailableTones *([]string) `json:"available_tones,omitempty"` // "A list of available tones the siren supports. When configured, this enables the support for setting a `tone` and enables the `tone` state attribute." CommandOffTemplate *string `json:"command_off_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate a custom payload to send to `command_topic` when the siren turn off service is called. By default `command_template` will be used as template for service turn off. The variable `value` will be assigned with the configured `payload_off` setting." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate a custom payload to send to `command_topic`. The variable `value` will be assigned with the configured `payload_on` or `payload_off` setting. The siren turn on service parameters `tone`, `volume_level` or `duration` can be used as variables in the template. When operation in optimistic mode the corresponding state attributes will be set. Turn on parameters will be filtered if a device misses the support." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the siren state. Without command templates, a default JSON payload like `{\"state\":\"ON\", \"tone\": \"bell\", \"duration\": 10, \"volume_level\": 0.5 }` is published. When the siren turn on service is called, the startup parameters will be added to the JSON payload. The `state` value of the JSON payload will be set to the the `payload_on` or `payload_off` configured payload.\n" Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name to use when displaying this siren." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if siren works in optimistic mode." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents `off` state. If specified, will be used for both comparing to the value in the `state_topic` (see `value_template` and `state_off` for details) and sending as `off` command to the `command_topic`." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents `on` state. If specified, will be used for both comparing to the value in the `state_topic` (see `value_template` and `state_on` for details) and sending as `on` command to the `command_topic`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateOff *string `json:"state_off,omitempty"` // "The payload that represents the `off` state. Used when value that represents `off` state in the `state_topic` is different from value that should be sent to the `command_topic` to turn the device `off`." StateOn *string `json:"state_on,omitempty"` // "The payload that represents the `on` state. Used when value that represents `on` state in the `state_topic` is different from value that should be sent to the `command_topic` to turn the device `on`." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates. The state update may be either JSON or a simple string. When a JSON payload is detected, the `state` value of the JSON payload should supply the `payload_on` or `payload_off` defined payload to turn the siren on or off. Additionally, the state attributes `duration`, `tone` and `volume_level` can be updated. Use `value_template` to transform the received state udpate to a compliant JSON payload. Attributes will only be set if the function is supported by the device and a valid value is supplied. When a non JSON payload is detected, it should be either of the `payload_on` or `payload_off` defined payloads or `None` to reset the siren's state to `unknown`. The initial state will be `unknown`. The state will be reset to `unknown` if a `None` payload or `null` JSON value is received as a state update." StateValueTemplate *string `json:"state_value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's state from the `state_topic`. To determine the siren's state result of this template will be compared to `state_on` and `state_off`. Alternatively `value_template` can be used to render to a valid JSON payload." SupportDuration *bool `json:"support_duration,omitempty"` // "Set to `true` if the MQTT siren supports the `duration` service turn on parameter and enables the `duration` state attribute." SupportVolumeSet *bool `json:"support_volume_set,omitempty"` // "Set to `true` if the MQTT siren supports the `volume_set` service turn on parameter and enables the `volume_level` state attribute." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this siren device. If two sirens have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *SirenState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSiren ¶ added in v0.2.0
func NewSiren(o *SirenOptions) (*Siren, error)
func (*Siren) AddMessageHandler ¶
func (d *Siren) AddMessageHandler()
func (*Siren) AnnounceAvailable ¶
func (d *Siren) AnnounceAvailable()
func (*Siren) DeleteTopic ¶
func (d *Siren) DeleteTopic()
func (*Siren) GetDomainEntity ¶ added in v0.2.3
func (*Siren) GetMQTTFields ¶
func (d *Siren) GetMQTTFields() (fields MQTTFields)
func (*Siren) GetUniqueId ¶
func (*Siren) Initialize ¶
func (d *Siren) Initialize()
func (*Siren) JsonAttributes ¶ added in v0.2.1
func (*Siren) PopulateDevice ¶
func (*Siren) SetMQTTFields ¶
func (d *Siren) SetMQTTFields(fields MQTTFields)
func (*Siren) UnSubscribe ¶
func (d *Siren) UnSubscribe()
func (*Siren) UpdateState ¶
func (d *Siren) UpdateState()
type SirenOptions ¶ added in v0.2.0
type SirenOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSirenOptions ¶ added in v0.2.0
func NewSirenOptions() *SirenOptions
func (*SirenOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *SirenOptions) AvailabilityFunc(f func() string) *SirenOptions
func (*SirenOptions) AvailabilityMode ¶ added in v0.2.0
func (o *SirenOptions) AvailabilityMode(mode string) *SirenOptions
func (*SirenOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *SirenOptions) AvailabilityTemplate(template string) *SirenOptions
func (*SirenOptions) AvailableTones ¶ added in v0.2.0
func (o *SirenOptions) AvailableTones(tones []string) *SirenOptions
func (*SirenOptions) CommandFunc ¶ added in v0.2.0
func (o *SirenOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SirenOptions
func (*SirenOptions) CommandOffTemplate ¶ added in v0.2.0
func (o *SirenOptions) CommandOffTemplate(template string) *SirenOptions
func (*SirenOptions) CommandTemplate ¶ added in v0.2.0
func (o *SirenOptions) CommandTemplate(template string) *SirenOptions
func (*SirenOptions) EnabledByDefault ¶ added in v0.2.0
func (o *SirenOptions) EnabledByDefault(d bool) *SirenOptions
func (*SirenOptions) Encoding ¶ added in v0.2.0
func (o *SirenOptions) Encoding(encoding string) *SirenOptions
func (*SirenOptions) EntityCategory ¶ added in v0.2.0
func (o *SirenOptions) EntityCategory(category string) *SirenOptions
func (*SirenOptions) Icon ¶ added in v0.2.0
func (o *SirenOptions) Icon(icon string) *SirenOptions
func (*SirenOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *SirenOptions) JsonAttributesFunc(f func() string) *SirenOptions
func (*SirenOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *SirenOptions) JsonAttributesTemplate(template string) *SirenOptions
func (*SirenOptions) Name ¶ added in v0.2.0
func (o *SirenOptions) Name(name string) *SirenOptions
func (*SirenOptions) ObjectId ¶ added in v0.2.0
func (o *SirenOptions) ObjectId(id string) *SirenOptions
func (*SirenOptions) Optimistic ¶ added in v0.2.0
func (o *SirenOptions) Optimistic(optimistic bool) *SirenOptions
func (*SirenOptions) PayloadAvailable ¶ added in v0.2.0
func (o *SirenOptions) PayloadAvailable(available string) *SirenOptions
func (*SirenOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *SirenOptions) PayloadNotAvailable(available string) *SirenOptions
func (*SirenOptions) PayloadOff ¶ added in v0.2.0
func (o *SirenOptions) PayloadOff(off string) *SirenOptions
func (*SirenOptions) PayloadOn ¶ added in v0.2.0
func (o *SirenOptions) PayloadOn(on string) *SirenOptions
func (*SirenOptions) Qos ¶ added in v0.2.0
func (o *SirenOptions) Qos(qos int) *SirenOptions
func (*SirenOptions) Retain ¶ added in v0.2.0
func (o *SirenOptions) Retain(retain bool) *SirenOptions
func (*SirenOptions) StateFunc ¶ added in v0.2.0
func (o *SirenOptions) StateFunc(f func() string) *SirenOptions
func (*SirenOptions) StateOff ¶ added in v0.2.0
func (o *SirenOptions) StateOff(off string) *SirenOptions
func (*SirenOptions) StateOn ¶ added in v0.2.0
func (o *SirenOptions) StateOn(on string) *SirenOptions
func (*SirenOptions) StateValueTemplate ¶ added in v0.2.0
func (o *SirenOptions) StateValueTemplate(template string) *SirenOptions
func (*SirenOptions) States ¶ added in v0.2.0
func (o *SirenOptions) States() *SirenState
func (*SirenOptions) SupportDuration ¶ added in v0.2.0
func (o *SirenOptions) SupportDuration(duration bool) *SirenOptions
func (*SirenOptions) SupportVolumeSet ¶ added in v0.2.0
func (o *SirenOptions) SupportVolumeSet(set bool) *SirenOptions
func (*SirenOptions) UniqueId ¶ added in v0.2.0
func (o *SirenOptions) UniqueId(id string) *SirenOptions
type SirenState ¶ added in v0.2.0
type StateStore ¶
type StateStore struct { AlarmControlPanel struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } BinarySensor struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Button struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string } Camera struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Climate struct { Mutex *sync.Mutex AuxState map[string]string Availability map[string]string CurrentHumidity map[string]string CurrentTemperature map[string]string FanModeState map[string]string JsonAttributes map[string]string ModeState map[string]string PresetModeState map[string]string SwingModeState map[string]string TargetHumidityState map[string]string TemperatureHighState map[string]string TemperatureLowState map[string]string TemperatureState map[string]string } DeviceTracker struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } DeviceTrigger struct { Mutex *sync.Mutex State map[string]string } Fan struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string OscillationState map[string]string PercentageState map[string]string PresetModeState map[string]string State map[string]string } Humidifier struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string ModeState map[string]string State map[string]string TargetHumidityState map[string]string } Light struct { Mutex *sync.Mutex Availability map[string]string BrightnessState map[string]string ColorModeState map[string]string ColorTempState map[string]string EffectState map[string]string HsState map[string]string JsonAttributes map[string]string RgbState map[string]string RgbwState map[string]string RgbwwState map[string]string State map[string]string XyState map[string]string } Lock struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Number struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Scene struct { Mutex *sync.Mutex Availability map[string]string } Select struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Sensor struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Siren struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Switch struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Tag struct { Mutex *sync.Mutex State map[string]string } Text struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Update struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } Vacuum struct { Mutex *sync.Mutex Availability map[string]string JsonAttributes map[string]string State map[string]string } }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
type Switch ¶
type Switch struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to change the switch state." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The [type/class](/integrations/switch/#device-class) of the switch to set the icon in the frontend." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name to use when displaying this switch." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Optimistic *bool `json:"optimistic,omitempty"` // "Flag that defines if switch works in optimistic mode." PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadOff *string `json:"payload_off,omitempty"` // "The payload that represents `off` state. If specified, will be used for both comparing to the value in the `state_topic` (see `value_template` and `state_off` for details) and sending as `off` command to the `command_topic`." PayloadOn *string `json:"payload_on,omitempty"` // "The payload that represents `on` state. If specified, will be used for both comparing to the value in the `state_topic` (see `value_template` and `state_on` for details) and sending as `on` command to the `command_topic`." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateOff *string `json:"state_off,omitempty"` // "The payload that represents the `off` state. Used when value that represents `off` state in the `state_topic` is different from value that should be sent to the `command_topic` to turn the device `off`." StateOn *string `json:"state_on,omitempty"` // "The payload that represents the `on` state. Used when value that represents `on` state in the `state_topic` is different from value that should be sent to the `command_topic` to turn the device `on`." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this switch device. If two switches have the same unique ID, Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's state from the `state_topic`. To determine the switches's state result of this template will be compared to `state_on` and `state_off`." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *SwitchState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSwitch ¶ added in v0.2.0
func NewSwitch(o *SwitchOptions) (*Switch, error)
func (*Switch) AddMessageHandler ¶
func (d *Switch) AddMessageHandler()
func (*Switch) AnnounceAvailable ¶
func (d *Switch) AnnounceAvailable()
func (*Switch) DeleteTopic ¶
func (d *Switch) DeleteTopic()
func (*Switch) GetDomainEntity ¶ added in v0.2.3
func (*Switch) GetMQTTFields ¶
func (d *Switch) GetMQTTFields() (fields MQTTFields)
func (*Switch) GetUniqueId ¶
func (*Switch) Initialize ¶
func (d *Switch) Initialize()
func (*Switch) JsonAttributes ¶ added in v0.2.1
func (*Switch) PopulateDevice ¶
func (*Switch) SetMQTTFields ¶
func (d *Switch) SetMQTTFields(fields MQTTFields)
func (*Switch) UnSubscribe ¶
func (d *Switch) UnSubscribe()
func (*Switch) UpdateState ¶
func (d *Switch) UpdateState()
type SwitchOptions ¶ added in v0.2.0
type SwitchOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewSwitchOptions ¶ added in v0.2.0
func NewSwitchOptions() *SwitchOptions
func (*SwitchOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *SwitchOptions) AvailabilityFunc(f func() string) *SwitchOptions
func (*SwitchOptions) AvailabilityMode ¶ added in v0.2.0
func (o *SwitchOptions) AvailabilityMode(mode string) *SwitchOptions
func (*SwitchOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *SwitchOptions) AvailabilityTemplate(template string) *SwitchOptions
func (*SwitchOptions) CommandFunc ¶ added in v0.2.0
func (o *SwitchOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *SwitchOptions
func (*SwitchOptions) DeviceClass ¶ added in v0.2.0
func (o *SwitchOptions) DeviceClass(class string) *SwitchOptions
func (*SwitchOptions) EnabledByDefault ¶ added in v0.2.0
func (o *SwitchOptions) EnabledByDefault(d bool) *SwitchOptions
func (*SwitchOptions) Encoding ¶ added in v0.2.0
func (o *SwitchOptions) Encoding(encoding string) *SwitchOptions
func (*SwitchOptions) EntityCategory ¶ added in v0.2.0
func (o *SwitchOptions) EntityCategory(category string) *SwitchOptions
func (*SwitchOptions) Icon ¶ added in v0.2.0
func (o *SwitchOptions) Icon(icon string) *SwitchOptions
func (*SwitchOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *SwitchOptions) JsonAttributesFunc(f func() string) *SwitchOptions
func (*SwitchOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *SwitchOptions) JsonAttributesTemplate(template string) *SwitchOptions
func (*SwitchOptions) Name ¶ added in v0.2.0
func (o *SwitchOptions) Name(name string) *SwitchOptions
func (*SwitchOptions) ObjectId ¶ added in v0.2.0
func (o *SwitchOptions) ObjectId(id string) *SwitchOptions
func (*SwitchOptions) Optimistic ¶ added in v0.2.0
func (o *SwitchOptions) Optimistic(optimistic bool) *SwitchOptions
func (*SwitchOptions) PayloadAvailable ¶ added in v0.2.0
func (o *SwitchOptions) PayloadAvailable(available string) *SwitchOptions
func (*SwitchOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *SwitchOptions) PayloadNotAvailable(available string) *SwitchOptions
func (*SwitchOptions) PayloadOff ¶ added in v0.2.0
func (o *SwitchOptions) PayloadOff(off string) *SwitchOptions
func (*SwitchOptions) PayloadOn ¶ added in v0.2.0
func (o *SwitchOptions) PayloadOn(on string) *SwitchOptions
func (*SwitchOptions) Qos ¶ added in v0.2.0
func (o *SwitchOptions) Qos(qos int) *SwitchOptions
func (*SwitchOptions) Retain ¶ added in v0.2.0
func (o *SwitchOptions) Retain(retain bool) *SwitchOptions
func (*SwitchOptions) StateFunc ¶ added in v0.2.0
func (o *SwitchOptions) StateFunc(f func() string) *SwitchOptions
func (*SwitchOptions) StateOff ¶ added in v0.2.0
func (o *SwitchOptions) StateOff(off string) *SwitchOptions
func (*SwitchOptions) StateOn ¶ added in v0.2.0
func (o *SwitchOptions) StateOn(on string) *SwitchOptions
func (*SwitchOptions) States ¶ added in v0.2.0
func (o *SwitchOptions) States() *SwitchState
func (*SwitchOptions) UniqueId ¶ added in v0.2.0
func (o *SwitchOptions) UniqueId(id string) *SwitchOptions
func (*SwitchOptions) ValueTemplate ¶ added in v0.2.0
func (o *SwitchOptions) ValueTemplate(template string) *SwitchOptions
type SwitchState ¶ added in v0.2.0
type Tag ¶
type Tag struct { Device Device `json:"device,omitempty"` // Device configuration parameters StateTopic *string `json:"topic,omitempty"` // "The MQTT topic subscribed to receive tag scanned events." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that returns a tag ID." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *TagState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewTag ¶ added in v0.2.0
func NewTag(o *TagOptions) (*Tag, error)
func (*Tag) AddMessageHandler ¶
func (d *Tag) AddMessageHandler()
func (*Tag) AnnounceAvailable ¶
func (d *Tag) AnnounceAvailable()
func (*Tag) DeleteTopic ¶
func (d *Tag) DeleteTopic()
func (Tag) GetDomainEntity ¶ added in v0.2.3
func (*Tag) GetMQTTFields ¶
func (d *Tag) GetMQTTFields() (fields MQTTFields)
func (Tag) GetUniqueId ¶
func (*Tag) Initialize ¶
func (d *Tag) Initialize()
func (*Tag) PopulateDevice ¶
func (*Tag) SetMQTTFields ¶
func (d *Tag) SetMQTTFields(fields MQTTFields)
func (*Tag) UnSubscribe ¶
func (d *Tag) UnSubscribe()
func (*Tag) UpdateState ¶
func (d *Tag) UpdateState()
type TagOptions ¶ added in v0.2.0
type TagOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewTagOptions ¶ added in v0.2.0
func NewTagOptions() *TagOptions
func (*TagOptions) StateFunc ¶ added in v0.2.0
func (o *TagOptions) StateFunc(f func() string) *TagOptions
func (*TagOptions) States ¶ added in v0.2.0
func (o *TagOptions) States() *TagState
func (*TagOptions) ValueTemplate ¶ added in v0.2.0
func (o *TagOptions) ValueTemplate(template string) *TagOptions
type Text ¶
type Text struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTemplate *string `json:"command_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish the text value that is set." Device Device `json:"device,omitempty"` // Device configuration parameters EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as entity attributes. Implies `force_update` of the current select state when a message is received on this topic." Max *int `json:"max,omitempty"` // "The maximum size of a text being set or received (maximum is 255)." Min *int `json:"min,omitempty"` // "The minimum size of a text being set or received." Mode *string `json:"mode,omitempty"` // "The mode off the text entity. Must be either `text` or `password`." Name *string `json:"name,omitempty"` // "The name of the text entity." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" Pattern *string `json:"pattern,omitempty"` // "A valid regular expression the text being set or received must match with." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive text state updates. Text state updates should match the `pattern` (if set) and meet the size constraints `min` and `max`. Can be used with `value_template` to render the incoming payload to a text update." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this Select. If two Selects have the same unique ID Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the text state value from the payload received on `state_topic`." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *TextState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewText ¶ added in v0.2.0
func NewText(o *TextOptions) (*Text, error)
func (*Text) AddMessageHandler ¶
func (d *Text) AddMessageHandler()
func (*Text) AnnounceAvailable ¶
func (d *Text) AnnounceAvailable()
func (*Text) DeleteTopic ¶
func (d *Text) DeleteTopic()
func (*Text) GetDomainEntity ¶ added in v0.2.3
func (*Text) GetMQTTFields ¶
func (d *Text) GetMQTTFields() (fields MQTTFields)
func (*Text) GetUniqueId ¶
func (*Text) Initialize ¶
func (d *Text) Initialize()
func (*Text) JsonAttributes ¶ added in v0.2.1
func (*Text) PopulateDevice ¶
func (*Text) SetMQTTFields ¶
func (d *Text) SetMQTTFields(fields MQTTFields)
func (*Text) UnSubscribe ¶
func (d *Text) UnSubscribe()
func (*Text) UpdateState ¶
func (d *Text) UpdateState()
type TextOptions ¶ added in v0.2.0
type TextOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewTextOptions ¶ added in v0.2.0
func NewTextOptions() *TextOptions
func (*TextOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *TextOptions) AvailabilityFunc(f func() string) *TextOptions
func (*TextOptions) AvailabilityMode ¶ added in v0.2.0
func (o *TextOptions) AvailabilityMode(mode string) *TextOptions
func (*TextOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *TextOptions) AvailabilityTemplate(template string) *TextOptions
func (*TextOptions) CommandFunc ¶ added in v0.2.0
func (o *TextOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *TextOptions
func (*TextOptions) CommandTemplate ¶ added in v0.2.0
func (o *TextOptions) CommandTemplate(template string) *TextOptions
func (*TextOptions) EnabledByDefault ¶ added in v0.2.0
func (o *TextOptions) EnabledByDefault(d bool) *TextOptions
func (*TextOptions) Encoding ¶ added in v0.2.0
func (o *TextOptions) Encoding(encoding string) *TextOptions
func (*TextOptions) EntityCategory ¶ added in v0.2.0
func (o *TextOptions) EntityCategory(category string) *TextOptions
func (*TextOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *TextOptions) JsonAttributesFunc(f func() string) *TextOptions
func (*TextOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *TextOptions) JsonAttributesTemplate(template string) *TextOptions
func (*TextOptions) Max ¶ added in v0.2.0
func (o *TextOptions) Max(max int) *TextOptions
func (*TextOptions) Min ¶ added in v0.2.0
func (o *TextOptions) Min(min int) *TextOptions
func (*TextOptions) Mode ¶ added in v0.2.0
func (o *TextOptions) Mode(mode string) *TextOptions
func (*TextOptions) Name ¶ added in v0.2.0
func (o *TextOptions) Name(name string) *TextOptions
func (*TextOptions) ObjectId ¶ added in v0.2.0
func (o *TextOptions) ObjectId(id string) *TextOptions
func (*TextOptions) Pattern ¶ added in v0.2.0
func (o *TextOptions) Pattern(pattern string) *TextOptions
func (*TextOptions) Qos ¶ added in v0.2.0
func (o *TextOptions) Qos(qos int) *TextOptions
func (*TextOptions) Retain ¶ added in v0.2.0
func (o *TextOptions) Retain(retain bool) *TextOptions
func (*TextOptions) StateFunc ¶ added in v0.2.0
func (o *TextOptions) StateFunc(f func() string) *TextOptions
func (*TextOptions) States ¶ added in v0.2.0
func (o *TextOptions) States() *TextState
func (*TextOptions) UniqueId ¶ added in v0.2.0
func (o *TextOptions) UniqueId(id string) *TextOptions
func (*TextOptions) ValueTemplate ¶ added in v0.2.0
func (o *TextOptions) ValueTemplate(template string) *TextOptions
type Topic ¶ added in v0.2.0
func (Topic) MarshalJSON ¶ added in v0.2.0
type Update ¶
type Update struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish `payload_install` to start installing process." Device Device `json:"device,omitempty"` // Device configuration parameters DeviceClass *string `json:"device_class,omitempty"` // "The [type/class](/integrations/update/#device-classes) of the update to set the icon in the frontend." EnabledByDefault *bool `json:"enabled_by_default,omitempty"` // "Flag which defines if the entity should be enabled when first added." Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." EntityCategory *string `json:"entity_category,omitempty"` // "The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity." EntityPicture *string `json:"entity_picture,omitempty"` // "Picture URL for the entity." Icon *string `json:"icon,omitempty"` // "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as entity attributes. Implies `force_update` of the current select state when a message is received on this topic." LatestVersionTemplate *string `json:"latest_version_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the latest version value." LatestVersionTopic *string `json:"latest_version_topic,omitempty"` // "The MQTT topic subscribed to receive an update of the latest version." Name *string `json:"name,omitempty"` // "The name of the Select." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadInstall *string `json:"payload_install,omitempty"` // "The MQTT payload to start installing process." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages." ReleaseSummary *string `json:"release_summary,omitempty"` // "Summary of the release notes or changelog. This is suitable a brief update description of max 255 characters." ReleaseUrl *string `json:"release_url,omitempty"` // "URL to the full release notes of the latest version available." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state updates. The state update may be either JSON or a simple string with `installed_version` value. When a JSON payload is detected, the state value of the JSON payload should supply the `installed_version` and can optional supply: `latest_version`, `title`, `release_summary`, `release_url` or an `entity_picture` URL." Title *string `json:"title,omitempty"` // "Title of the software, or firmware update. This helps to differentiate between the device or entity name versus the title of the software installed." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this Select. If two Selects have the same unique ID Home Assistant will raise an exception." ValueTemplate *string `json:"value_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the `installed_version` state value or to render to a valid JSON payload on from the payload received on `state_topic`." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *UpdateState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewUpdate ¶ added in v0.2.0
func NewUpdate(o *UpdateOptions) (*Update, error)
func (*Update) AddMessageHandler ¶
func (d *Update) AddMessageHandler()
func (*Update) AnnounceAvailable ¶
func (d *Update) AnnounceAvailable()
func (*Update) DeleteTopic ¶
func (d *Update) DeleteTopic()
func (*Update) GetDomainEntity ¶ added in v0.2.3
func (*Update) GetMQTTFields ¶
func (d *Update) GetMQTTFields() (fields MQTTFields)
func (*Update) GetUniqueId ¶
func (*Update) Initialize ¶
func (d *Update) Initialize()
func (*Update) JsonAttributes ¶ added in v0.2.1
func (*Update) PopulateDevice ¶
func (*Update) SetMQTTFields ¶
func (d *Update) SetMQTTFields(fields MQTTFields)
func (*Update) UnSubscribe ¶
func (d *Update) UnSubscribe()
func (*Update) UpdateState ¶
func (d *Update) UpdateState()
type UpdateOptions ¶ added in v0.2.0
type UpdateOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewUpdateOptions ¶ added in v0.2.0
func NewUpdateOptions() *UpdateOptions
func (*UpdateOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *UpdateOptions) AvailabilityFunc(f func() string) *UpdateOptions
func (*UpdateOptions) AvailabilityMode ¶ added in v0.2.0
func (o *UpdateOptions) AvailabilityMode(mode string) *UpdateOptions
func (*UpdateOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *UpdateOptions) AvailabilityTemplate(template string) *UpdateOptions
func (*UpdateOptions) CommandFunc ¶ added in v0.2.0
func (o *UpdateOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *UpdateOptions
func (*UpdateOptions) DeviceClass ¶ added in v0.2.0
func (o *UpdateOptions) DeviceClass(class string) *UpdateOptions
func (*UpdateOptions) EnabledByDefault ¶ added in v0.2.0
func (o *UpdateOptions) EnabledByDefault(d bool) *UpdateOptions
func (*UpdateOptions) Encoding ¶ added in v0.2.0
func (o *UpdateOptions) Encoding(encoding string) *UpdateOptions
func (*UpdateOptions) EntityCategory ¶ added in v0.2.0
func (o *UpdateOptions) EntityCategory(category string) *UpdateOptions
func (*UpdateOptions) EntityPicture ¶ added in v0.2.0
func (o *UpdateOptions) EntityPicture(picture string) *UpdateOptions
func (*UpdateOptions) Icon ¶ added in v0.2.0
func (o *UpdateOptions) Icon(icon string) *UpdateOptions
func (*UpdateOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *UpdateOptions) JsonAttributesFunc(f func() string) *UpdateOptions
func (*UpdateOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *UpdateOptions) JsonAttributesTemplate(template string) *UpdateOptions
func (*UpdateOptions) LatestVersionFunc ¶ added in v0.2.0
func (o *UpdateOptions) LatestVersionFunc(f func(mqtt.Message, mqtt.Client)) *UpdateOptions
func (*UpdateOptions) LatestVersionTemplate ¶ added in v0.2.0
func (o *UpdateOptions) LatestVersionTemplate(template string) *UpdateOptions
func (*UpdateOptions) Name ¶ added in v0.2.0
func (o *UpdateOptions) Name(name string) *UpdateOptions
func (*UpdateOptions) ObjectId ¶ added in v0.2.0
func (o *UpdateOptions) ObjectId(id string) *UpdateOptions
func (*UpdateOptions) PayloadInstall ¶ added in v0.2.0
func (o *UpdateOptions) PayloadInstall(install string) *UpdateOptions
func (*UpdateOptions) Qos ¶ added in v0.2.0
func (o *UpdateOptions) Qos(qos int) *UpdateOptions
func (*UpdateOptions) ReleaseSummary ¶ added in v0.2.0
func (o *UpdateOptions) ReleaseSummary(summary string) *UpdateOptions
func (*UpdateOptions) ReleaseUrl ¶ added in v0.2.0
func (o *UpdateOptions) ReleaseUrl(url string) *UpdateOptions
func (*UpdateOptions) Retain ¶ added in v0.2.0
func (o *UpdateOptions) Retain(retain bool) *UpdateOptions
func (*UpdateOptions) StateFunc ¶ added in v0.2.0
func (o *UpdateOptions) StateFunc(f func() string) *UpdateOptions
func (*UpdateOptions) States ¶ added in v0.2.0
func (o *UpdateOptions) States() *UpdateState
func (*UpdateOptions) Title ¶ added in v0.2.0
func (o *UpdateOptions) Title(title string) *UpdateOptions
func (*UpdateOptions) UniqueId ¶ added in v0.2.0
func (o *UpdateOptions) UniqueId(id string) *UpdateOptions
func (*UpdateOptions) ValueTemplate ¶ added in v0.2.0
func (o *UpdateOptions) ValueTemplate(template string) *UpdateOptions
type UpdateState ¶ added in v0.2.0
type Vacuum ¶
type Vacuum struct { AvailabilityMode *string `json:"availability_mode,omitempty"` // "When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid entries are `all`, `any`, and `latest`. If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability." AvailabilityTemplate *string `json:"availability_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's availability from the `availability_topic`. To determine the devices's availability result of this template will be compared to `payload_available` and `payload_not_available`." AvailabilityTopic *string `json:"availability_topic,omitempty"` // "The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`." CommandTopic *string `json:"command_topic,omitempty"` // "The MQTT topic to publish commands to control the vacuum." Device Device `json:"device,omitempty"` // Device configuration parameters Encoding *string `json:"encoding,omitempty"` // "The encoding of the payloads received and published messages. Set to `\"\"` to disable decoding of incoming payload." FanSpeedList *([]string) `json:"fan_speed_list,omitempty"` // "List of possible fan speeds for the vacuum." JsonAttributesTemplate *string `json:"json_attributes_template,omitempty"` // "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation." JsonAttributesTopic *string `json:"json_attributes_topic,omitempty"` // "The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation." Name *string `json:"name,omitempty"` // "The name of the vacuum." ObjectId *string `json:"object_id,omitempty"` // "Used instead of `name` for automatic generation of `entity_id`" PayloadAvailable *string `json:"payload_available,omitempty"` // "The payload that represents the available state." PayloadCleanSpot *string `json:"payload_clean_spot,omitempty"` // "The payload to send to the `command_topic` to begin a spot cleaning cycle." PayloadLocate *string `json:"payload_locate,omitempty"` // "The payload to send to the `command_topic` to locate the vacuum (typically plays a song)." PayloadNotAvailable *string `json:"payload_not_available,omitempty"` // "The payload that represents the unavailable state." PayloadPause *string `json:"payload_pause,omitempty"` // "The payload to send to the `command_topic` to pause the vacuum." PayloadReturnToBase *string `json:"payload_return_to_base,omitempty"` // "The payload to send to the `command_topic` to tell the vacuum to return to base." PayloadStart *string `json:"payload_start,omitempty"` // "The payload to send to the `command_topic` to begin the cleaning cycle." PayloadStop *string `json:"payload_stop,omitempty"` // "The payload to send to the `command_topic` to stop cleaning." Qos *int `json:"qos,omitempty"` // "The maximum QoS level of the state topic." Retain *bool `json:"retain,omitempty"` // "If the published message should have the retain flag on or not." Schema *string `json:"schema,omitempty"` // "The schema to use. Must be `state` to select the state schema." SendCommandTopic *string `json:"send_command_topic,omitempty"` // "The MQTT topic to publish custom commands to the vacuum." SetFanSpeedTopic *string `json:"set_fan_speed_topic,omitempty"` // "The MQTT topic to publish commands to control the vacuum's fan speed." StateTopic *string `json:"state_topic,omitempty"` // "The MQTT topic subscribed to receive state messages from the vacuum. Messages received on the `state_topic` must be a valid JSON dictionary, with a mandatory `state` key and optionally `battery_level` and `fan_speed` keys as shown in the [example](#state-mqtt-protocol)." SupportedFeatures *([]string) `json:"supported_features,omitempty"` // "List of features that the vacuum supports (possible values are `start`, `stop`, `pause`, `return_home`, `battery`, `status`, `locate`, `clean_spot`, `fan_speed`, `send_command`)." UniqueId *string `json:"unique_id,omitempty"` // "An ID that uniquely identifies this vacuum. If two vacuums have the same unique ID, Home Assistant will raise an exception." MQTT *MQTTFields `json:"-"` // MQTT configuration parameters States *VacuumState `json:"-"` // External state update location // contains filtered or unexported fields }
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewVacuum ¶ added in v0.2.0
func NewVacuum(o *VacuumOptions) (*Vacuum, error)
func (*Vacuum) AddMessageHandler ¶
func (d *Vacuum) AddMessageHandler()
func (*Vacuum) AnnounceAvailable ¶
func (d *Vacuum) AnnounceAvailable()
func (*Vacuum) DeleteTopic ¶
func (d *Vacuum) DeleteTopic()
func (*Vacuum) GetDomainEntity ¶ added in v0.2.3
func (*Vacuum) GetMQTTFields ¶
func (d *Vacuum) GetMQTTFields() (fields MQTTFields)
func (*Vacuum) GetUniqueId ¶
func (*Vacuum) Initialize ¶
func (d *Vacuum) Initialize()
func (*Vacuum) JsonAttributes ¶ added in v0.2.1
func (*Vacuum) PopulateDevice ¶
func (*Vacuum) SetMQTTFields ¶
func (d *Vacuum) SetMQTTFields(fields MQTTFields)
func (*Vacuum) UnSubscribe ¶
func (d *Vacuum) UnSubscribe()
func (*Vacuum) UpdateState ¶
func (d *Vacuum) UpdateState()
type VacuumOptions ¶ added in v0.2.0
type VacuumOptions struct {
// contains filtered or unexported fields
}
////////////////////////////////////////////////////////////////////////////// Do not modify this file, it is automatically generated //////////////////////////////////////////////////////////////////////////////
func NewVacuumOptions ¶ added in v0.2.0
func NewVacuumOptions() *VacuumOptions
func (*VacuumOptions) AvailabilityFunc ¶ added in v0.2.0
func (o *VacuumOptions) AvailabilityFunc(f func() string) *VacuumOptions
func (*VacuumOptions) AvailabilityMode ¶ added in v0.2.0
func (o *VacuumOptions) AvailabilityMode(mode string) *VacuumOptions
func (*VacuumOptions) AvailabilityTemplate ¶ added in v0.2.0
func (o *VacuumOptions) AvailabilityTemplate(template string) *VacuumOptions
func (*VacuumOptions) CommandFunc ¶ added in v0.2.0
func (o *VacuumOptions) CommandFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
func (*VacuumOptions) Encoding ¶ added in v0.2.0
func (o *VacuumOptions) Encoding(encoding string) *VacuumOptions
func (*VacuumOptions) FanSpeedList ¶ added in v0.2.0
func (o *VacuumOptions) FanSpeedList(list []string) *VacuumOptions
func (*VacuumOptions) JsonAttributesFunc ¶ added in v0.2.0
func (o *VacuumOptions) JsonAttributesFunc(f func() string) *VacuumOptions
func (*VacuumOptions) JsonAttributesTemplate ¶ added in v0.2.0
func (o *VacuumOptions) JsonAttributesTemplate(template string) *VacuumOptions
func (*VacuumOptions) Name ¶ added in v0.2.0
func (o *VacuumOptions) Name(name string) *VacuumOptions
func (*VacuumOptions) ObjectId ¶ added in v0.2.0
func (o *VacuumOptions) ObjectId(id string) *VacuumOptions
func (*VacuumOptions) PayloadAvailable ¶ added in v0.2.0
func (o *VacuumOptions) PayloadAvailable(available string) *VacuumOptions
func (*VacuumOptions) PayloadCleanSpot ¶ added in v0.2.0
func (o *VacuumOptions) PayloadCleanSpot(spot string) *VacuumOptions
func (*VacuumOptions) PayloadLocate ¶ added in v0.2.0
func (o *VacuumOptions) PayloadLocate(locate string) *VacuumOptions
func (*VacuumOptions) PayloadNotAvailable ¶ added in v0.2.0
func (o *VacuumOptions) PayloadNotAvailable(available string) *VacuumOptions
func (*VacuumOptions) PayloadPause ¶ added in v0.2.0
func (o *VacuumOptions) PayloadPause(pause string) *VacuumOptions
func (*VacuumOptions) PayloadReturnToBase ¶ added in v0.2.0
func (o *VacuumOptions) PayloadReturnToBase(base string) *VacuumOptions
func (*VacuumOptions) PayloadStart ¶ added in v0.2.0
func (o *VacuumOptions) PayloadStart(start string) *VacuumOptions
func (*VacuumOptions) PayloadStop ¶ added in v0.2.0
func (o *VacuumOptions) PayloadStop(stop string) *VacuumOptions
func (*VacuumOptions) Qos ¶ added in v0.2.0
func (o *VacuumOptions) Qos(qos int) *VacuumOptions
func (*VacuumOptions) Retain ¶ added in v0.2.0
func (o *VacuumOptions) Retain(retain bool) *VacuumOptions
func (*VacuumOptions) Schema ¶ added in v0.2.0
func (o *VacuumOptions) Schema(schema string) *VacuumOptions
func (*VacuumOptions) SendCommandFunc ¶ added in v0.2.0
func (o *VacuumOptions) SendCommandFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
func (*VacuumOptions) SetFanSpeedFunc ¶ added in v0.2.0
func (o *VacuumOptions) SetFanSpeedFunc(f func(mqtt.Message, mqtt.Client)) *VacuumOptions
func (*VacuumOptions) StateFunc ¶ added in v0.2.0
func (o *VacuumOptions) StateFunc(f func() string) *VacuumOptions
func (*VacuumOptions) States ¶ added in v0.2.0
func (o *VacuumOptions) States() *VacuumState
func (*VacuumOptions) SupportedFeatures ¶ added in v0.2.0
func (o *VacuumOptions) SupportedFeatures(features []string) *VacuumOptions
func (*VacuumOptions) UniqueId ¶ added in v0.2.0
func (o *VacuumOptions) UniqueId(id string) *VacuumOptions
type VacuumState ¶ added in v0.2.0
Source Files ¶
- alarm_control_panel.go
- alarm_control_panel_options.go
- binary_sensor.go
- binary_sensor_options.go
- button.go
- button_options.go
- camera.go
- camera_options.go
- climate.go
- climate_options.go
- device_tracker.go
- device_tracker_options.go
- device_trigger.go
- device_trigger_options.go
- fan.go
- fan_options.go
- generics.go
- hadiscovery.go
- humidifier.go
- humidifier_options.go
- light.go
- light_options.go
- lightref.go
- lock.go
- lock_options.go
- number.go
- number_options.go
- scene.go
- scene_options.go
- select.go
- select_options.go
- sensor.go
- sensor_options.go
- shared.go
- siren.go
- siren_options.go
- store.go
- switch.go
- switch_options.go
- tag.go
- tag_options.go
- text.go
- text_options.go
- types.go
- update.go
- update_options.go
- vacuum.go
- vacuum_options.go