Skip to content

Commit

Permalink
Merge pull request #75 from kikediazfernandez/main
Browse files Browse the repository at this point in the history
Fix deprecated call to async_forward_entry_setup
  • Loading branch information
ldotlopez authored Oct 14, 2024
2 parents e94cd09 + 0702851 commit 3d63268
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions custom_components/ideenergy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import ideenergy
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
Expand All @@ -43,7 +43,7 @@
from .datacoordinator import DataSetType, IDeCoordinator
from .updates import update_integration

PLATFORMS: list[str] = ["sensor"]
PLATFORMS: list[str] = [Platform.SENSOR]

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -100,9 +100,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
for platform in PLATFORMS:
if entry.options.get(platform, True):
coordinator.platforms.append(platform)
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, platform)
)
await hass.config_entries.async_forward_entry_setups(entry,coordinator.platforms)

entry.async_on_unload(entry.add_update_listener(async_reload_entry))

Expand Down

0 comments on commit 3d63268

Please sign in to comment.