diff --git a/tariff/awattar.go b/tariff/awattar.go index c41800161..117a98504 100644 --- a/tariff/awattar.go +++ b/tariff/awattar.go @@ -34,7 +34,8 @@ func NewAwattarFromConfig(other map[string]interface{}) (api.Tariff, error) { Currency string Region string }{ - Region: "DE", + Currency: "EUR", + Region: "DE", } if err := util.DecodeOther(other, &cc); err != nil { diff --git a/tariff/fixed.go b/tariff/fixed.go index 2f8b98754..272736bf8 100644 --- a/tariff/fixed.go +++ b/tariff/fixed.go @@ -25,23 +25,21 @@ func init() { } func NewFixedFromConfig(other map[string]interface{}) (api.Tariff, error) { - var cc struct { + cc := struct { Currency string Price float64 Zones []struct { Price float64 Days, Hours string } + }{ + Currency: "EUR", } if err := util.DecodeOther(other, &cc); err != nil { return nil, err } - if cc.Currency == "" { - cc.Currency = "EUR" - } - t := &Fixed{ unit: cc.Currency, clock: clock.New(),