Possible fix for lights not turning on
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
12033aab60
commit
f5388125cf
4
main.go
4
main.go
|
@ -250,7 +250,7 @@ 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)
|
||||||
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)
|
||||||
livingRoom.Ct(Temperature)
|
livingRoom.Ct(Temperature)
|
||||||
|
@ -263,7 +263,7 @@ events:
|
||||||
|
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
brightness++
|
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)
|
||||||
livingRoom.Ct(Temperature)
|
livingRoom.Ct(Temperature)
|
||||||
|
|
Reference in New Issue
Block a user