Added debug prints to hopefully figure out why the lights do not turn on properly
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f5388125cf
commit
ae6e43da56
7
main.go
7
main.go
|
@ -250,6 +250,13 @@ events:
|
||||||
fmt.Println("\tGradually turning on lights in the living room")
|
fmt.Println("\tGradually turning on lights in the living room")
|
||||||
// Start the ticker to gradually turn on the living room lights
|
// Start the ticker to gradually turn on the living room lights
|
||||||
ticker.Reset(1200 * time.Millisecond)
|
ticker.Reset(1200 * time.Millisecond)
|
||||||
|
fmt.Println("DEBUG STUFG")
|
||||||
|
fmt.Println(livingRoom.IsOn())
|
||||||
|
fmt.Println(livingRoom.State.On)
|
||||||
|
fmt.Println(livingRoom.State.Bri)
|
||||||
|
fmt.Println(livingRoom.State.Ct)
|
||||||
|
fmt.Println(brightness)
|
||||||
|
|
||||||
if (!livingRoom.IsOn() || livingRoom.State.Bri < brightness) {
|
if (!livingRoom.IsOn() || livingRoom.State.Bri < brightness) {
|
||||||
fmt.Println("Setting brightness:", brightness)
|
fmt.Println("Setting brightness:", brightness)
|
||||||
livingRoom.Bri(brightness)
|
livingRoom.Bri(brightness)
|
||||||
|
|
Reference in New Issue
Block a user