Commit graph

7 commits

Author SHA1 Message Date
Bas Nijholt
d4d3d50ada
fix: replace deprecated get_astral_location with get_astral_observer (#1482)
* fix: replace deprecated get_astral_location with get_astral_observer (#1481)

HA 2026.7 deprecates homeassistant.helpers.sun.get_astral_location
(removal planned for 2027.7) in favor of get_astral_observer, causing a
deprecation warning in the HA logs.

- Switch SunEvents/SunLightSettings from astral.location.Location to
  astral.Observer, using the astral.sun module functions (which return
  UTC times by default, matching the previous local=False calls).
- Use get_astral_observer in switch.py, with a fallback for HA < 2026.7
  that constructs the Observer directly from the HA config.
- Update tests and the webapp simulator accordingly.

* ci: handle removal of requirements_test_all.txt in HA 2026.8 dev

HA core removed requirements_test_all.txt (home-assistant/core#171530),
which made test_dependencies.py crash with FileNotFoundError and broke
the dev pytest job and the Docker builds. Fall back to
requirements_all.txt, which carries the same per-integration
'# homeassistant.components.x' annotations. Also extend the
aiohasupervisor pin lookup in scripts/setup-dependencies accordingly.

* test: support modern template light config for HA 2026.6+

HA 2026.6 removed the legacy `light: platform: template` YAML format
(home-assistant/core#169615), so setup_lights found no template platform
on HA dev and every test using it failed with IndexError. Detect legacy
support at runtime (PLATFORM_SCHEMA presence) and fall back to the
modern `template:` config format. The group platform is set up before
the template integration in the modern path, because setting up
`template` also sets up the `light` domain, which would make a later
async_setup_component(hass, LIGHT_DOMAIN, ...) a no-op.
2026-07-01 23:00:35 -07:00
Bas Nijholt
8fb9493a40
Fix Shiny WebApp (#1127)
* Use requirements.txt.in

* Include webapp/color_and_brightness.py

* Fix Shiny WebApp

* Install shinylive in CI
2024-12-05 14:35:19 -08:00
Bas Nijholt
0723280a89
Fix sleep_mode + sleep_rgb_or_color_temp == "color_temp" in webapp (#740)
Thanks to @danielbrunt57 for reporting here
2023-08-11 00:00:16 +00:00
Bas Nijholt
db5f9d623c
Mention app more prominently and improve style (#725)
* Mention app more prominently

* Use dark-mode

* add setuptools

* no cyber

* no not run on PR

* Ruff fixes

* Add link

* remove unused deps
2023-08-08 17:34:35 -07:00
Bas Nijholt
f8e7880a96
Split up SunLightSettings and improve https://basnijholt.github.io/adaptive-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
2023-08-08 21:31:17 +00:00
Bas Nijholt
69355b8c3a
Small WebApp improvements (#716)
* Small WebApp improvements

* Add link
2023-08-07 00:20:58 +00:00
Bas Nijholt
943a6360c7
Add simple webapp to play with different parameters (#715)
* Add simple webapp to play with different parameters

* ignore
2023-08-06 16:42:56 -07:00