Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
figorr authored Sep 4, 2024
1 parent a90654a commit 0116d45
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions custom_components/ecowater_softener/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -51,4 +50,4 @@ async def async_unload_entry(
if unload_ok:
hass.data[DOMAIN].pop(entry.entry_id)

return unload_ok
return unload_ok

0 comments on commit 0116d45

Please sign in to comment.