types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

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