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

Use imported websocket function async_register_command instead of accessing it directly #150

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

hmmbob
Copy link
Contributor

@hmmbob hmmbob commented Apr 5, 2024

Fix for

2024-03-01 08:51:31.990 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'plant' accesses hass.components.websocket_api. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from websocket_api directly at custom_components/plant/init.py, line 224: hass.components.websocket_api.async_register_command(ws_get_info)

Tested locally on HA 2024.4: works fine

Fixes #145

@Olen
Copy link
Owner

Olen commented Apr 5, 2024

@hmmbob
Copy link
Contributor Author

hmmbob commented Apr 5, 2024

The import was added, but not used (the changed code accessed the function directly instead)

edit: and for some reason they chose now to warn on it

@Olen
Copy link
Owner

Olen commented Apr 5, 2024

The import was added, but not used (the changed code accessed the function directly instead)

Yeah. I saw that. Wonder why I did that....

LGTM

@Olen Olen merged commit 6751f82 into Olen:master Apr 5, 2024
3 checks passed
@hmmbob hmmbob deleted the patch-1 branch April 5, 2024 11:20
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.

HA 2024.3 and above: Detected that custom integration 'plant' accesses hass.components.websocket_api
2 participants