Documentation
¶
Index ¶
Constants ¶
View Source
const (
EncodePrefix = "BASE64/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Active string `yaml:"active"`
Devices []DeviceConfig `yaml:"devices"`
}
type DeviceConfig ¶
type DeviceConfig struct {
Address string `yaml:"address"`
Password string `yaml:"password"` // encode as base64
EncryptionKey string `yaml:"encryptionKey"`
Timeout time.Duration `yaml:"timeout"`
Info DeviceInfo `yaml:"info"`
}
func (*DeviceConfig) Clone ¶
func (dc *DeviceConfig) Clone() DeviceConfig
func (*DeviceConfig) EncodePassword ¶
func (nc *DeviceConfig) EncodePassword()
EncodePassword encodes and update the password
func (*DeviceConfig) GetPassword ¶
func (nc *DeviceConfig) GetPassword() string
GetPassword decodes and returns the password
type DeviceInfo ¶
type DeviceInfo struct {
Name string `yaml:"name"`
Model string `yaml:"model"`
MacAddress string `yaml:"macAddress"`
EsphomeVersion string `yaml:"esphomeVersion"`
CompilationTime string `yaml:"compilationTime"`
UsesPassword bool `yaml:"usesPassword"` // removed in ESPHome 2026.1.0
HasDeepSleep bool `yaml:"hasDeepSleep"`
FriendlyName string `yaml:"friendlyName,omitempty"`
Manufacturer string `yaml:"manufacturer,omitempty"`
ProjectName string `yaml:"projectName,omitempty"`
ProjectVersion string `yaml:"projectVersion,omitempty"`
SuggestedArea string `yaml:"suggestedArea,omitempty"`
BluetoothMacAddress string `yaml:"bluetoothMacAddress,omitempty"`
ApiEncryptionSupported bool `yaml:"apiEncryptionSupported,omitempty"`
StatusOn time.Time `yaml:"statusOn"`
}
func (*DeviceInfo) Clone ¶
func (di *DeviceInfo) Clone() DeviceInfo
Click to show internal directories.
Click to hide internal directories.