* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
* 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>
* 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
* Add and improve core and config_entries type hints
* Complete and improve config_entries type hints
* More entity registry type hints
* Complete helpers.event type hints
* Refactor the Somfy auth implementation
* Typing
* Migrate Somfy to OAuth2 flow helper
* Add tests
* Add more tests
* Fix tests
* Fix type error
* More tests
* Remove side effect from constructor
* implementation -> auth_implementation
* Make get_implementation async
* Minor cleanup + Allow picking implementations.
* Add support for extra authorize data
* Support populating list of flows from custom components
* Re-allow custom component config flows
* Add tests for custom component retrieval
* Don't crash view if no handler exist
* Use get_custom_components instead fo resolve_from_root
* Switch to using an event instead of lock
* Leave list of integrations as set
* The returned list is not guaranteed to be ordered
Backend uses a set to represent them.