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
|
|
@ -25,9 +25,9 @@ type HomeAssistant struct {
|
|||
// NewHomeAssistantFromConfig creates a new Home Assistant messenger
|
||||
func NewHomeAssistantFromConfig(other map[string]any) (api.Messenger, error) {
|
||||
var cc struct {
|
||||
URI string
|
||||
Notify string
|
||||
Data map[string]any
|
||||
homeassistant.Config `mapstructure:",squash"`
|
||||
Notify string
|
||||
Data map[string]any
|
||||
}
|
||||
|
||||
if err := util.DecodeOther(other, &cc); err != nil {
|
||||
|
|
@ -40,7 +40,7 @@ func NewHomeAssistantFromConfig(other map[string]any) (api.Messenger, error) {
|
|||
|
||||
log := util.NewLogger("homeassistant")
|
||||
|
||||
conn, err := homeassistant.NewConnection(log, cc.URI, "")
|
||||
conn, err := cc.Config.NewConnection(log)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue