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:
parent
d7a294f06e
commit
e5b9a014c5
29 changed files with 336 additions and 115 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue