From 9bd92fa1afadc645a34cd5de16408843519943be Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 9 Jul 2022 13:32:52 -0500 Subject: [PATCH] Add blog post about waiting for config entry platforms (#1390) --- blog/2022-07-08-config_entry_forwards.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 blog/2022-07-08-config_entry_forwards.md diff --git a/blog/2022-07-08-config_entry_forwards.md b/blog/2022-07-08-config_entry_forwards.md new file mode 100644 index 00000000..9a986c71 --- /dev/null +++ b/blog/2022-07-08-config_entry_forwards.md @@ -0,0 +1,11 @@ +--- +author: J. Nick Koston +authorURL: https://github.com/bdraco +title: "Waiting for config entry platforms" +--- + +Before 2022.8, it was impossible to `await` config entry platforms forwards without a deadlock if one of the platforms loaded by the config entry was not already loaded. + +Integrations need to be refactored to replace calls to `hass.config_entries.async_setup_platforms` with `hass.config_entries.async_forward_entry_setups` and/or await all `hass.config_entries.async_forward_entry_setup` to ensure that Home Assistant does not inadventantly reload the integration while entities and platforms are still being set up. + +`hass.config_entries.async_setup_platforms` is scheduled to be removed in 2022.12. \ No newline at end of file