Prevent the lights from dimming when they get turned on early
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
f61c919734
commit
e9e26b9623
6
main.go
6
main.go
|
@ -245,8 +245,10 @@ 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)
|
||||||
livingRoom.Bri(brightness)
|
if (livingRoom.State.Bri < brightness) {
|
||||||
livingRoom.Ct(Temperature)
|
livingRoom.Bri(brightness)
|
||||||
|
livingRoom.Ct(Temperature)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new timer
|
// Set new timer
|
||||||
|
|
Reference in New Issue
Block a user