myTselection / Carbu_com

Actual fuel prices (super, diesel, lpg) per gasstation supported for Belgium, France, Luxembourg, Spain, Netherlands, Germany, Italy and US! Home Assistant custom component HACS integration for BE/FR/LU based on carbu.com and mazout.com site to compare and save on your actual fuel oil/heating oil (mazout) and fuel (diesel, super and lpg) purchases.
MIT License
23 stars 6 forks source link

Warning: Detected code that calls async_forward_entry_setup #48

Closed tjorim closed 3 months ago

tjorim commented 4 months ago
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:151
First occurred: 00:28:51 (7 occurrences)
Last logged: 00:30:33

Detected code that calls async_forward_entry_setup for integration carbu_com with title: Diesel Retie and entry_id: 2c1e56b1a30143e38423615c975eb62c, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Detected code that calls async_forward_entry_setup for integration carbu_com with title: Super 95 Meerhout and entry_id: 968a519797b373c44ddda8df1912a031, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
tjorim commented 3 months ago

Await is not enough apparently, there is another deprecation as well:

Logger: homeassistant.helpers.frame Source: helpers/frame.py:184 First occurred: 01:27:18 (11 occurrences) Last logged: 01:27:49

Detected that custom integration 'carbu_com' calls async_forward_entry_setup for integration, carbu_com with title: Diesel Retie and entry_id: 2c1e56b1a30143e38423615c975eb62c, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/carbu_com/init.py, line 73: hass.async_create_task(, please create a bug report at https://github.com/myTselection/carbu_com/issues

myTselection commented 3 months ago

Thanks, I'll look into it asap

tjorim commented 3 months ago

Seems like something is still left:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:184
First occurred: 03:57:28 (11 occurrences)
Last logged: 03:57:47

Detected that custom integration 'carbu_com' calls async_forward_entry_setup for integration, carbu_com with title: Diesel Retie and entry_id: 2c1e56b1a30143e38423615c975eb62c, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/carbu_com/__init__.py, line 71: await hass.config_entries.async_forward_entry_setup(config_entry, Platform.SENSOR), please create a bug report at https://github.com/myTselection/carbu_com/issues 
myTselection commented 3 months ago

could it be the latest version wasn't loaded yet? current code:


69  async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
70      """Set up component as config entry."""
71      await hass.config_entries.async_forward_entry_setup(config_entry, Platform.SENSOR)
72      config_entry.async_on_unload(config_entry.add_update_listener(async_update_options))
73      _LOGGER.info(f"{DOMAIN} register_services")
74      register_services(hass, config_entry)
myTselection commented 3 months ago

ok, i see the difference, it seems I need to use await async_forward_entry_setups, will check it

myTselection commented 3 months ago

Fixed in 10.0.4