From 54b3a80a9a76f8f603cb3cb0bee5da2e23dc60a5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 17 Jul 2020 09:30:30 -0700 Subject: [PATCH] Update config_entries_index.md --- docs/config_entries_index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/config_entries_index.md b/docs/config_entries_index.md index fe4c76b9..316eb6fe 100644 --- a/docs/config_entries_index.md +++ b/docs/config_entries_index.md @@ -105,8 +105,12 @@ If a component includes platforms, it will need to forward the Config Entry to t be done by calling the forward function on the config entry manager ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/hue/bridge.py#L81)): ```python -# Use `hass.async_add_job` to avoid a circular dependency between the platform and the component -hass.async_create_task(hass.config_entries.async_forward_entry_setup(config_entry, "light")) +# Use `hass.async_create_task` to avoid a circular dependency between the platform and the component +hass.async_create_task( + hass.config_entries.async_forward_entry_setup( + config_entry, "light" + ) +) ``` For a platform to support config entries, it will need to add a setup entry method ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/light/hue.py#L60)):