Skip to content

Commit

Permalink
Update to use async_forward_entry_setups and async_unload_platforms (#22
Browse files Browse the repository at this point in the history
)

Replace deprecated methods async_forward_entry_setup and async_forward_entry_unload with async_forward_entry_setups and async_unload_platforms to address deprecation warnings and ensure future compatibility with Home Assistant Core 2025.6.
  • Loading branch information
040medien authored Oct 29, 2024
1 parent 7de5a2e commit 4173d0d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/hass_stadtreinigung_hamburg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ async def async_setup(hass, config):

async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Set up Stadtreinigung Hamburg as config entry."""
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, "sensor")
)
await hass.config_entries.async_forward_entry_setups(config_entry, ["sensor"])
return True


async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Unload a config entry."""
await hass.config_entries.async_forward_entry_unload(config_entry, "sensor")
await hass.config_entries.async_unload_platforms(config_entry, ["sensor"])
return True

0 comments on commit 4173d0d

Please sign in to comment.