Correct Shelly1 GEN1 static mode default power setting (#2558)
This commit is contained in:
parent
f3300c04b6
commit
8a4275ce61
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue