From f2e05cc04015ecc985ebc947eb6a17f2785b63ca Mon Sep 17 00:00:00 2001 From: Dan Raper Date: Mon, 21 Oct 2024 10:06:09 +0100 Subject: [PATCH] FIx async_forward_entry_setup deprecation and update install instructions (#56) * FIx async_forward_entry_setup deprecation * Update install instructions --- README.md | 5 ++--- custom_components/nissan_connect/__init__.py | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 818b6b5..f2df54f 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,8 @@ The API used in North America is completely separate to Europe and it appears th ### HACS This is the recommended installation method. -1. Add this repository to HACS as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories) -2. Search for and install the NissanConnect addon from HACS -3. Restart Home Assistant +1. Search for and install the **NissanConnect [EU]** integration from HACS +2. Restart Home Assistant ### Manual 1. Download the [latest release](https://github.com/dan-r/HomeAssistant-NissanConnect/releases) diff --git a/custom_components/nissan_connect/__init__.py b/custom_components/nissan_connect/__init__.py index a032dc1..29700cd 100644 --- a/custom_components/nissan_connect/__init__.py +++ b/custom_components/nissan_connect/__init__.py @@ -61,10 +61,7 @@ async def async_setup_entry(hass, entry): hass, config) _LOGGER.debug("Initialising entities") - for component in ENTITY_TYPES: - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(entry, component) - ) + await hass.config_entries.async_forward_entry_setups(entry, ENTITY_TYPES) # Init fetch and state coordinators await coordinator.async_config_entry_first_refresh()