Correct Shelly1 GEN1 static mode default power setting (#2558)

This commit is contained in:
Markus Thierolf 2022-02-11 22:12:21 +01:00 • committed by GitHub
parent f3300c04b6
commit 8a4275ce61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ func NewShelly(uri, user, password string, channel int, standbypower float64) (*
if resp.NumMeters == 0 {
// Shelly1 force static mode with fake power http://192.168.178.xxx/settings/power/0?power=standbypower+1
uri := fmt.Sprintf("%s/settings/power/%d?power=%d", c.uri, c.channel, int(math.Abs(c.standbypower)+1))
uri := fmt.Sprintf("%s/settings/power/%d?power=%d", c.uri, c.channel, int(math.Abs(c.standbypower)))
if err := c.GetJSON(uri, &resp); err != nil {
return c, err
}