async_forward_entry_setup and flow config_entry explicitl
Logger: homeassistant.helpers.frame Quelle: helpers/frame.py:324 Erstmals aufgetreten: 08:50:56 (2 Vorkommnisse) Zuletzt protokolliert: 08:52:11
Detected that custom integration 'eta' calls async_forward_entry_setup for integration, eta with title: ETA at 192.xxx.xxx.xxx and entry id xxx, which is deprecated, await async_forward_entry_setups instead at custom_components/eta/init.py, line 22: hass.async_create_task(. This will stop working in Home Assistant 2025.6, please create a bug report at https://github.com/nigl/homeassistant_eta_integration/issues Detected that custom integration 'eta' sets option flow config_entry explicitly, which is deprecated at custom_components/eta/config_flow.py, line 133: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at https://github.com/nigl/homeassistant_eta_integration/issues
Workaround for version 2025.6.
File: custom_components/eta/init.py
Replaced method hass.config_entries.async_forward_entry_setup(entry, "sensor")
with the new async method
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
Workaround for version 2025.6.
File: custom_components/eta/init.py
Replaced method hass.config_entries.async_forward_entry_setup(entry, "sensor")
with the new async method
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
Works! Thanks a lot
Unfortunately, this doesn't seem to fully work in my case. Note: I made the change in init.py as there is no init.py
Data gets updated again now, but the integration still shows a config error and logs an error too:
Error setting up entry ETA at 192.XXX.XXX.XXX for eta Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in _async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/eta/init.py", line 22, in async_setup_entry hass.async_create_task( ~~~~~~~~~~~~~~~~~~~~~~^ await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/core.py", line 808, in async_create_task return self.async_create_task_internal(target, name, eager_start) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 830, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) TypeError: a coroutine was expected, got None
/homeassistant/custom_components/eta/init.py there is the function
Thanks a lot - works - but pay attention ...setup... changes to ....setups....
i did not copy the line so i wonder why this is working in the first step
Hi, for me this seems not working. Any idea?
Logger: homeassistant.config_entries Quelle: config_entries.py:749 Erstmals aufgetreten: 15:47:28 (2 Vorkommnisse) Zuletzt protokolliert: 15:51:00
Error setting up entry ETA at 192.168.1.35 for eta Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in _async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/eta/init.py", line 22, in async_setup_entry hass.async_create_task( ~~~~~~~~~~~~~~~~~~~~~~^ await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/core.py", line 808, in async_create_task return self.async_create_task_internal(target, name, eager_start) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 830, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) TypeError: a coroutine was expected, got None
@colin1256 @renekcl I had the same issue. The reason for the error is that replacing the line works for 0.0.2, but not for 0.0.1 as you both use (as I did). Please make sure that you updated have 0.0.2 before.
The line(s) would actually be changed from (0.0.1)
# Forward the setup to the sensor platform.
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, "sensor")
)
to (fixed 0.0.2)
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
Regards Sirko
How can I run the update? In HACS i selected version 0.0.2 for download but after restarting HA ETA integration still shows version 0.0.1.
How can I run the update? In HACS i selected version 0.0.2 for download but after restarting HA ETA integration still shows version 0.0.1.
same here
How can I run the update? In HACS i selected version 0.0.2 for download but after restarting HA ETA integration still shows version 0.0.1.
same here
Same here.
I had the same problem, as there are only 3 or 4 changed files I updated them manually (copied the file content into the original files using the File Editor in HA) https://github.com/nigl/homeassistant_eta_integration/compare/v0.0.2...main Then change the line as described above await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
@nigl You have created a tag for V0.0.3. Can you also add an Release? Then we could update easy via hacs.
Thank you for this fix, it works now!