Commit Graph

380 Commits (737e5e70ec2df9576e807f309711d28f49f7ac21)

Author SHA1 Message Date
J. Nick Koston 6e134b325d
Make ConfigEntryItems responsible for updating unique ids (#110018)
* Make ConfigEntryItems responsible for updating unique ids

* Make ConfigEntryItems responsible for updating unique ids

* Make ConfigEntryItems responsible for updating unique ids

* Make ConfigEntryItems responsible for updating unique ids

* Make ConfigEntryItems responsible for updating unique ids
2024-02-09 08:51:02 -05:00
Erik Montnemery 793b6aa97d
Allow passing version to ConfigEntry.async_update_entry (#110077)
Allow passing minor_version and version to ConfigEntry.async_update_entry
2024-02-09 10:10:25 +01:00
Erik Montnemery 2f15053311
Don't blow up if config entries have unhashable unique IDs (#109966)
* Don't blow up if config entries have unhashable unique IDs

* Add test

* Add comment on when we remove the guard

* Don't stringify hashable non string unique_id
2024-02-08 15:39:01 +01:00
Marc Mueller 5de76c0be0
Include exception when reraising inside except (#109706) 2024-02-06 12:17:39 +01:00
Erik Montnemery ffdcdaf43b
Create issues for reauth flows (#109105) 2024-01-31 15:05:52 +01:00
J. Nick Koston dff5e45761
Small speed up to listing config entries in the websocket api (#108892) 2024-01-25 20:20:19 -10:00
Jan-Philipp Benecke 0b79504cf0
Extend config entry update/abort helper to also update unique id (#108681)
* Extend config entry update/abort helper to also update unique id

* Move kwarg to end

* Make additionals kwargs only
2024-01-22 23:01:55 +01:00
Jan-Philipp Benecke 988d72b8b6
Add helper function to update and reload config entry to config flow (#108034)
* Add helper function to update and reload config entry to config flow

* Use async_create_task

* Remove await

* Reload only when update & add task name

* Rename function
2024-01-22 17:40:20 +01:00
J. Nick Koston 3649cb96de
Refactor config entry storage and index (#107590) 2024-01-13 10:34:15 -10:00
J. Nick Koston 4b7a313ece
Use identity checks for CoreState (#107846)
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
J. Nick Koston b2f7fd12a2
Add comment to ConfigEntry.async_setup about race safety (#107756) 2024-01-10 13:03:09 -10:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Jan Bouwhuis 487ff8cd7f
Rename ex to exc as name for exceptions (#104479) 2023-11-25 08:30:18 +01:00
J. Nick Koston 9b27552238
Fix race in starting reauth flows (#103130) 2023-10-31 12:38:05 -05:00
Franck Nijhof 6853d54050
Remove logging of retrying config entry warning (#101483) 2023-10-05 22:12:01 +02:00
J. Nick Koston a03ad87cfb
Avoid ConfigEntry lookups in hass.config_entries.async_entries for domain index (#100598) 2023-09-20 18:43:15 +02:00
J. Nick Koston 1d5905b591
Use is for UNDEFINED check in async_update_entry (#100599) 2023-09-20 01:08:32 +02:00
J. Nick Koston e3f228ea52
Switch config_entries to use loop.create_future() (#100011) 2023-09-09 17:34:49 -05:00
J. Nick Koston e5ebba0753
Fix module check in _async_get_flow_handler (#99509)
We should have been checking for the module in hass.data[DATA_COMPONENTS]
and not hass.config.components as the check was ineffective if there were
no existing integrations instances for the domain which is the case for
discovery or when the integration is ignored
2023-09-04 14:19:10 -04:00
J. Nick Koston b8f8cd1797
Reduce overhead to retry config entry setup (#99471) 2023-09-02 16:46:53 -05:00
J. Nick Koston 99e97782b6
Improve performance of abort_entries_match (#98932)
* Improve performance of abort_entries_match

In #90406 a ChainMap was added which called __iter__
and __contains__ which ends up creating temp dicts
for matching

174e9da083/Lib/collections/__init__.py (L1022)

We can avoid this by removing the ChainMap since there
are only two mappings to match on.

This also means options no longer obscures data

* adjust comment
2023-08-24 15:34:45 +02:00
Erik Montnemery d282ba6bac
Use a single WS command for group preview (#98903)
* Use a single WS command for group preview

* Fix tests
2023-08-24 11:59:24 +02:00
Erik Montnemery b885dfa5a8
Add preview to sensor group config and option flows (#83638) 2023-08-22 10:29:16 +02:00
J. Nick Koston 1adfa6bbeb
Reduce overhead to start a config entry flow by optimizing fetching the handler (#97883) 2023-08-06 20:25:03 -10:00
Franck Nijhof 30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
Marc Mueller 77f38e33e5
Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
J. Nick Koston 9fba6870fe
Fix task leak on config entry unload/retry (#96981)
Since the task was added to self._tasks without a `task.add_done_callback(self._tasks.remove)`
each unload/retry would leak a new set of tasks
2023-07-20 21:00:07 -04:00
J. Nick Koston 6bb81b862c
Add a message to the config entry cancel call (#96925) 2023-07-19 19:22:38 -05:00
J. Nick Koston 085eebc903
Make async_set_state in ConfigEntry a protected method (#96727)
I added this in #77803 but I never designed it to be called
externally. External usage may break at any time because the
class is not designed for this. I should have made it protected
in the original PR but I did not think it would get called
externally (my mistake)
2023-07-17 08:58:12 +02:00
Paulus Schoutsen 0f725a24bd
Remove the weak ref for tracking update listeners (#95798) 2023-07-03 13:56:21 -05:00
J. Nick Koston 34b725bb99
Debounce discoveries to improve event loop stability at the started event (#94690)
* Debounce discoveries to improve event loop stability at the started event

The first one is immediate and anything that fires within the next
second will be debounced to only happen once every second

* fix mock
2023-06-15 22:15:07 -04:00
J. Nick Koston 9e666ae0c0
Reduce in progress flow matching overhead (#94403)
* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* augment cover
2023-06-11 10:41:38 +02:00
J. Nick Koston cf69da40f3
Only check support_entry_unload/support_remove_from_device once (#92041) 2023-04-26 10:23:18 +02:00
J. Nick Koston 739963b5ee
Remove deprecated async_setup_platforms (#91929) 2023-04-23 22:38:35 -05:00
epenet 3364f0fce2
Allow config entries unload action to be coroutine (#91531)
* Allow config entries unload action to be coroutine

* Adjust comment
2023-04-17 08:41:25 -04:00
epenet a061f56833
Fix lingering timer in EntityRegistryDisabledHandler (#91376)
Mark EntityRegistryDisabledHandler as cancellable
2023-04-14 06:37:49 +02:00
epenet 611d4135fd
Add ComponentProtocol to improve type checking (#90586) 2023-03-31 14:19:58 -04:00
epenet f7925763a4
Make abort_entries_match available in options flow (#90406)
* Make abort_entries_match available in options flow

* Add tests

* Exclude ignore entries and add test

* Move to OptionsFlow

* Adjust tests

* Use mock_config_flow

* Use AbortFlow

* Remove duplicate code
2023-03-29 17:20:51 +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
Jesse Moody d7de23fa65
Adjust eventloop -> event loop spelling (#89931)
eventloop -> event loop spelling
2023-03-19 21:53:21 +01:00
J. Nick Koston 4ce36366c3
Add names to the config entry setup and shutdown tasks (#89309)
* name the entry setup tasks

* name a few more tasks

* Update homeassistant/config_entries.py

* Update homeassistant/setup.py
2023-03-08 10:19:36 -05:00
J. Nick Koston 11681f3f31
Pass a helpful name when creating common asyncio tasks in core (#89171) 2023-03-05 12:46:02 +01:00
Erik Montnemery 2c2489284b
Catch CancelledError when setting up components (#88635)
* Catch CancelledError when setting up components

* Catch CancelledError when setting up components

* Also catch SystemExit
2023-02-27 09:29:14 -05:00
J. Nick Koston f8934175cb
Prevent integrations from retrying setup once shutdown has started (#88818)
* Prevent integrations from retrying setup once shutdown has started

* coverage
2023-02-26 22:01:02 -05: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
Marc Mueller 342b406dc0
Add Self typing (1) [mypy 1.0] (#87598) 2023-02-06 22:29:47 -06:00
J. Nick Koston 7ddb467ba6
Increase async_setup_platforms deprecation logging to warning (#86582) 2023-01-25 14:38:26 +01:00
Ville Skyttä 5f0adfe6e4
Add missing config flow abort strings (#86180)
* Add missing `already_configured` and `already_in_progress` abort strings

* Note required strings.json entries in config_entries aborting functions
2023-01-24 08:59:32 +02:00
Marc Mueller 6397138589
Update Optional typing (1) [Py310] (#86417)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-23 09:56:10 +01:00
Franck Nijhof 79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +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
Franck Nijhof 64c2340fab
Core code styling improvements (#85963) 2023-01-15 23:00:51 +01:00
Erik Montnemery 22dbbd4b71
Revert "Disable sky connect config entry if USB stick is not plugged in" (#85103) 2023-01-04 11:33:16 +01:00
Erik Montnemery 472c23d35f
Disable sky connect config entry if USB stick is not plugged in (#84975)
* Disable sky connect config entry if USB stick is not plugged in

* Remove debug stuff
2023-01-02 22:24:59 +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 b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Erik Montnemery bf4c399b19
Improve data entry flow typing (#84030) 2022-12-15 12:41:20 +01:00
Erik Montnemery cc132bfad6
Make it optional to provide a title when finishing a FlowHandler (#83534)
* Make it optional to provide a title when finishing a FlowHandler

* Make ConfigEntry.title a str

* Revert changes in ConfigFlow

* Adjust tests
2022-12-09 10:24:08 +01:00
Michael 444ad52757
Fix info message in config_entries handle_reload (#82798) 2022-11-27 14:34:01 -05:00
Franck Nijhof c715035016
Add support for raising ConfigEntryError (#82689) 2022-11-25 11:33:03 +01:00
epenet e7d4f745ec
Expose config_entry and options as properties (#82691)
Expose config_entry and options as a property
2022-11-25 11:13:44 +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
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 4d1fa42a3c
Use more efficient async_progress_by_handler call in async_start_reauth (#81757) 2022-11-08 11:20:54 +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
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
J. Nick Koston 016a59ac94
Add support for subscribing to config entry changes (#77803) 2022-09-04 22:57:43 -05:00
Zach Berger ebbff7b60e
Add Awair Local API support (#75535) 2022-08-11 09:01:35 -04: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 80a9659524
Update to bleak 0.15 (#75941) 2022-07-29 17:53:33 -07:00
Marc Mueller d09fff595c
Rename existing TypeVars referencing Self type (#75473) 2022-07-20 03:03:22 +02:00
J. Nick Koston 32311f240b
Avoid converting discovery_info dataclasses to dict that will be thrown away in config flows (#75451)
* Avoid converting BluetoothServiceInfo to a dict for default discovery

Fixes
```
2022-07-19 09:46:48.303 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
    await gather_with_concurrency(
  File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 201, in gather_with_concurrency
    return await gather(
  File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 199, in sem_task
    return await task
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 222, in async_init
    flow, result = await task
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 249, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1484, in async_step_bluetooth
    return await self.async_step_discovery(dataclasses.asdict(discovery_info))
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1239, in asdict
    return _asdict_inner(obj, dict_factory)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1246, in _asdict_inner
    value = _asdict_inner(getattr(obj, f.name), dict_factory)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1280, in _asdict_inner
    return copy.deepcopy(obj)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 146, in deepcopy
    y = copier(x, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 161, in deepcopy
    rv = reductor(4)
TypeError: Cannot pickle Objective-C objects
```

* Avoid converting BluetoothServiceInfo to a dict for default discovery

Fixes
```
2022-07-19 09:46:48.303 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
    await gather_with_concurrency(
  File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 201, in gather_with_concurrency
    return await gather(
  File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 199, in sem_task
    return await task
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 222, in async_init
    flow, result = await task
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 249, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1484, in async_step_bluetooth
    return await self.async_step_discovery(dataclasses.asdict(discovery_info))
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1239, in asdict
    return _asdict_inner(obj, dict_factory)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1246, in _asdict_inner
    value = _asdict_inner(getattr(obj, f.name), dict_factory)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1280, in _asdict_inner
    return copy.deepcopy(obj)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 146, in deepcopy
    y = copier(x, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 161, in deepcopy
    rv = reductor(4)
TypeError: Cannot pickle Objective-C objects
```
2022-07-19 18:50:30 +02:00
J. Nick Koston fde3489e86
Relocate BluetoothServiceInfo to helpers.service_info (#75195) 2022-07-14 11:36:54 -07:00
J. Nick Koston 666f715e76
Avoid importing MQTT into core for ServiceInfo dataclass (#74418)
* Avoid importing MQTT into core for discovery dataclass

Likely fixes #73863

* relo

* adjust

* rename

* rename

* rename

* adjust missed imports

* drop compat

* fix conflict correctly

* Update homeassistant/helpers/config_entry_flow.py

* fix black from trying to fix the conflict in github
2022-07-14 11:09:09 -05:00
epenet 16900dcef1
Make Store a generic class (#74617) 2022-07-09 22:32:57 +02:00
J. Nick Koston cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +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
Erik Montnemery 00810235c9
Track tasks adding entities (#73828)
* Track tasks adding entities

* Update homeassistant/config_entries.py

* fix cast tests

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-06-29 09:38:35 +02:00
J. Nick Koston bb8b51eda3
Fix typos in ConfigEntryState.recoverable (#73449) 2022-06-13 10:56:08 -10: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
epenet f91aa33c5f
Add FlowResultType enum to data entry flow (#72955) 2022-06-07 22:02:44 -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
epenet 627d6f7803
Ensure description_placeholders is always typed (#72716) 2022-05-31 10:33:34 +02: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
Franck Nijhof 7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
Marc Mueller c1d2017988
Improve typing for core add_job and run_job methods (#70702) 2022-04-25 23:50:01 +02:00
Martin Hjelmare 09b4b7eb37
Remove hass.helpers from config_entries (#70660) 2022-04-25 14:21:03 +02:00
Ville Skyttä 05ddd773ff
Fix _abort_if_unique_id_configured updates type hint (#68730) 2022-03-29 09:24:15 +02:00
Marc Mueller 911b159281
Cleanup after pylint update (#68657) 2022-03-26 00:34:12 +01:00
Marc Mueller 53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
Marc Mueller ec980a574b
Improve typing [util.decorator] (#67087) 2022-02-23 20:58:42 +01:00
Erik Montnemery c496748125
Add WS API for removing a config entry from a device (#66188)
* Add WS API for removing a config entry from a device

* Address review comments

* Address review comments

* Remove entity cleanup from ConfigEntries

* Update + add tests

* Improve comments in test

* Add negative test

* Refactor according to review comments

* Add back async_remove_config_entry_device

* Remove unnecessary error handling

* Simplify error handling
2022-02-21 10:11:18 +01:00
Marc Mueller 8d2fb72cc3
Add type ignore error codes [core] (#66773) 2022-02-17 23:09:22 -08:00
J. Nick Koston 0ec89ae5da
Teach _async_abort_entries_match about entry options (#66662) 2022-02-16 18:15:31 +01:00