From 2eb402ae8a4360cb630507097fe91a2ab3f49119 Mon Sep 17 00:00:00 2001 From: Daniel Shokouhi Date: Thu, 16 Jul 2020 12:22:00 -0700 Subject: [PATCH] Switch example to create_task (#604) Per https://github.com/home-assistant/core/pull/37741#discussion_r455668639 --- docs/config_entries_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config_entries_index.md b/docs/config_entries_index.md index f110c053..fe4c76b9 100644 --- a/docs/config_entries_index.md +++ b/docs/config_entries_index.md @@ -106,7 +106,7 @@ be done by calling the forward function on the config entry manager ([example](h ```python # Use `hass.async_add_job` to avoid a circular dependency between the platform and the component -hass.async_add_job(hass.config_entries.async_forward_entry_setup(config_entry, "light")) +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)):