Commit graph

637 commits

Author SHA1 Message Date
Bas Nijholt
ccf18c3879
Bump to 1.8.0 (#508) 1.8.0 2023-04-02 19:17:35 -07:00
Benjamin Auquite
b081d79b86
Update services.yaml (#497)
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-04-02 18:57:11 -07:00
Bas Nijholt
9e5e9a49e5
Sync main branch to master (#507) 2023-04-02 18:56:56 -07:00
Bas Nijholt
8108bd0a4b
Use markdown-code-runner instead of packaged solution (#505)
* Use markdown-code-runner instead of packaged solution

* add debug
2023-04-02 18:56:36 -07:00
Bas Nijholt
cc8ce29a8a
Auto-generate the configuration options documentation (#498)
* Autogenerate the documentation and strings

* Line limit

* Split

* Happy pre-commit

* Split up workflows

* Generate table function

* raise

* Add gen script

* chore(docs): update TOC

* Add gen script

* path

* Run - name: Install Home Assistant

* chore(docs): update TOC

* add copyright

* Fix branch name

* Run on PRs

* dev

* remove steps

* use matrix

* Run script

* chore(docs): update TOC

* Try fixing CI

* fix

* test

* refactor

* chore(docs): update TOC

* fix

* update

* use v3

* rename

* Fix input

* fix pytest

* fix path

* paths

* Change to github.head_ref

* More backticks

* Add extra text

* chore(docs): update TOC

* backticks

* Update README.md

---------

Co-authored-by: basnijholt <basnijholt@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-01 23:43:20 -07:00
Benjamin Auquite
ec558e5616
Move include_config_in_attributes 2023-04-01 16:35:01 -07:00
Bas Nijholt
26c19525cd
Rewrite the README (#492)
* Rewrite the README

* More changes

* More

* Rewrites

* Test collapse

* test

* Fix

* backticks

* Rewrite options

* emoji headings

* chore(docs): update TOC

---------

Co-authored-by: basnijholt <basnijholt@users.noreply.github.com>
2023-03-30 20:58:29 +00:00
Bas Nijholt
2de4b7415b
Refactor find_switch_for_lights and more small refactors (#488)
* Refactor find_switch_for_lights

* Refactor

* style

* renames
2023-03-29 23:47:57 -05:00
Bas Nijholt
1ca3bf0f6a
Retroactive review changes for #443 (#485) 1.7.0
* Retroactive review changes for #443

* Move up __init__

* Add test for test_change_switch_settings_service

* Add docs

* Add test for defaults

* Remove unused function

* Add skip var

* move pylint marker

* Refactor validate

* Update README.md

---------

Co-authored-by: Benjamin Auquite <halomastar@gmail.com>
2023-03-27 20:56:54 -05:00
Benjamin Auquite
c05e0cc244 Change attributes in AdaptiveSwitch via service call (#443) 2023-03-27 09:05:24 -07:00
Bas Nijholt
0127496441
Add example of how to pass command line args (#483) 2023-03-27 05:47:50 +00:00
Bas Nijholt
eb43e1755e
Use ENTRYPOINT and CMD (#482) 2023-03-27 05:07:07 +00:00
Bas Nijholt
85461ea856
Always color the logs and print coverage report (#481) 2023-03-27 04:37:21 +00:00
Bas Nijholt
491aca696c
Add linux/arm64 to build platform of Docker image (#476)
* Add linux/arm64 to build platform of Docker image

* Fix url
2023-03-27 03:00:12 +00:00
Bas Nijholt
aa282c83b2
Fix Markdown URL (#479) 2023-03-26 19:50:40 -07:00
Bas Nijholt
1fb364949e
Fix name of Docker image (#478) 2023-03-27 02:39:57 +00:00
Bas Nijholt
f408f330c1
Disable Docker image builds on ARM for now (#475) 2023-03-26 19:14:19 -07:00
Bas Nijholt
8b3a9d6755
Try installing extra deps such that bcrypt and cryptography can be installed in arm/v7 (#474) 2023-03-27 01:50:49 +00:00
Bas Nijholt
a523cccb04
Add command to print pytest with colors in Docker (#473) 2023-03-27 01:46:36 +00:00
Bas Nijholt
87af937f41
Set clone depth=1 to speedup the cloning of home-assistant/core (#472) 2023-03-27 01:38:20 +00:00
Bas Nijholt
36154ca606
Format the Markdown table in README.md (#471) 2023-03-27 01:21:00 +00:00
Bas Nijholt
1b08e8e6ba
Add testing Dockerfile (#470)
* Add testing Dockerfile

* Add comments

* Format table

* Add tests/README.md

* Rephrase

* add note in dockerfile
2023-03-27 01:18:18 +00:00
Benjamin Auquite
7486110e3e
manually edited files for new commit. (#468)
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-03-26 15:16:00 -07:00
Benjamin Auquite
06dcdbb4a4
Fix the broken tests (#467)
* 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.
2023-03-26 15:04:13 -07:00
allcontributors[bot]
66e65e2fe7
docs: add raman325 as a contributor for code (#466)
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-03-25 20:41:56 -07:00
allcontributors[bot]
97e2e27a9b
docs: add firstof9 as a contributor for code (#465)
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-03-25 20:28:22 -07:00
Benjamin Auquite
08ff04141e
Feature requests: Switch now optional for service calls | New default icons | Reload .yaml w/o restart | adapt_delay ms (#459) 1.6.0
* 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>
2023-03-25 20:22:05 -07:00
allcontributors[bot]
5552f5ec89
docs: add skycarl as a contributor for doc (#464) 1.5.0
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-03-25 19:12:47 -07: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
allcontributors[bot]
8c630c995a
docs: add th3w1zard1 as a contributor for code (#463)
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-03-25 12:46:10 -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
Bas Nijholt
393885a019
Do not test on Python 3.9, which Home Assistant no longer supports (#429) 2023-02-12 14:40:38 -08:00
Bas Nijholt
7fefa7de96
Update pre-commit filters (#432) 2023-02-12 14:37:40 -08:00
allcontributors[bot]
c3f26a3685
docs: add brebtatv as a contributor for translation (#431)
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-02-12 14:34:42 -08:00
Tomáš Valigura
738e7957c6
Add files via upload (#422)
Please add a Czech translation. Translated with love in collaboration with Jitka Kravcová.

Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-02-12 14:33:21 -08:00
allcontributors[bot]
53455f15a7
docs: add deviantintegral as a contributor for doc (#428)
* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-02-12 14:28:56 -08:00
Andrew Berry
6482fc54c2
Add troubleshooting steps for lights (#427)
* Fix skipping heading level

* Add troubleshooting for when lights misbehave

* Rephrase Zigbee groups troubleshooting section

Co-authored-by: Andrew Berry <andrew@furrypaws.ca>

---------

Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2023-02-12 14:28:37 -08:00
Bas Nijholt
7ee7dfe570
Rename ci.yaml to pytest.yaml 2023-01-12 12:42:33 -08:00
Bas Nijholt
ce4503c9c6
Also trigger manual control when using "color_temp" in mired format (#402) 1.4.1 2022-12-11 17:23:08 -08:00
Bas Nijholt
dc8fa60e75 Bump to 1.4.0 2022-12-11 16:56:14 -08:00
Bas Nijholt
1ef55ca180
Use Kelvin instead of Mired, default since core=2022.11 (#375) 1.4.0
* 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
2022-12-11 16:54:57 -08:00
allcontributors[bot]
4ef577ff7c
docs: add ngommers as a contributor for translation (#401)
* docs: update README.md

* docs: update .all-contributorsrc

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-11 09:35:55 -08:00
ngommers
8ed8531610
Create nl.json (#399)
add dutch language
2022-12-11 09:35:27 -08:00
allcontributors[bot]
185b4041bf
docs: add talllguy as a contributor for doc (#397)
* docs: update README.md

* docs: update .all-contributorsrc

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-08 10:48:44 -08:00
Bas Nijholt
3c463219e0
Merge pull request #396 from talllguy/service-lights-optional
Updated optional status for lights in service
2022-12-08 10:48:14 -08:00
Elliott Plack
b910b565d4
Updated optional status for lights in service
While implementing `adaptive_lighting.**apply**` in automations, I've noticed that listing the lights isn't required. For instance, if I have an adaptive lighting entity called `adaptive_lighting.office`, I can condition a motion sensor trigger with the following action successfully:

    service: adaptive_lighting.apply
    data:
      entity_id: switch.adaptive_lighting_office
      turn_on_lights: true
2022-12-08 09:22:14 -05:00
Bas Nijholt
5c4ce3cae6
bump to version 1.3.0 2022-12-07 12:46:28 -08:00
Bas Nijholt
2029319997
Merge pull request #384 from Mark-Niemeyer/send_split_delay 1.3.0
add a delay between sending commands using separate_turn_on_commands
2022-11-27 12:14:09 -08:00
Mark Niemeyer
97bb2cf3de use send_split_delay also when no transition is used 2022-11-27 20:37:28 +01:00
Mark Niemeyer
bf82beab82 add send_split_delay to README 2022-11-27 20:37:28 +01:00