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>
This commit is contained in:
Markus 2026-06-18 16:37:04 +02:00 • committed by GitHub
parent d7a294f06e
commit e5b9a014c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 336 additions and 115 deletions

View file

@ -26,11 +26,9 @@ func init() {
// Constructor from YAML config
func NewHomeAssistantVehicleFromConfig(other map[string]any) (api.Vehicle, error) {
var cc struct {
embed `mapstructure:",squash"`
URI string
Token_ string `mapstructure:"token"` // TODO deprecated
Home_ string `mapstructure:"home"` // TODO deprecated
Sensors struct {
embed `mapstructure:",squash"`
homeassistant.Config `mapstructure:",squash"`
Sensors struct {
Soc string // required
Range string // optional
Status string // optional
@ -57,7 +55,7 @@ func NewHomeAssistantVehicleFromConfig(other map[string]any) (api.Vehicle, error
log := util.NewLogger("ha-vehicle")
conn, err := homeassistant.NewConnection(log, cc.URI, cc.Home_)
conn, err := cc.Config.NewConnection(log)
if err != nil {
return nil, err
}