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,9 +245,11 @@ events:
fmt.Println("\tGradually turning on lights in the living room")
// Start the ticker to gradually turn on the living room lights
ticker.Reset(1200 * time.Millisecond)
if (livingRoom.State.Bri < brightness) {
livingRoom.Bri(brightness)
livingRoom.Ct(Temperature)
}
}
// Set new timer
_, sunset := getNextSunriseSunset()