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
Ville Skyttä
c2f5dcefa5
Use flow result type constants more ( #51122 )
2021-05-29 14:09:13 +02:00
Franck Nijhof
a8a13da793
Fix discovery without uid aborts on completing user flow ( #51105 )
...
* Fix discovery without uid aborts on completing user flow
* Fix comment
2021-05-26 16:29:52 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum ( #49654 )
...
* Change config entry state to an enum
* Allow but deprecate EntryState str equality comparison
* Test fixes
* Rename to ConfigEntryState
* Remove str comparability backcompat
* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
J. Nick Koston
34c84a6bbb
Reduce boilerplate to abort for matching config entries ( #50186 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-11 22:00:12 +02:00
Franck Nijhof
177317a345
Allow passing options in config flow entry creation ( #49912 )
2021-05-05 22:14:01 -07:00
Franck Nijhof
c68b259bd3
Cleanup of unused connection_class logic ( #49865 )
...
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
J. Nick Koston
51be2f860a
Reduce boilerplate to setup config entry platforms A-C ( #49681 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-26 07:46:55 -10:00
Ville Skyttä
153d6e891e
Use config_entries.SOURCE_* constants ( #49631 )
2021-04-25 11:27:40 +02:00
Ville Skyttä
a396619251
Use disabled_by constants ( #49584 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-23 09:56:42 +02:00
Paulus Schoutsen
265fdea83b
Allow config entries to store a reason ( #49581 )
2021-04-23 09:23:43 +02:00
J. Nick Koston
44beff31c2
Cancel config entry retry, platform retry, and polling at the stop event ( #49138 )
2021-04-13 16:16:26 -10:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth ( #48962 )
2021-04-09 19:41:29 -10:00
J. Nick Koston
40450b9cfd
Detach aiohttp.ClientSession created by config entry setup on unload ( #48908 )
2021-04-09 10:14:33 -07:00
J. Nick Koston
cfe2df9ebd
Prevent config entry retry from blocking startup ( #48660 )
...
- If there are two integrations doing long retries async_block_till_done() will never be done
2021-04-03 17:00:22 -07:00
J. Nick Koston
6023105c6a
Do not load ignored or disabled integrations at startup ( #48355 )
...
config_entries.async_setup will skip ignored and disabled integrations
but bootstrap would still load them in memory even though they would
never be setup.
2021-03-29 13:06:44 +02:00
J. Nick Koston
cb1b45d31a
Log the reason a config entry failed to setup ( #48449 )
...
If we pass a string to ConfigEntryNotReady or raise it from
another exception we now log the string passed or the
string generated by the original exception.
With #47201 this makes it easy for developers to still show
the reason why setup failed without having to worry about log
spam from additional attempts by rasing ConfigEntryNotReady
from the original exception.
2021-03-29 12:25:40 +02:00
Franck Nijhof
ad13a9295e
Merge multiple context managers in tests ( #48146 )
2021-03-27 09:17:15 +01:00
J. Nick Koston
8e4c0e3ff7
Increase config entries test coverage ( #48203 )
2021-03-21 19:29:48 -10:00
J. Nick Koston
f35641ae8e
Make sure include_ignore=False always works with _async_current_entries ( #48196 )
...
If the step was anything other than SOURCE_USER,
include_ignore=False would not be honored
2021-03-21 21:57:49 -07:00
J. Nick Koston
3f2ca16ad7
Index config entries by id ( #48199 )
2021-03-21 21:44:29 -07:00
Erik Montnemery
78b21b1ad1
Update tests a-b to use async_get() instead of async_get_registry() ( #47651 )
2021-03-09 14:24:34 +01:00
Erik Montnemery
5e26bda52d
Add support for disabling config entries ( #46779 )
2021-02-20 19:21:39 -08:00
Erik Montnemery
dd150bb797
Allow manual configuration of ignored singleton config entries ( #45161 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-04 11:08:10 +01:00
Simone Chemelli
86cd7911de
Clarify ConfigEntryNotReady log ( #45425 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Charles Garwood <cgarwood@gmail.com>
2021-01-22 12:13:23 -05:00
Paulus Schoutsen
e83ced6737
Add name to ignored entries ( #45051 )
...
* Add name to ignored entries
* Fix test
2021-01-12 09:26:20 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
nivnoach
906e1ce960
Allow manual configuration of ignored config entries ( #43947 )
2020-12-07 09:25:04 +01:00
Erik Montnemery
5694e4190c
Extend WS API result when enabling an entity ( #42667 )
...
* Extend WS API result when enabling an entity
* Fix tests
* Fix tests
* Move updated registry entry to sub dict
* Address review comments
* Increase test coverage
2020-11-09 19:47:45 +01:00