diff --git a/charger/fritzdect.go b/charger/fritzdect.go index e47b3cc85..8b80de1df 100644 --- a/charger/fritzdect.go +++ b/charger/fritzdect.go @@ -25,11 +25,8 @@ func init() { // NewFritzDECTFromConfig creates a fritzdect charger from generic config func NewFritzDECTFromConfig(other map[string]interface{}) (api.Charger, error) { cc := struct { - URI string - AIN string - User string - Password string - StandbyPower float64 + fritzdect.Settings `mapstructure:",squash"` + StandbyPower float64 }{} if err := util.DecodeOther(other, &cc); err != nil { diff --git a/meter/fritzdect.go b/meter/fritzdect.go index 6ec63d528..d84855f00 100644 --- a/meter/fritzdect.go +++ b/meter/fritzdect.go @@ -15,7 +15,7 @@ func init() { // NewFritzDECTFromConfig creates a fritzdect meter from generic config func NewFritzDECTFromConfig(other map[string]interface{}) (api.Meter, error) { - cc := &fritzdect.Settings{} + var cc fritzdect.Settings if err := util.DecodeOther(other, &cc); err != nil { return nil, err }