-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Wake and Sleep times for issue #437 and maybe #218 (and me) #632
Conversation
Added Wake and Sleep times. AL now transitions brightness from minimum at wake to max at sunrise and from max at sunset to minimum at sleep. Brightness is minimum from wake to sleep
Added Wake and Sleep times. AL now transitions brightness from minimum at wake to max at sunrise and from max at sunset to minimum at sleep. Brightness is minimum from wake to sleep
for more information, see https://pre-commit.ci
change -1 to k in calc_percent equation to account for exact noon/midnight edge cases
@backcountrymountains, thanks a lot! This seems to be a feature that many folks are interested in. I have tried fixing the merge conflicts but a lot of tests are failing, so I am not sure whether I did it correct. I will try to look at the implementation later. |
Sorry it wasn't ready for merging! It's really a hack and I didn't know how else to make it available for others that could accept it as "good enough." I have no idea what I'm doing; I'm not any kind of programmer and don't know any languages. I can try and see what I'd need to change to make it work for everyone. I think I'd ideally like to use HA input_datetime entites/helpers so that users can easily program what times changes start and end. That way users can use all of HAs templating functionality to make specific times for brightness/color changing like "make sunset 15 microseconds after the sun elevation goes below 2.194 degrees but only when the moon is waxing and not on a weekend or when Venus is in retrograde." Adaptive lighting is my number 1 integration and what I always tell people about when I blather about Home Assistant! |
@backcountrymountains would #699 work for you? |
In #699 you can set different with
with
|
@backcountrymountains thank you so much for this initial implementation. It showed that people are really wanted this feature. I hope you can try 1.19.0b1 to try out the new I'll close this PR because it's superseded by the other work. |
Added Wake and Sleep times. AL now transitions brightness from minimum at wake to max at sunrise and from max at sunset to minimum at sleep. Brightness is minimum from wake to sleep.
AL increases brightness starting at midnight but the sun doesn't rise until sunrise. This PR makes allows users to set a time for brightness to start increasing.
AL also transitions brightness all the way to midnight, long after the sun has set. This PR allows a user to set a time for AL to achieve minimum brightness while preserving a smooth transition instead of and abrupt change with
sleep_mode
I have no idea how to code or what I'm doing, but this seems to work on my system.
Also, I don't know how to do PR's or anything with github, really.
Sorry if this isn't done correctly.