Skip to content

Commit

Permalink
Split up SunLightSettings and improve https://basnijholt.github.io/ad…
Browse files Browse the repository at this point in the history
…aptive-lighting/ (#719)

* Split up SunLightSettings

* Renames

* factor out SunEvents

* more renames

* rewrite

* rewrite more

* simpler

* refactor

* refact

* raise

* refact

* rename

* move method

* clean

* Move to new module 'sun.py'

* make sun independent of HA

* rename

* Move to webapp/homeassistant_util_color.py

* Rework app

* Add link

* new plotting

* app changes

* fix tests

* test clean

* tz fixes

* fix

* use sed

* verbose

* fix tz

* fix

* tiem
  • Loading branch information
basnijholt authored Aug 8, 2023
1 parent 61d51cb commit f8e7880
Show file tree
Hide file tree
Showing 12 changed files with 1,745 additions and 625 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: Build the WebAssembly app
run: |
set -ex
cp custom_components/adaptive_lighting/color_and_brightness.py webapp/color_and_brightness.py
sed -i 's/homeassistant.util.color/homeassistant_util_color/g' "webapp/color_and_brightness.py"
shinylive export webapp site
- name: Setup Pages
Expand Down
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ignore = [
"tests/*.py" = ["ALL"]
".github/*py" = ["INP001"]
"webapp/*py" = ["ALL"]
"custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"]

[flake8-pytest-style]
fixture-parentheses = false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Notice the values of `brightness_mode_time_light` and `brightness_mode_time_dark
![image](https://github.com/basnijholt/adaptive-lighting/assets/6897215/e5fc5d27-3c37-4e3d-93d1-6e7cf4b48e7c)
![image](https://github.com/basnijholt/adaptive-lighting/assets/6897215/3dcbdc42-63c4-49df-8651-d2fae53dd08d)

> [*Code to make the plots*](https://github.com/basnijholt/adaptive-lighting/pull/699#issuecomment-1666232555)
> Check out the interactive webapp on https://basnijholt.github.io/adaptive-lighting/ to play with the parameters and see how the brightness changes!

## :eyes: See also

Expand Down
Loading

0 comments on commit f8e7880

Please sign in to comment.