evcc-io/util/homeassistant/config.go
Markus e5b9a014c5
Home Assistant: Enable insecure option for self-signed certificates in oauth2 flow (#30648)
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: Michael Geers <michael@geers.tv>
2026-06-18 16:37:04 +02:00

17 lines
617 B
Go

package homeassistant
import "github.com/evcc-io/evcc/util"
// Config holds the common Home Assistant instance connection parameters.
// It is embedded into device configs via mapstructure squash.
type Config struct {
URI string
Token_ string `mapstructure:"token"` // TODO deprecated
Home_ string `mapstructure:"home"` // TODO deprecated
Insecure bool // optional - allow self-signed certificates
}
// NewConnection creates a Home Assistant connection from the config
func (c Config) NewConnection(log *util.Logger) (*Connection, error) {
return NewConnection(log, c.URI, c.Home_, c.Insecure)
}