aimqtt

package
v0.0.0-...-9531c2a Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHexColor

func ParseHexColor(s string) (c color.RGBA, err error)

Types

type AiMqtt

type AiMqtt struct {
	// contains filtered or unexported fields
}

func (*AiMqtt) PublishMQTT

func (profiMqtt *AiMqtt) PublishMQTT(mqttClient mqtt.Client, log logger.ILog, topic string, payload string, forceUpdate bool)

func (*AiMqtt) PublishMQTTOld

func (profiMqtt *AiMqtt) PublishMQTTOld(mqttClient mqtt.Client, log logger.ILog, topic string)

func (*AiMqtt) UpdateHomeAssistant

func (profiMqtt *AiMqtt) UpdateHomeAssistant(aiDirector AquaIllumination.Director, mqttClient mqtt.Client, log logger.ILog, forceUpdate bool)

func (*AiMqtt) UpdateMQTT

func (profiMqtt *AiMqtt) UpdateMQTT(aiDirector AquaIllumination.Director, mqttClient mqtt.Client, log logger.ILog, forceUpdate bool)

type Device

type Device struct {
	Identifiers  string `json:"identifiers"`
	Name         string `json:"name"`
	Model        string `json:"model"`
	Manufacturer string `json:"manufacturer"`
	Version      string `json:"hw_version"`
}

type HaBaseConfig

type HaBaseConfig struct {
	Device              Device `json:"device"`
	Name                string `json:"name"`
	UniqueId            string `json:"unique_id"`
	AvailabilityTopic   string `json:"availability_topic,omitempty"`
	DeviceClass         string `json:"device_class,omitempty"`
	PayloadAvailable    string `json:"payload_available"`
	PayloadNotAvailable string `json:"payload_not_available"`
	Icon                string `json:"icon,omitempty"`
}

type HaButtonConfig

type HaButtonConfig struct {
	HaBaseConfig
	CommandTopic string `json:"command_topic"`
}

type HaLightConfig

type HaLightConfig struct {
	HaBaseConfig
	StateTopic             string `json:"state_topic"`
	CommandTopic           string `json:"command_topic"`
	OnCommandType          string `json:"on_command_type,omitempty"`
	BrightnessStateTopic   string `json:"brightness_state_topic,omitempty"`
	BrightnessCommandTopic string `json:"brightness_command_topic,omitempty"`
	PayloadOff             string `json:"payload_off,omitempty"`
	PayloadOn              string `json:"payload_on,omitempty"`
	RgbStateTopic          string `json:"rgb_state_topic,omitempty"`
	RgbCommandTopic        string `json:"rgb_command_topic,omitempty"`
	BrightnessScale        string `json:"brightness_scale,omitempty"`
}

type HaStateConfig

type HaStateConfig struct {
	HaBaseConfig
	StateTopic        string `json:"state_topic"`
	UnitOfMeasurement string `json:"unit_of_measurement,omitempty"`
}

type HaSwitchConfig

type HaSwitchConfig struct {
	HaBaseConfig
	StateTopic   string `json:"state_topic"`
	CommandTopic string `json:"command_topic"`
}

Jump to

Keyboard shortcuts

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