Skip to content

Comments

Handle hass.components deprecation, directly import discovery helper#25

Open
RobertD502 wants to merge 2 commits intovaparr:mainfrom
RobertD502:hass_components_deprecation
Open

Handle hass.components deprecation, directly import discovery helper#25
RobertD502 wants to merge 2 commits intovaparr:mainfrom
RobertD502:hass_components_deprecation

Conversation

@RobertD502
Copy link

@RobertD502 RobertD502 commented Mar 4, 2024

Starting with Home Assistant 2024.3.0, users will get a warning in their log to open an issue on your repository regarding the use of hass.components.webhook. With Home Assistant 2024.9.0, this use will stop working.

See related developer blog post regarding the deprecation.

This PR is an attempt to get ahead of this issue so that you don't have issues opened on your repo and the integration continues to function.

Changes:

  • Explicitly import the desired functions (async_register, async_generate_url) from hass.components.webhook

Update (4/27/24):

Added additional commit to directly import load_platform function from discovery helper. Using hass.helpers will be deprecated starting with Home Assistant 2024.11.0 - See related developer blog post.

@RobertD502 RobertD502 changed the title Handle hass.components deprecation Handle hass.components deprecation, directly import discovery helper Apr 27, 2024
@robertgetch
Copy link

These changes work; may no longer be actively maint.

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

Successfully merging this pull request may close these issues.

2 participants