Skip to content

Commit

Permalink
Daheimladen: charging station is enabled only when in 'Charging' state (
Browse files Browse the repository at this point in the history
#2858)

Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
  • Loading branch information
utsavanand2 committed Apr 3, 2022
1 parent 3f57f44 commit 07676f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charger/daheimladen.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func NewDaheimLaden(token string, stationID string) (*DaheimLaden, error) {
func (c *DaheimLaden) Enabled() (bool, error) {
var res daheimladen.GetLatestStatus
err := c.GetJSON(fmt.Sprintf("%s/cs/%s/status", daheimladen.BASE_URL, c.stationID), &res)
return res.Status == string(daheimladen.CHARGING) || res.Status == string(daheimladen.PREPARING), err
return res.Status == string(daheimladen.CHARGING), err
}

// Enable implements the api.Charger interface
Expand Down

0 comments on commit 07676f7

Please sign in to comment.