Skip to content
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

Continue to adapt color temperature down to the sleep temperature after sunset #87

Merged
merged 31 commits into from
Apr 3, 2023
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e4aa570
Update switch.py
igiannakas Feb 9, 2021
5bb978a
Merge remote-tracking branch 'origin/master' into patch-2
basnijholt Aug 29, 2022
d3b735c
Run pre-commit
basnijholt Aug 29, 2022
ba8f4ff
Merge branch 'master' into patch-2
basnijholt Aug 30, 2022
654ee5e
Merge branch 'master' into pr/87
th3w1zard1 Mar 25, 2023
d902479
Merge branch 'master' into patch-2
th3w1zard1 Mar 25, 2023
d14cf99
Merge branch 'master' into pr/87
th3w1zard1 Mar 25, 2023
464a4d8
Merge branch 'patch-2' of https://github.com/igiannakas/adaptive-ligh…
th3w1zard1 Mar 25, 2023
9758e9b
Merge branch 'master' into patch-2
th3w1zard1 Mar 26, 2023
19a7acf
Merge branch 'master' into pr/87
th3w1zard1 Mar 29, 2023
c27043e
add config option defaulting to false
th3w1zard1 Mar 29, 2023
31b2f23
Merge branch 'patch-2' of https://github.com/igiannakas/adaptive-ligh…
th3w1zard1 Mar 29, 2023
a6ddea3
rename bad choice of a config name.
th3w1zard1 Mar 29, 2023
d05d8e0
add config option bool `adapt_until_sleep`
th3w1zard1 Mar 30, 2023
a3121a3
Update README.md
th3w1zard1 Mar 30, 2023
ba237e3
Update strings.json
th3w1zard1 Mar 30, 2023
ce97100
Added graph to the README
th3w1zard1 Mar 30, 2023
61c731e
Fixed bad spacing in strings.json
th3w1zard1 Mar 30, 2023
1ac31a0
Merge branch 'master' into patch-2
th3w1zard1 Mar 30, 2023
e2b3fb6
replace tabs with spaces in strings.json
th3w1zard1 Mar 30, 2023
399ff64
merge
th3w1zard1 Mar 30, 2023
95b0b41
merge new readme
th3w1zard1 Mar 30, 2023
fe369c6
chore(docs): update TOC
th3w1zard1 Mar 30, 2023
8db1af6
force run tests
th3w1zard1 Apr 1, 2023
6a803e5
merge upstream/master
th3w1zard1 Apr 2, 2023
254bfe4
new docs format
th3w1zard1 Apr 2, 2023
73b3a6a
merge
th3w1zard1 Apr 3, 2023
368a6be
Merge branch 'patch-2' of https://github.com/igiannakas/adaptive-ligh…
th3w1zard1 Apr 3, 2023
fe3dc8f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 3, 2023
f353443
merge
th3w1zard1 Apr 3, 2023
3b2bc19
Merge branch 'patch-2' of https://github.com/igiannakas/adaptive-ligh…
th3w1zard1 Apr 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions custom_components/adaptive_lighting/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,9 @@ def calc_color_temp_kelvin(self, percent: float, is_sleep: bool) -> float:
if percent > 0:
delta = self.max_color_temp - self.min_color_temp
return (delta * percent) + self.min_color_temp
if percent < 0:
delta = abs(self.min_color_temp - self.sleep_color_temp)
return (delta * abs(1+percent)) + self.sleep_color_temp
return self.min_color_temp

def get_settings(
Expand Down