epenet
a51cc75f03
Add type hints to core tests (part 2) ( #88492 )
2023-02-21 09:27:13 +01:00
Paulus Schoutsen
3a32d2bdcb
Add background tasks to config entries ( #88335 )
...
* Use a set for config entries task tracking
* Allow adding background tasks to config entries
* Add tests for config entry add tasks
* Update docstrings on core create task
* Migrate roon and august
* Use in more places
* Guard for None
2023-02-17 13:50:05 -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
Paulus Schoutsen
d54f59478f
Keep task references while running ( #87970 )
...
* Keep task references while running
* Update pilight tests pointing at correct logger call
* Fix graphite tests
* Fix profiler tests
* More graphite test fixes
* Remove extra sleep
* Fix tests
* Shutdown background tasks as part of stage 1
* Remove unnecessary sleep in test
* Remove unused method on mock hass
* Skip on cancelled too
* Remove background tasks
* Test trigger variables without actually sleeping
* Fix graphite
* One more graphite grrrrrrr
2023-02-13 23:16:59 -05:00
Franck Nijhof
80bf632e2d
Clean up unnecessary registry mocks from helpers ( #87734 )
2023-02-08 20:15:29 -05:00
epenet
c98b4e3204
Add typing to tests with single hass argument (2) ( #87675 )
...
* Add typing to tests with single hass argument (2)
* a few more
2023-02-08 08:51:43 +01:00
Franck Nijhof
5e81d28116
Update black to 23.1.0 ( #87188 )
2023-02-02 18:35:24 +01:00
Franck Nijhof
bfbf9b9751
Adjusts imports in tests to match our relative import rules ( #86788 )
2023-01-27 12:51:58 +01:00
Franck Nijhof
24fdd588fd
Code styling tweaks to the tests - Part 1 ( #86192 )
2023-01-20 13:52:46 +01:00
Erik Montnemery
f17a829bd8
Only wait for import flows to initialize at setup ( #86106 )
...
* Only wait for import flows to initialize at setup
* Update hassio tests
* Update hassio tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-18 10:44:18 +01:00
Erik Montnemery
3cd6bd87a7
Remove config entry specifics from FlowManager ( #85565 )
2023-01-17 15:26:17 +01:00
J. Nick Koston
4296f227cf
Fix thundering heard in setup_again when there are many integrations ( #84670 )
2022-12-27 15:59:42 -10:00
Franck Nijhof
c715035016
Add support for raising ConfigEntryError ( #82689 )
2022-11-25 11:33:03 +01:00
epenet
4c38a5d773
Add OptionsFlow helper class ( #82531 )
...
* Add OptionsFlow helper classes
* More integrations
* Adjust SchemaOptionsFlowHandler
* Use single class
* Simplify access to options
* Reduce PR
* Make _options private
* Add test
2022-11-24 12:18:09 +01:00
Jan Bouwhuis
c720742ec9
Revert #81771 (wait_for_states) and #81801 (late review) ( #82085 )
...
* Revert "Address late review of config entry wait for states tests (#81801 )"
This reverts commit 12d76a8a4f
.
* Revert "Implement ConfigEntry async_wait_for_states (#81771 )"
This reverts commit 3cc9ecf1dc
.
2022-11-18 17:16:03 +01:00
Erik Montnemery
1a274adc28
Add config_entries.async_wait_component ( #76980 )
...
Co-authored-by: thecode <levyshay1@gmail.com>
2022-11-17 21:52:57 +01:00
Aaron Bach
adf84b0c62
Add `async_get_active_reauth_flows` helper for config entries ( #81881 )
...
* Add `async_get_active_reauth_flows` helper for config entries
* Code review
* Code review + tests
2022-11-09 15:36:50 -07:00
J. Nick Koston
f9ff23a2c8
Fix benign typo in test_config_entries.py ( #81789 )
...
* Fix typo in test_config_entries.py
* touch ups
* Update tests/test_config_entries.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-09 16:36:46 +01:00
Jan Bouwhuis
12d76a8a4f
Address late review of config entry wait for states tests ( #81801 )
...
* Late review on tests #81771
* Clean-up duplicate assignment
2022-11-08 22:14:17 +01:00
Jan Bouwhuis
3cc9ecf1dc
Implement ConfigEntry async_wait_for_states ( #81771 )
...
* Implement async_wait_for_states
* stale docstr, remove hints
* Assert return states for tests
2022-11-08 17:18:40 +01:00
J. Nick Koston
c2c26e2608
Fix check for duplicate config entry reauth when context is passed or augmented ( #81753 )
...
fixes https://github.com/home-assistant/core/issues/77578
2022-11-07 21:19:57 -06:00
Martin Hjelmare
62c4cd3c26
Add name and slug to supervisor discovery info ( #80094 )
2022-10-11 16:56:45 +02:00
J. Nick Koston
74f7ae409b
Add a helpful message to the config_entries.OperationNotAllowed exception ( #78631 )
...
We only expect this exception to be raised as a result of an
implementation problem. When it is raised during production
it is currently hard to trace down why its happening
See #75835
2022-09-17 20:52:28 +03:00
Jc2k
a0adfb9e62
Fix serialization of Xiaomi BLE reauth flow ( #76095 )
...
* Use data instead of context to fix serialisation bug
* Test change to async_start_reauth
2022-08-02 21:38:38 +01:00
Jc2k
f043203b56
Add optional context parameter to async_start_reauth ( #76077 )
2022-08-02 18:20:37 +02:00
J. Nick Koston
a697672944
Add bluetooth integration ( #74653 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-07-08 18:55:31 -05:00
Franck Nijhof
a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74656 )
2022-07-07 21:28:18 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74642 )
2022-07-07 19:57:36 +03:00
J. Nick Koston
7a422774b6
Prevent config entries from being reloaded while they are setting up ( #73387 )
2022-06-12 23:05:08 -07:00
J. Nick Koston
2e47cee72a
Fix setup race when config entry is in a setup retry state ( #73145 )
2022-06-06 22:48:49 -07:00
J. Nick Koston
f9bd384e6c
Stop waiting for setup retry upon discovery ( #72738 )
2022-05-30 20:24:34 -07:00
J. Nick Koston
4a5679db08
Prevent config entries from being reloaded concurrently ( #72636 )
...
* Prevent config entries being reloaded concurrently
- Fixes Config entry has already been setup when
two places try to reload the config entry at the
same time.
- This comes up quite a bit:
https://github.com/home-assistant/core/issues?q=is%3Aissue+sort%3Aupdated-desc+%22Config+entry+has+already+been+setup%22+is%3Aclosed
* Make sure plex creates mocks in the event loop
* drop reload_lock, already inherits
2022-05-28 10:49:55 +02:00
Martin Hjelmare
09b4b7eb37
Remove hass.helpers from config_entries ( #70660 )
2022-04-25 14:21:03 +02:00
J. Nick Koston
d6619dd4bc
Fix reloading the sun integration ( #69495 )
2022-04-06 16:06:22 -07:00
J. Nick Koston
0ec89ae5da
Teach _async_abort_entries_match about entry options ( #66662 )
2022-02-16 18:15:31 +01:00
Franck Nijhof
9e33a3014c
Automatically add entry title as name placeholder in reauth ( #64078 )
2022-01-18 14:18:16 -08:00
Franck Nijhof
f4aa18de31
Replace hass.helpers: async_call_later() ( #63929 )
2022-01-11 13:30:59 -08:00
Ville Skyttä
5bf67cac66
Use RegistryEntryDisabler ( #60436 )
2021-12-15 23:25:40 +02:00
Ville Skyttä
7db3246de4
Make config entry disabled_by an enum ( #60445 )
...
* Make config entry disabled_by an enum
* Update homeassistant/config_entries.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-15 20:53:21 +01:00
epenet
358922db56
Use dataclass for HassioServiceInfo ( #60824 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:05:56 +01:00
epenet
ec1c52d945
Use dataclass for SsdpServiceInfo ( #59931 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 06:10:07 -10:00
epenet
75057949d1
Adjust async_step_discovery methods for BaseServiceInfo ( #60285 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-24 19:30:02 -06:00
J. Nick Koston
3b7dce8b95
Index in-progress flows to avoid linear search ( #58146 )
...
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-10-22 07:19:49 -10:00
Paulus Schoutsen
a4d9019ffc
Refactor persistent notification to no longer route all data via a service ( #57157 )
...
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
J. Nick Koston
e92e206544
Fix race that allowed multiple config flows with the same unique id ( #55131 )
...
- If a config flow set a unique id and then did an await to
return control to the event loop, another discovery with
the same unique id could start and it would not see
the first one because it was still uninitialized. We now
check uninitialized flows when setting the unique id
2021-08-23 23:01:21 -05:00
J. Nick Koston
dc74a52f58
Add support for USB discovery ( #54904 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 14:04:18 -05:00
J. Nick Koston
725b316ec6
Add HomeKit and DHCP to DISCOVERY_SOURCES in config_entries ( #54923 )
2021-08-20 17:02:03 +02:00
Franck Nijhof
b91b553ce5
Abort existing reauth flow on entry removal ( #52407 )
2021-07-02 20:56:51 +02:00
Ville Skyttä
7d03b02192
Spelling fixes ( #51642 )
2021-06-11 13:35:03 +02:00
Paulus Schoutsen
ee2c950716
Merge system options into pref properties ( #51347 )
...
* Make system options future proof
* Update tests
* Add types
2021-06-01 22:34:31 +02:00