Commit Graph

341 Commits

Author SHA1 Message Date
Erik Montnemery f9cf7598da Fix missing checks in core config test (#119387) 2024-06-11 14:13:12 +02:00
epenet c896458fcf Fix namespace-import pylint warning in components (#119299) 2024-06-10 15:55:08 +02:00
epenet fbaba3753b Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
epenet 907297cd1a Improve type hints in config tests (#119055) 2024-06-07 11:40:03 +02:00
epenet c7e065c413 Move enable_custom_integrations fixture to decorator (#118844) 2024-06-05 09:20:08 +02:00
epenet 092cdcfe91 Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
epenet 461ac1e0bc Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
Marc Mueller dd22ee3dac Improve annotation styling (#118032) 2024-05-24 15:05:53 +02:00
Erik Montnemery 5c1f6aeb60 Use mock_config_flow helper in config tests (#117245) 2024-05-11 14:09:00 -04:00
Erik Montnemery 3bea124d84 Sort asserts in config config_entries tests (#117244) 2024-05-11 17:38:07 +02:00
J. Nick Koston 6cf1c5c1f2 Hold a lock to prevent concurrent setup of config entries (#116482) 2024-04-30 18:47:12 -05:00
epenet 48b1678075 Add test helper to remove device (#116234)
* Add test helper to remove device

* Rename

* Fix signature
2024-04-28 18:50:15 +02:00
Erik Montnemery 7cd0fe3c5f Don't reload other automations when saving an automation (#80254)
* Only reload modified automation

* Correct check for existing automation

* Add tests

* Remove the new service, improve ReloadServiceHelper

* Revert unneeded changes

* Update tests

* Address review comments

* Improve test coverage

* Address review comments

* Tweak reloader code + add a targetted test

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Explain the tests + add more variations

* Fix copy-paste mistake in test

* Rephrase explanation of expected test outcome

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-16 15:58:57 +02:00
epenet 24f83c5890 Use is in FlowResultType enum comparison in tests (#114917)
* Use is in FlowResultType enum comparison in tests

* Adjust auth

* Adjust systemmonitor

* Once more

* Add comment
2024-04-05 10:40:14 +02:00
G Johansson fc4d960d17 Add translation support to Config Entry errors (#106305)
* Config Entry error translation

* split key and placeholders

* Fix config entries tests

* translation optional

* Mods
2024-03-28 10:52:21 +01:00
Franck Nijhof c247534731 Default floor level to None (and allow unsetting it) (#114249) 2024-03-26 18:58:25 +01:00
Joost Lekkerkerker 6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller efc54971d3 Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
Sid 00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
J. Nick Koston c615b52840 Refactor integration startup time to show wall clock time (#113707)
* Refactor setup time tracking to exclude time waiting on other operations

We now exclude the import time and th time waiting on
base platforms to setup from the setup times

* tweak

* tweak

* tweak

* tweak

* adjust

* fixes

* fixes

* preen

* preen

* tweak

* tweak

* adjust

* tweak

* reduce

* do not count integrtion platforms against their parent integration

* handle legacy tts platforms

* stt as well

* one more wait

* use the same pattern in all the legacy

* fix tts and stt legacy

* fix

* fix

* reduce

* preen

* entity comp does not wait for platforms

* scene blocks as well

* fix test

* test fixes

* coverage

* coverage

* coverage

* fix test

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* strip

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* remove complexity

* Apply suggestions from code review

* no longer works that way

* fixes

* fixes

* fixes

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-18 21:45:34 -04:00
Franck Nijhof 541d4b78ac Add WebSocket support for handling labels on areas registry (#113755) 2024-03-18 22:17:13 +01:00
Franck Nijhof e20cc4f8b9 Add WebSocket support for assigning labels to entities (#113757) 2024-03-18 22:03:37 +01:00
Franck Nijhof 51b8ffc69d Add WebSocket support for handling labels on device registry (#113758) 2024-03-18 21:19:27 +01:00
Sid 6ee273a548 Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
Franck Nijhof 0e2775667d Add category registry (#110897)
* Add category registry

* Add entity registry support

* Update homeassistant/components/config/entity_registry.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use ulid instead

* Add tests for adding same name in different scopes

* Handle keyerror on update

* Lookup tweak

* Omit categories from entity registry snapshots

* Use base registry

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-15 13:25:16 +01:00
Franck Nijhof 436c83e8a7 Add theme color support to labels (#113404) 2024-03-15 13:22:06 +01:00
Franck Nijhof 221893c1d7 Add aliases support to floor registry WebSocket API (#113401) 2024-03-14 23:07:07 +01:00
Franck Nijhof 064f96f8fa Add floor support to areas WebSocket API (#113402) 2024-03-14 12:55:31 +01:00
Marc Mueller 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston 3f9dbd3e25 Fix config modules being imported in the event loop (#112462)
* Fix config modules being imported in the event loop

There was a late import in this integration because of the circular import.

The code has been rearranged to avoid the circular imports

* fixes

* fixes

* fix patching

* make eager

* remove unrelated change from this branch
2024-03-05 21:18:57 -05:00
G Johansson 9989a63cdf Add reconfigure step to config flow (#108794)
* Initial commit reconfigure

* test config config_entries

* Fix reconfigure

* test_config_entries

* review comment

* No reconfigure if reauth ongoing

* Fix tests

* Fix tests

* handle source creating flows

* combine

* No black

* Also check reconfigure in reauth flow

* Fix support

* Add entry id

* reset data entry flow

* Mods

* context data

* reset formatting

* Fix config flow platforms

* Fix tests

* Fix step message

* Handling reconfigure step

* Fix more tests

* Config entries tests

* entry_id always means reconfigure

* Mods

* Remove no longer valid exception

* Fixes

* reset silabs test

* dev reg

* resets

* assist pipeline

* Adjust config_entries

* Fix

* Fixes

* docstrings

* Review comment

* docstring
2024-03-01 12:29:35 +01:00
Erik Montnemery a0e558c457 Add generic classes BaseFlowHandler and BaseFlowManager (#111814)
* Add generic classes BaseFlowHandler and BaseFlowManager

* Migrate zwave_js

* Update tests

* Update tests

* Address review comments
2024-02-29 16:52:39 +01:00
Franck Nijhof e0a9dcd996 Add label registry (#110821) 2024-02-19 11:59:08 +01:00
Franck Nijhof 4570eed6f6 Add floor registry (#110741)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-17 21:21:15 +01:00
Franck Nijhof aa8d8402b4 Cleanups in entity registry tests (#110788)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-17 19:07:46 +01:00
Franck Nijhof 0fbadc274a Cleanups in device registry tests (#110786) 2024-02-17 14:06:53 +01:00
Franck Nijhof df3556f0d8 Cleanups in area registry tests (#110785)
* Cleanups in area registry tests

* Adjust typing
2024-02-17 13:20:33 +01:00
J. Nick Koston 50770ce436 Refactor config integration to use normal functions for setup (#110750)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-16 18:12:33 -06:00
J. Nick Koston 37897ee384 Move late import of config flows in loader to load time (#110688)
* Move late import of config flows in loader to load time

There does not seem to be any reason to import the
generated flows late. Import them at load time
with the rest of the generated files

* tests
2024-02-16 07:55:12 +01:00
Robert Resch 6fdad44941 Improve invalid error messages in the config flows (#108075) 2024-01-30 12:24:19 +01:00
Marc Mueller 030727b078 Remove deprecated event_loop fixtures in tests (#109048) 2024-01-29 14:24:58 +01:00
Erik Montnemery 9c727e5ea8 Add icon to areas (#108650) 2024-01-24 19:11:03 +01:00
J. Nick Koston 2eea658fd8 Convert getting and removing access tokens to normal functions (#108670) 2024-01-22 20:51:33 -10:00
Franck Nijhof cdf3c07488 Add icon to entity registry list for display (#108313) 2024-01-19 15:11:27 +01:00
Erik Montnemery 6908497c3d Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Jan Bouwhuis 861bb48ab6 Assign specific error code for HomeAssistantError on websocket_api connection exceptions (#104700)
Assign specific error code for HomeAssistantError
2023-11-29 13:07:52 +01:00
Aarni Koskela 706add4a57 Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Erik Montnemery 4536fb3541 Remove mock_entity_platform test helper (#104073) 2023-11-16 16:55:08 +01:00
Jan-Philipp Benecke 9ab1cb83d8 Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00