Erik Montnemery
ecb3bf79f3
Revert "Add support for subentries to config entries" ( #133470 )
...
Revert "Add support for subentries to config entries (#117355 )"
This reverts commit ad15786115
.
2024-12-18 13:51:05 +01:00
epenet
0dbd5bffe6
Fix incorrect schema in config tests ( #133404 )
2024-12-17 11:26:51 +01:00
Erik Montnemery
ad15786115
Add support for subentries to config entries ( #117355 )
...
* Add support for subentries to config entries
* Improve error handling and test coverage
* Include subentry_id in subentry containers
* Auto-generate subentry_id and add optional unique_id
* Tweak
* Update tests
* Fix stale docstring
* Address review comments
* Typing tweaks
* Add methods to ConfigEntries to add and remove subentry
* Improve ConfigSubentryData typed dict
* Update test snapshots
* Adjust tests
* Fix unique_id logic
* Allow multiple subentries with None unique_id
* Add number of subentries to config entry JSON representation
* Add subentry translation support
* Allow integrations to implement multiple subentry flows
* Update translations schema
* Adjust exception text
* Change subentry flow init step to user
* Prevent creating a subentry with colliding unique_id
* Update tests
* Address review comments
* Remove duplicaetd unique_id collision check
* Remove change from the future
* Improve test coverage
* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Erik Montnemery
a30c942fa7
Don't use kitchen_sink integration in config entries tests ( #133012 )
2024-12-12 10:42:27 +01:00
epenet
0bc572787a
Add check for valid error code in translation checks in flows ( #128445 )
2024-10-16 19:03:24 +02:00
epenet
3ba3fbf4a5
Add tests/components/conftest.py to core files ( #128425 )
2024-10-15 10:34:54 +02:00
epenet
c87a2ca335
Add default reconfigure reason in update_reload_and_abort ( #127756 )
...
* Add default reconfigure reason in async_update_reload_and_abort
* Simplify
* Fix test
* Add sample usage
* Remove multi-line ternary
2024-10-07 09:02:58 +02:00
Erik Montnemery
7ec911c4df
Correct typing in rediscovery tests ( #127777 )
2024-10-07 08:42:04 +02:00
epenet
e705ca83b2
Use reconfigure helpers in config tests ( #127534 )
...
Use async_update_reload_and_abort in config test
2024-10-06 16:06:55 +02:00
Erik Montnemery
d82bff1bc2
Index config entry discovery_keys by discovery domain ( #126563 )
...
* Index config entry discovery_keys by discovery domain
* Add new signal
* Update tests
* Update homeassistant/config_entries.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fix imports
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery
b2982c18bb
Reinitialize zeroconf discovery flow on unignore ( #125753 )
...
* Reinitialize zeroconf discovery flow on unignore
* Adjust tests
* Improve comments
* Fix logic for updating discovery keys
* Add tests
* Use mock_config_flow helper in new config_entries test
* Add discovery_keys attribute to ConfigEntry
* Update zeroconf rediscovery
* Change type of ConfigEntry.discovery_keys
* Update tests
* Fix DiscoveryKey.from_json_dict and add tests
* Fix test
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
Alberto Montes
5d2f8319b1
Update string formatting to use f-string on tests ( #125986 )
...
* Update string formatting to use f-string on tests
* Update test_package.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update statement given feedback
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 10:32:38 +02:00
Robert Resch
ad50136dbd
Add created_at/modified_at to config entries ( #122456 )
2024-07-29 22:08:46 +02:00
Marc Mueller
2f0dd6f704
Import Generator from collections.abc (2) ( #120915 )
2024-07-01 11:58:49 +02:00
epenet
8bad421a04
Improve type hints in config tests ( #120346 )
2024-06-24 18:36:57 +02:00
epenet
c70cfbb535
Fix arguments-renamed pylint warning in tests ( #119473 )
2024-06-12 12:25:29 +02:00
epenet
c7e065c413
Move enable_custom_integrations fixture to decorator ( #118844 )
2024-06-05 09:20:08 +02:00
epenet
461ac1e0bc
Add ClientSessionGenerator type hints in tests ( #118377 )
2024-05-29 14:49:14 +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
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
Sid
00ec7f11f0
Enable Ruff rule PT007 ( #113764 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Marc Mueller
38adfbf1a3
Add empty line after module docstring [tests a-e] ( #112708 )
2024-03-08 08:50:25 -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
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
Erik Montnemery
6908497c3d
Add minor version to config entries ( #105479 )
2023-12-12 08:44:35 +01:00
Erik Montnemery
4536fb3541
Remove mock_entity_platform test helper ( #104073 )
2023-11-16 16:55:08 +01:00
Erik Montnemery
4498c2e8c4
Validate steps in Flowhandler ( #102152 )
...
* Validate steps in Flowhandler
* Move validation to FlowManager._async_handle_step
* Fix _raise_if_not_has_step
* Fix config_entries tests
* Fix tests
* Rename
* Add test
2023-10-19 13:34:10 +02:00
Erik Montnemery
b885dfa5a8
Add preview to sensor group config and option flows ( #83638 )
2023-08-22 10:29:16 +02:00
Robert Resch
b0f68f1ef3
Use @require_admin decorator ( #98061 )
...
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-14 15:07:20 +02:00
Erik Montnemery
9a3077d64a
Always setup demo platforms with device support from config entry ( #94586 )
...
* Always setup demo platforms with device support from config entry
* Adjust test fixutres
* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Marvin Wichmann
795ef075da
Restore original websocket commands for config entries ( #93707 )
...
Restore original websocket commands and add "config_entries/get_single"
2023-05-28 21:40:35 -04:00
epenet
dc14b83249
Add ability to unload demo integration ( #92515 )
...
* Add unload to demo integration
* Adjust config tests to use kitchen_sink
* Use async_unload_platforms
2023-05-24 09:38:29 +02:00
Erik Montnemery
b754f03eb1
Add WS command for getting a config entry ( #93387 )
...
* Add WS command for getting a config entry
* Update tests
2023-05-23 10:44:02 +02:00
Erik Montnemery
3931e11fd9
Try to load integration before starting option flow ( #90111 )
...
* Try to load integration before starting option flow
* Adjust tests
2023-03-22 20:10:10 +01:00
J. Nick Koston
e38836b6e1
Update async_matching_config_entries to use async_get_integrations ( #88527 )
...
* Update async_matching_config_entries to use async_get_integrations
* Update homeassistant/components/config/config_entries.py
* Update homeassistant/components/config/config_entries.py
2023-02-21 21:17:18 -05:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
9f688a564f
Add type hints to integration tests (part 4) ( #87848 )
2023-02-11 08:26:13 +01:00
epenet
807c69f621
Add type hints to integration tests (b-c) ( #87698 )
2023-02-08 18:08:43 +01:00
Franck Nijhof
24fdd588fd
Code styling tweaks to the tests - Part 1 ( #86192 )
2023-01-20 13:52:46 +01:00
Aarni Koskela
e4c73259f7
Configure autoflake for pre-commit ( #82414 )
2022-11-22 08:10:36 +01:00
Franck Nijhof
c4bbc439a5
Integrations v2.1: Differentiating hubs, devices and services ( #80524 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-19 12:41:43 +02:00
J. Nick Koston
016a59ac94
Add support for subscribing to config entry changes ( #77803 )
2022-09-04 22:57:43 -05:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74642 )
2022-07-07 19:57:36 +03:00
J. Nick Koston
adf0f62963
Add websocket api to fetch config entries ( #73570 )
...
* Add websocket api to fetch config entries
* add coverage for failure case
2022-06-21 20:09:22 +02:00