Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExampleYAML string
Functions ¶
func SaveExample ¶
func ValidateConfig ¶
Types ¶
type AgentConfig ¶
type Config ¶
type Config struct {
MQTT MQTTConfig `yaml:"mqtt"`
Agent AgentConfig `yaml:"agent"`
Sensors map[string]SensorConfig `yaml:"sensors"`
}
func LoadAndValidate ¶
func LoadConfig ¶
type HASensorConfig ¶
type MQTTConfig ¶
type MQTTConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
ClientID string `yaml:"client_id"`
DiscoveryPrefix string `yaml:"discovery_prefix"`
StatePrefix string `yaml:"state_prefix"`
DefaultInterval time.Duration `yaml:"default_interval"`
}
type SensorConfig ¶
type SensorConfig struct {
Name string `yaml:"name"`
Interval time.Duration `yaml:"interval"`
IncludeMounts []string `yaml:"include_mounts,omitempty"`
HA *HASensorConfig `yaml:"ha,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.