nettoyage
This commit is contained in:
parent
61c15fae6b
commit
b58279176c
36
cmd/main.go
36
cmd/main.go
@ -1,36 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.lehouerou.net/laurent/arlo-go"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := arlo.NewArlo()
|
||||
err := a.Login(context.Background(), "hass@lehouerou.net", "TiPXMVLUeZfUg6RrmwzK")
|
||||
if err != nil {
|
||||
log.Errorf("login: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
for _, device := range a.Cameras {
|
||||
log.Infof("%s", device.DeviceName)
|
||||
}
|
||||
|
||||
for _, b := range a.Basestations {
|
||||
_, err := b.GetModes()
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
log.Info("ok")
|
||||
err = b.DeleteMode("mode5")
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
log.Info("ok")
|
||||
}
|
||||
select {}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user