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
|
|
@ -18,15 +18,13 @@ func init() {
|
|||
// NewHomeAssistantFromConfig creates a HomeAssistant meter from generic config
|
||||
func NewHomeAssistantFromConfig(other map[string]any) (api.Meter, error) {
|
||||
cc := struct {
|
||||
URI string
|
||||
Token_ string `mapstructure:"token"` // TODO deprecated
|
||||
Home_ string `mapstructure:"home"` // TODO deprecated
|
||||
Power string
|
||||
Energy string
|
||||
Currents []string
|
||||
Voltages []string
|
||||
Powers []string
|
||||
Soc string
|
||||
homeassistant.Config `mapstructure:",squash"`
|
||||
Power string
|
||||
Energy string
|
||||
Currents []string
|
||||
Voltages []string
|
||||
Powers []string
|
||||
Soc string
|
||||
|
||||
// pv
|
||||
pvMaxACPower `mapstructure:",squash"`
|
||||
|
|
@ -57,7 +55,7 @@ func NewHomeAssistantFromConfig(other map[string]any) (api.Meter, error) {
|
|||
|
||||
log := util.NewLogger("ha-meter")
|
||||
|
||||
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