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.
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.
* 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
* add persistent notification for reauth config flow
* remove log
* Update homeassistant/config_entries.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/config_entries.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* fix logic for determining when to dismiss notification
* add comment
* improve tests to ensure notifications only get dismissed when all in progress config flows of a given type are complete
* Update homeassistant/config_entries.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* handle context is None when accessing source
* add guard to show_advanced_options
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Add support for reload_on_update to _abort_if_unique_id_configured
async_update_entry now avoids firing update listeners and writing
the storage if there are no actual changes.
* Actually add the tests
* collapse branch
* Update homeassistant/config_entries.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
* handle entries that lack the ability to reload
* reduce
* adjust konnected tests
* update axis tests
* fix blocking
* more mocking
* config flow tests outside of test_config_flow
* reduce
* volumio
* Update homeassistant/config_entries.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* set reload_on_update=False for integrations that implement self._abort_if_unique_id_configured(updates= and a reload listen
* get rid of copy
* revert test change
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Ensure a deleted intergration can be removed
* Update homeassistant/config_entries.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Allow async_setup changes to config entry data be taken into account
* Fix tests
* Limit scope try…finally
* Update tests/test_config_entries.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Fix import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't expose flows that aren't initialised.
If a flow init does not return immediately then there is a window where our
behaviour is screwy:
* Can try to configure a flow that isn't ready
* Can show notifications for discoveries that might yet return an abort
This moves the flow discovery events and notifications to after the flow is
initialised and hides flows that don't have a cur_step from async_progress
* Fix tradfri test
* Black.
* Lint fixes
* Mechanism to rediscover a discovery that was ignored
* Add core config entry tests for new rediscover step
* Add tests for homekit_controller implementation of async_step_rediscover
* Rename rediscover to unignore
* Comment the new ignore/unignore mechanisms
* Add unique ID to config entries
* Unload existing entries with same unique ID if flow with unique ID is
finished
* Remove unused exception
* Fix typing
* silence pylint
* Fix tests
* Add unique ID to Hue
* Address typing comment
* Tweaks to comments
* lint
* Load dependencies from manifests. Fallback to current DEPENDENCIES
* Fix typing
* Ignore typing correctly
* Split out dependency processing to a new method
* Fix tests
* Only pull from manifest if dependencies is non empty
* Inline temporary function
* Fix light tests [skip ci]
* Fix tests/common
* Fix some mqtt tests [skip ci]
* Fix tests and component manifests which have only one platform
* Fix rflink tests
* Fix more tests and manifests
* Readability over shorthand format
* Fix demo/notify tests
* Load dependencies from manifests. Fallback to current DEPENDENCIES
* Load requirements from manifests. Fallback to current REQUIREMENTS
* Fix typing
* Ignore typing correctly
* Split out dependency processing to a new method
* Only pull from manifest if dependencies is non empty
* Inline temporary function
* Fix tests and component manifests which have only one platform
* Fix rflink tests
* Readability over shorthand format
* Clean up requirements
* Use integration to resolve deps/reqs
* Lint
* Lint
* revert a change
* Revert a test change
* Fix types
* Fix types
* Add back cache for load component
* Fix test_component_not_found
* Move light.test and device_tracker.test into test package instead with manifest to fix tests
* Fix broken device_tracker tests
* Add docstrings to __init__
* Fix all of the light tests that I broke earlier
* Embed the test.switch platform to fix other tests
* Embed and fix the test.imagimage_processing platform
* Fix tests for nx584
* Add dependencies from platform file's DEPENDENCIES
* Try to setup component when entity_platform is setting up
Fix tests in helpers folder
* Rewrite test_setup
* Simplify
* Lint
* Disable demo component if running in test
Temp workaround to unblock CI tests
* Skip demo tests
* Fix config entry test
* Fix repeat test
* Clarify doc
* One extra guard
* Fix import
* Lint
* Workaround google tts