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

Correction for https://github.com/home-assistant/core/issues/125260 via an injection of httpx_client from homeassistant #22

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

cnico
Copy link
Contributor

@cnico cnico commented Dec 2, 2024

Hi @fabaff ,
I propose you this small evolution in order to resolve the issue home-assistant/core#125260 in homeassistant that detects event_loop warning in used API for ssl context object (cf : https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs).
After digging how other integrations use httpx library, I found that the injection of the client from the core is the correct way of doing it.

It works well in latest homeassistant core on my pc.

After, you release the 1.3.0 version of netdata library, the small correction in homeassistant will be to upgrade netdata dependency and to inject the client via this line of code : netdata = NetdataData(Netdata(host, port=port, timeout=20.0, httpx_client=get_async_client(hass)))

I can do the PR on homeassistant core if you want.

If ou have any question, do not hesitate to ask me.

@fabaff
Copy link
Member

fabaff commented Dec 2, 2024

Thanks

I can do the PR on homeassistant core if you want.

Yes, please.

@fabaff fabaff merged commit 6c22ac3 into home-assistant-ecosystem:master Dec 2, 2024
3 checks passed
@cnico
Copy link
Contributor Author

cnico commented Dec 3, 2024

Did it here : home-assistant/core#132209

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