Skip to content

Commit

Permalink
Dadapower: require sponsorship (BC)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Sep 1, 2024
1 parent 5ad1ec9 commit 3c359fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charger/dadapower.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/modbus"
"github.com/evcc-io/evcc/util/sponsor"
)

const (
Expand Down Expand Up @@ -57,6 +58,10 @@ func NewDadapower(uri string, id uint8) (*Dadapower, error) {
return nil, err
}

if !sponsor.IsAuthorized() {
return nil, api.ErrSponsorRequired
}

log := util.NewLogger("dadapower")
conn.Logger(log.TRACE)

Expand Down

2 comments on commit 3c359fc

@An-Wi
Copy link

@An-Wi An-Wi commented on 3c359fc Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gibt es einen bestimmten Grund dafür? (Doku sollte dahingehend noch angepasst werden)

@andig
Copy link
Member Author

@andig andig commented on 3c359fc Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.