* 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>
* add transition_timer test and debug
* syntax error
* test
* Update switch.py
* Revert "test"
This reverts commit b8009e0a1a.
* Update test_switch.py
* add `create_transition_events` to tests.
nearly done
* tests are done!
* pop is for dictionaries
* Update test_switch.py
* combine the tests
* pin markdown-code-runner
* Pin with '=='
* Update test_switch.py
* pin in the correct place 😅
* Update test_switch.py
* Use timer.is_running
* Update test_switch.py
* ensure timer is running in tests
* this passes the test
* Update test_switch.py
* Do not create new list when not needed
* Remove empty deps
* Remove CONF_ULID_MAX_LENGTH (which is not configurable)
* this shouldn't pass the test but it does.
---------
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
* Update switch.py
Continue to adapt color temperature down to the sleep temperature after sunset. Results in a gradually warming light during the night time rather than a fixed color temperature throughout the night time.
* Run pre-commit
* Merge branch 'master' into pr/87
* add config option bool `adapt_until_sleep` defaulting to `false`
---------
Co-authored-by: Bas Nijholt <bas@nijho.lt>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
Co-authored-by: Benjamin Auquite <halomastar@gmail.com>
* Update test_dependencies.py
pytest reversion todo in later commit
* increase verbosity for analysis
* "instance" was created in the basic features PR.
* Can't stand the deprecation warnings.
* add testing steps to workflow action in logs.
Help the next person running into this issue again.
* wording in new messages.
* Manifest keys should be sorted: domain, name, then alphabetical order
* return basnijholt's original settings.
replaced `-v` with `-qq` again in `pytest.yaml`,
returned `branches: [master]` in both yaml files.
* Forgot a comma
* Update version in manifest to 1.6.0
* @th3w1zard1 is a code owner!
* Update .gitignore
* Revert "Update .gitignore"
This reverts commit 172841d356.
* added #274
* attempt getSwitchFromLightId()
* Update switch.py
* changed from register_entity_service to hass.services.async_register
* Update switch.py
* Update switch.py
* Update switch.py
* Update switch.py
* Update switch.py
* Update switch.py
* Update services.yaml
* Update switch.py
* test
* test builds ready
* target selector may not be possible with current syntax
priority is backwards-compatibility as I know most people will smash that update button
* expanded light groups
* test builds ready
* add feature #104
* Update custom_components/adaptive_lighting/switch.py
Co-authored-by: Chris <firstof9@gmail.com>
* Might as well type both. No reason not to.
Co-authored-by: Chris <firstof9@gmail.com>
* Might as well type both. No reason not to.
Co-authored-by: Chris <firstof9@gmail.com>
* Reformatted debug messages.
Reimported ServiceCall as suggested
* Multiple switches allowed again in services.
Apparently this was possible before.
With this change, the `lights` argument must not be passed with multiple switches, or the integration has no way of knowing what the user wants to do. Integration did not make this check in prior versions.
Also reformatted the debug messages.
Removed `automerge.yaml` (my apologies)
* Reload config without restart.
You can now reload any changes to the yaml file without restarting your home assistant. Should show a 'reload' button in your integrations page or you can call the homeassistant reload integration service call.
See https://community.home-assistant.io/t/how-to-allow-custom-compontent-for-yaml-configuration-reloading/391190/4
* Use snake_case for function name 'parseServiceArgs'
* Slight rephrase
* Small style changes
* Rephrased debug messages.
Removed `integration_entities` as we rewrote the code from that function already in parse_service_args. Reference function now above parse_service_args.
* removed: `these_switches = data = None`
* Factor out _find_switch_with_lights
* Rename function and add log statement
* Remove pylint marker
* Handle multiple switches found
* Small changes
* Rename _parse_service_args to _get_switches_from_service_call
* Rephrase log messages
* Add type hint
---------
Co-authored-by: Chris <firstof9@gmail.com>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
* Switch attributes now show the config settings.
`sunset_time`, `sunrise_time`, `max_sunrise_time`, and `min_sunset_time` show 'null' when not overridden - TODO
* fixed basnijholt's requested issues
* Run pre-commit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 'configuration' attr holds list of config options
returned the `=` from basnijholt's review.
* Small style changes
* Add include_config_in_attributes to en.json
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
* Use Kelvin instead of Mired, default since core=2022.11
* Fix attributes
* Use ATTR_COLOR_TEMP_KELVIN in tests
* use kelvin in tests
* no duplicate
* Round to nearest 5