* Cleanup after add_to_platform_abort is called, fixes#658
* Add note
* try-catch because of priv
* Catch all exceptions
* Bump to 1.17.3 in manifest.json
* assert that hass is not None
* Rename _light_event_action -> _light_state_event_action
* update .github/update-strings.py
* Update README.md, strings.json, and services.yaml
* update name
* Fixes
* Update README.md, strings.json, and services.yaml
* Add name
* Do not add name
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rename TurnOnOffListener to AdaptiveLightingManager
* Bump Python version
* Refactor and unify methods that are called once
* Simplify adaptation_utils.py
* Improve readability in adaptation_utils.py
* More renames
* Simplify
* More renames and simplifications
* fix test
* simplify _supported_features
* rename
* walrus
* drop old astral support
* Only support HA ≥2021.06
* Require 2016.06
* Try 2023.1
* even more old versions
* test
* more versions
* verify that only ≥2022.11 works
* named args
* setdefault
* no astral v1
* var
* simplify
* no need to pass adapt_brightness and adapt_color
* Add comment
* Fix multiple switches controlling one light
* WIP
* Keep length in AdaptationData
* Do not proceed if there is nothing to do
* Simplify
* Set tasks correctly
* log more
* WIP
* realize that intercept and double switch not possible
* Remove which from find_switch_for_lights
* Rephrase
* Check which one to cancel
* length -> max_length
* Implement test_two_switches_for_single_light
* Clean up
* Simplify is_color_brightness_or_both
* Improve test
* no wait
* logging
* just block
* make test such that it fails on main
* build: dev container
Add a VS Code Dev Container from the blueprint at bceaae212f
* build: dev container test setup
Add support for unit testing in the dev container environment with debugging and code coverage.
* ci: adjust to dev container test restructuring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ci: fix coverage collection
* build: add dummy light to HA config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* build: update dev container to Python 3.11 (for HA 2023.6)
* Add VS Code tasks
* Use pre-commit hooks for linting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Unpin HA version
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
* fix: 2023.6.0 compatibility
* ci: test with Python 3.11 against 2023.6.0b4
* Set 2023.06.0
* Bump to 2023.06.1
---------
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
* feat: optional brightness prioritization
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove config flag and change default split order
* Fix test
* Fix edge case
* Add tests
* Backwards compatiblity
* Fix another edge case
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update test_switch.py
* Update test_switch.py
* test is now done.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix the test only.
test is backwards compatible with the old method.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix _supported_to_attributes
everything works now.
* pre-commit fixes
cannot fix the `function too complex` problem.
* ignore test_switch.py in `pre-commit-config.yaml`
* Add ignore C901 to test_supported_features
* remove commented out code
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
* Test for multiple Home Assistant versions
* Install ulid-transform
* remove unnecessary unsafe `async_set` from test
* Skip test_state_change_handlers in <2023.4
* Revert "Skip test_state_change_handlers in <2023.4"
This reverts commit 8d01b6ec4e.
---------
Co-authored-by: Benjamin Auquite <halomastar@gmail.com>