Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async_forward_entry_setup for integration, which is deprecated and will stop working in Home Assistant 2025.6 #14

Open
bakernigel opened this issue Oct 4, 2024 · 0 comments

Comments

@bakernigel
Copy link

Getting the following warnings when trying to use the historical sensor example code from delorian. Not sure how to fix this one. Tried just replacing async_forward_entry_setup with async_forward_entry_setups as the warning suggests but that just caused an exception. Any help would be much appreciated. Otherwise the historical sensor is working great for my application. Great job. Thanks.

2024-10-04 10:49:49.342 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'apsmeter' calls async_forward_entry_setup for integration, apsmeter with title: apsmeter and entry_id: 01J92AJ6SZTH89QBGS4G3K50ZF, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/apsmeter/__init__.py, line 50: hass.async_create_task(, please create a bug report at https://github.com/ldotlopez/ha-historical-sensor/issues

Code that causes the warning in delorian init.py

async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
    hass.data[DOMAIN] = hass.data.get(DOMAIN, {})
    hass.data[DOMAIN][entry.entry_id] = get_device_info()

    for platform in PLATFORMS:
        if entry.options.get(platform, True):
            _LOGGER.debug(f"setting up {platform}")
            hass.async_create_task(
                hass.config_entries.async_forward_entry_setup(entry, platform)
            )   

    return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant