* 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>
- 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
* 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
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>