Commit graph

52 commits

Author SHA1 Message Date
github-actions[bot]
142cd7b214 Update README.md, strings.json, and services.yaml 2025-01-01 20:33:03 +00:00
Bas Nijholt
68feb3d931
Make instantaneous light.turn_on adaptation configurable with intercept (#750)
* Make intercept configurable

* Update README.md, strings.json, and services.yaml

* import

* skip

* split

* do not pass config_entry

* add to conf

* Update README.md, strings.json, and services.yaml

* spacing

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-15 12:23:56 -07:00
Bas Nijholt
5b7ee44629
Fix length of descriptions in UI (config flow) (#732)
* Fix length of strings in UI

* Update README.md, strings.json, and services.yaml

* fix

* add desc

* Update README.md, strings.json, and services.yaml

* mention webapp

* Add desc

* link

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-10 00:17:25 +00:00
Bas Nijholt
d44cb66148
Add adapt_only_on_bare_turn_on which instantly triggers manual_control when turning on with brightness or color (#709) 2023-08-05 20:56:32 -07:00
Bas Nijholt
72419cb60f
Add a min_sunrise_time and max_sunset_time (#707) 2023-08-05 22:08:45 +00:00
Bas Nijholt
a1cec19351
feat: add different brightness ramping mechanisms (#699)
* feat: add different brightness ramping mechanisms

* Rephrase

* Fix curves

* update images

* link to other graphs

* update images
2023-08-05 20:14:21 +00:00
Bas Nijholt
9a7cff9d6a
feat: change the order of options in config flow (#700)
* Change the order of options in config flow

* Update README.md, strings.json, and services.yaml

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-04 21:45:12 +00:00
Bas Nijholt
1ef7ed507e
Implement call intercept for multiple lights (#679)
* Implement call intercept for multiple lights

* remove comment

* skip if no eids

* add comment

* fix type

* Fix skipped

* indentation

* Add logging and fix error

* Fix for HA ≤2023.04

* simplify

* remove unused ignores

* Debug mode

* Add test

* Make test failing

* rename switch

* rename lights

* Fix tests

* Rename lights in tests

* Remove unused dependencies

* Improve tests

* More tests

* Remove the DEBUG_MODE

* Add doc-string

* Extra test

* assert

* extra test

* Comments

* fix

* fix

* expand light groups

* more logging

* sort

* Revert is_proactively_adapting checks
This reverts commit 39fd8f2be0.

* simplify the mapping

* Revert "Revert is_proactively_adapting checks"

This reverts commit 18803e8e50.

* test

* no light groups

* do not expand

* Do not expand_light_groups in intercept

* more logging

* Fix

* add comment

* Add multi_light_intercept config option

* Update README.md, strings.json, and services.yaml

* add light group

* fix platform

* add simple test

* turn off again

* Test without take over control

* improve test and fix it in one way

* Fixes

* add cleanup fixture

* format

* Update test_switch.py

* add __str__

* remove unneeded call

* simplify service_data construction

* Generalize is_our_context

* Fix multi_light_intercept: false

* add comments

* add docs

* Update README.md, strings.json, and services.yaml

* Add feature line

* move function

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-03 17:47:09 -07:00
Bas Nijholt
89c90adde0
Only start adapting on light.turn_on when detect_non_ha_changes: false to prevent unwanted light turn ons (#663)
* Fixes in maybe_cancel_adjusting to possibly fix accidental turn on

* simplify logic in maybe_cancel_adjusting

* Add logging statements

* only control if turn_on called

* more logs

* add TODO

* Add _state_event_is_from_our_turn_on

* Ignore off->on state switches that are not accociated with light.turn_on

* improve logging

* rename

* Update docs

* Update README.md, strings.json, and services.yaml

* Add caution message to README

* Change order of emojis

* Update README.md, strings.json, and services.yaml

* Check that platform is not None

* log the call

* fix args

* Do not re-add already added configs

* Do not re-add already added configs

* Use async_remove

* remove unused code

* [pre-commit.ci] pre-commit autoupdate (#627)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.279 → v0.0.280](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.279...v0.0.280)
- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>

* Extra logging statement

* Add to README

* log context_id

* return right indent

* move comment

* Skip on self.manager.is_proactively_adapting

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-28 15:17:17 -07:00
Bas Nijholt
e9297d562f
Cleanup after add_to_platform_abort is called, try-except intercept, update strings.json, fixes #658 (#659)
* 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>
2023-07-26 12:52:03 -07:00
pre-commit-ci[bot]
d16a9a5751
[pre-commit.ci] pre-commit autoupdate (#620)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.6.0 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.6.0...v3.7.0)

* Update README.md, strings.json, and services.yaml

---------

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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-02 15:32:44 -07:00
Mario Guggenberger
72e140e293
feat: skip redundant adaptation commands (#615)
* feat: skip redundant adaptation commands

* update README

* style

* Remove "experimental"

---------

Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
2023-07-02 15:26:07 -07:00
Bas Nijholt
b730c7cc90
Add scripts to auto update en.json, strings.json and services.yaml (#520)
* Add scripts to auto update strings.json and services.yaml

* Run services

* simplify

* Run strings

* rerun

* revert

* allow unicode

* Add CODEOWNERS

* Update CODEOWNERS

* set CONF_USE_DEFAULTS docs

* add field_name

* Auto run scripts

* Update desc

* Update README.md, strings.json, and services.yaml

* double quotes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md, strings.json, and services.yaml

* Add newline

* sync changes between en.json and strings.json

* Update README.md, strings.json, and services.yaml

* double quotes

* fix

* Update README.md, strings.json, and services.yaml

* Add comments

* Remove comments

* shorter

* Update README.md, strings.json, and services.yaml

* Rephrase

* Update README.md, strings.json, and services.yaml

* remove key from desc

---------

Co-authored-by: Benjamin Auquite <halomastar@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-03 14:59:14 -07:00
igiannakas
9caf3048f1
Continue to adapt color temperature down to the sleep temperature after sunset (#87)
* 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>
2023-04-03 07:27:07 +00:00
Bas Nijholt
ea2a6b0173
Add auto_reset_manual_control with async timer (#487)
* Add auto_reset_manual_control with async timer

* Add failing test

* Debugging

* Refactor find_switch_for_lights

* Revert changes in is_manually_controlled

* style

* Fix test_manual_control

* add types

* fixes

* dict

* make all tests pass

* text

* Rework find_switch_for_lights

* Style

* Better check

* revert, do in other test!

* No need to log when raising

* Add type hint

* Suggestion https://github.com/basnijholt/adaptive-lighting/pull/488/files#r1152408541 by @th3w1zard1

* Small fixes

* document new config everywhere (#496)

* chore(docs): update TOC

* undo change

* fi

* Update README.md

* Update README.md

* chore(docs): update TOC

* Update README.md

* Use markdown-code-runner

* Remove

* Use markdown-code-runner instead of packaged solution

* fix comment

* Only commit when needed

---------

Co-authored-by: Benjamin Auquite <halomastar@gmail.com>
Co-authored-by: basnijholt <basnijholt@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-03 02:22:23 +00:00
Skyler Carlson
c8ab1df741
Fix sunrise vs sunset typo (#458)
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-03-25 19:11:51 -07:00
Benjamin Auquite
231e7c197d
Show config options on the switch as attributes with include_config_in_attributes option (#445)
* 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>
2023-03-25 12:43:51 -07:00
Mark Niemeyer
ff6494240d add a delay between sending of commands when using separate_turn_on_commands 2022-11-27 20:37:28 +01:00
Bas Nijholt
fee8654e9f Fix typos in en.json and strings.json 2022-11-08 16:47:52 -08:00
Sören Beye
d0010740ca Add max_sunrise_time and min_sunset_time overrides 2022-11-08 17:37:57 +01:00
danaues
14019695a4 add error logging and display error to user 2022-10-29 23:45:29 +00:00
Bas Nijholt
9ed588816c Fix translations 2022-08-31 23:18:09 -07:00
Bas Nijholt
f500a3758e Update to translations and cleanup 2022-08-31 23:18:09 -07:00
Bas Nijholt
d3dce3166e Add strings and options 2022-08-31 23:18:09 -07:00
Bas Nijholt
dd141d2335
Merge pull request #239 from MangoScango/delay
Avoid flickering on light turn on with a configurable delay
2022-08-29 09:29:51 -07:00
Bas Nijholt
5aee7ae1d5 Fix hassfest error 2022-08-29 08:31:05 -07:00
MangoScango
d56852a197 Update Strings 2021-12-24 12:46:02 -05:00
Avi Miller
fa10d95305
Make the transition time to/from sleep mode configurable
Signed-off-by: Avi Miller <me@dje.li>
2021-09-16 14:15:36 +10:00
Bas Nijholt
8c39662318 add separate_turn_on_commands option for MQTT lights
Closes https://github.com/basnijholt/adaptive-lighting/issues/29
2020-10-27 20:39:05 +01:00
Bas Nijholt
4de7e8d1e0 fix issue with initial state 2020-10-22 11:15:38 +02:00
Bas Nijholt
d67479d017 sync 2020-10-14 16:00:51 +02:00
Bas Nijholt
d1714d800a fix strings.json 2020-10-11 12:41:30 +02:00
Bas Nijholt
313c1addf4 track state_changed 2020-10-05 23:41:57 +02:00
Bas Nijholt
c245298512 sync PR 2020-10-04 23:15:12 +02:00
Bas Nijholt
168484462a add detect_non_ha_changes option 2020-10-04 15:09:58 +02:00
Bas Nijholt
3eb593ec6d add take_over_control feat 2020-10-03 14:55:02 +02:00
Bas Nijholt
303e2fe27a add sleep_mode switch and deprecate disable_state/entity 2020-10-02 19:47:06 +02:00
Bas Nijholt
8d4e0d12c1 synx 2020-09-30 21:14:23 +02:00
Bas Nijholt
d57ef3f2e4 sync PR 2020-09-30 12:54:02 +02:00
Bas Nijholt
efcc268186 comments and strings 2020-09-30 10:29:47 +02:00
Bas Nijholt
f2fcd1aab9 better strings 2020-09-30 00:52:26 +02:00
Bas Nijholt
eda8c971f3 rename again 2020-09-29 23:11:52 +02:00
Bas Nijholt
53bf68748a rename to adapt_brightness, adapt_color_temp, and adapt_rgb_color 2020-09-29 23:09:54 +02:00
Bas Nijholt
5167dc6565 fix toggle bug 2020-09-28 21:08:12 +02:00
Bas Nijholt
0b1ff117d4 fixup 2020-09-28 16:50:15 +02:00
Bas Nijholt
869ff917e0 rename disable_color -> disable_color_adjust 2020-09-27 01:18:39 +02:00
Bas Nijholt
db63c5acef fix strings 2020-09-26 18:53:00 +02:00
Bas Nijholt
2c0ab9d929 do not show options if managed via YAML 2020-09-24 23:28:03 +02:00
Bas Nijholt
2b0eaff884 validate options 2020-09-23 12:17:51 +02:00
Bas Nijholt
f778f45590 remove backticks from strings.json 2020-09-20 18:38:53 +02:00