From 0116d4579207bce1ab2a441728d14b04588333df Mon Sep 17 00:00:00 2001 From: figorr <77553975+figorr@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:40:23 +0200 Subject: [PATCH] Update __init__.py Update __init__.py file to solve log warning: "Detected that custom integration 'ecowater_softener' calls async_forward_entry_setup for integration, ecowater_softener with title: Ecowater "serial number" and entry_id: xxxxxxxxxxxxxxxxxxx, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/ecowater_softener/__init__.py, line 25: await hass.config_entries.async_forward_entry_setup(entry, "sensor"), please create a bug report at https://github.com/barleybobs/homeassistant-ecowater-softener/issues" --- custom_components/ecowater_softener/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/custom_components/ecowater_softener/__init__.py b/custom_components/ecowater_softener/__init__.py index 07be0f2..c7ca256 100644 --- a/custom_components/ecowater_softener/__init__.py +++ b/custom_components/ecowater_softener/__init__.py @@ -22,9 +22,8 @@ async def async_setup_entry( hass.data[DOMAIN][entry.entry_id] = hass_data # Forward the setup to the sensor platform. - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(entry, "sensor") - ) + await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) + return True @@ -51,4 +50,4 @@ async def async_unload_entry( if unload_ok: hass.data[DOMAIN].pop(entry.entry_id) - return unload_ok \ No newline at end of file + return unload_ok