MyStrom: fix relay uri
This commit is contained in:
parent
c013dc53f8
commit
ffd5eb03a7
2 changed files with 3 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ func (c *MyStrom) Enable(enable bool) error {
|
|||
c.reportG = provider.Cached(c.Report, c.cache)
|
||||
|
||||
onoff := map[bool]int{false: 0, true: 1}
|
||||
return c.Request(fmt.Sprintf("relay/state=%d", onoff[enable]))
|
||||
return c.Request(fmt.Sprintf("relay?state=%d", onoff[enable]))
|
||||
}
|
||||
|
||||
// MaxCurrent implements the api.Charger interface
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mystrom
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/evcc-io/evcc/api"
|
||||
"github.com/evcc-io/evcc/util"
|
||||
|
|
@ -20,7 +21,7 @@ type Connection struct {
|
|||
|
||||
func NewConnection(uri string) *Connection {
|
||||
return &Connection{
|
||||
uri: uri,
|
||||
uri: util.DefaultScheme(strings.TrimSuffix(uri, "/"), "http"),
|
||||
Helper: request.NewHelper(util.NewLogger("mystrom")),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue