jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
196 stars 48 forks source link

Depricated alias HomeAssistantType and function async_forward_entry_setup throw Warnings #276

Closed amckenny closed 2 weeks ago

amckenny commented 2 months ago

Describe the bug

When loading Hubitat following a restart of Home Assistant, the following error is logged:

2024-07-07 14:04:25.896 WARNING (ImportExecutor_0) [homeassistant.helpers.typing] HomeAssistantType was used from hubitat, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'hubitat' custom integration
2024-07-07 14:04:46.177 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hubitat' calls async_forward_entry_setup for integration, hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/hubitat/hub.py, line 317: hass.async_create_task(, please create a bug report at https://github.com/jason0x43/hacs-hubitat/issues
2024-07-07 14:04:46.204 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, 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.
2024-07-07 14:04:46.206 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, 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.
2024-07-07 14:04:46.215 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, 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.
2024-07-07 14:04:46.216 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, 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.
2024-07-07 14:04:46.230 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hubitat with title: Hubitat (4d52a6b8) and entry_id: 95861519b0146f995cd7b851039bd67b, 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.

To Reproduce

  1. Restart Home Assistant
  2. Settings > System > Logs
  3. Filter for "Hubitat"

Environment

The offending lines appear to be:

jason0x43 commented 2 months ago

Thanks for the report! This should be fixed in v0.9.29.

markus99 commented 2 weeks ago

I'm on 0.9.31 and seeing this error:

Logger: homeassistant.helpers.typing Source: helpers/deprecation.py:197 First occurred: 9:26:53 AM (1 occurrences) Last logged: 9:26:53 AM

HomeAssistantType was used from hubitat, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'hubitat' custom integration

I'm back on 2024.6.4, so unsure if my delay in upgrading to 2024.8.x is creating the issue, but guessing not.

jason0x43 commented 2 weeks ago

Thanks for letting me know! This is fixed in 3b55157, which will be in the next release.