Prevent the lights from dimming when they get turned on early
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dreaded_X 2022-02-06 23:49:15 +01:00
parent f61c919734
commit e9e26b9623
Signed by: Dreaded_X
GPG Key ID: 76BDEC4E165D8AD9

View File

@ -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