Shelly: set gen2 default scheme to http (#1696)

This commit is contained in:
Markus Thierolf 2021-10-03 18:21:54 +02:00 • committed by GitHub
parent 8690f5b691
commit 13ddd6505e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ func NewShelly(uri, user, password string, channel int, standbypower float64) (*
case 2:
// Shelly GEN 2 API
// https://shelly-api-docs.shelly.cloud/gen2/
c.uri = fmt.Sprintf("%s/rpc", util.DefaultScheme(uri, "https"))
c.uri = fmt.Sprintf("%s/rpc", util.DefaultScheme(uri, "http"))
if user != "" {
c.Client.Transport = digest.NewTransport(user, password, c.Client.Transport)
}