Shelly: enable gen3 devices (#13057)

This commit is contained in:
Markus Thierolf 2024-03-20 12:09:41 +01:00 • committed by GitHub
parent bdee2e5fa0
commit 8a30eb9639
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,8 +63,8 @@ func NewConnection(uri, user, password string, channel int) (*Connection, error)
conn.Client.Transport = transport.BasicAuth(user, password, conn.Client.Transport)
}
case 2:
// Shelly GEN 2 API
case 2, 3:
// Shelly GEN 2+ API
// https://shelly-api-docs.shelly.cloud/gen2/
conn.uri = fmt.Sprintf("%s/rpc", util.DefaultScheme(uri, "http"))
if user != "" {