Skip to content

Commit

Permalink
tariff/octopus: fix handling of deprecated config flag "tariff"
Browse files Browse the repository at this point in the history
Fixes evcc-io#13786 - you saw nothing 🤫
  • Loading branch information
duckfullstop committed May 7, 2024
1 parent 81ba7dc commit 4f21851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tariff/octopus.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewOctopusFromConfig(other map[string]interface{}) (api.Tariff, error) {
if cc.Region == "" {
return nil, errors.New("missing region")
}
if cc.Tariff == "" {
if cc.Tariff != "" {
// deprecated - copy to correct slot and WARN
logger.WARN.Print("'tariff' is deprecated and will break in a future version - use 'productCode' instead")
cc.ProductCode = cc.Tariff
Expand Down

0 comments on commit 4f21851

Please sign in to comment.