Add support for reload_on_update to _abort_if_unique_id_configured (#38638)
* 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>
This commit is contained in:
parent
1cb161017e
commit
74c23c3e96
9 changed files with 272 additions and 82 deletions
|
@ -198,7 +198,9 @@ class HueFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
bridge = self._async_get_bridge(host, discovery_info[ssdp.ATTR_UPNP_SERIAL])
|
||||
|
||||
await self.async_set_unique_id(bridge.id)
|
||||
self._abort_if_unique_id_configured(updates={CONF_HOST: bridge.host})
|
||||
self._abort_if_unique_id_configured(
|
||||
updates={CONF_HOST: bridge.host}, reload_on_update=False
|
||||
)
|
||||
|
||||
self.bridge = bridge
|
||||
return await self.async_step_link()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue