From 702d53ca30e0f86f07a72d6efaef645d6cfee125 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 26 Jun 2024 20:55:25 +0200 Subject: [PATCH] Correct deprecation warning `async_register_static_paths` (#120592) --- homeassistant/components/http/__init__.py | 2 +- tests/components/http/test_init.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 38f0b628b2c..0d86ab57d3f 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -483,7 +483,7 @@ class HomeAssistantHTTP: frame.report( "calls hass.http.register_static_path which is deprecated because " "it does blocking I/O in the event loop, instead " - "call `await hass.http.async_register_static_path(" + "call `await hass.http.async_register_static_paths(" f'[StaticPathConfig("{url_path}", "{path}", {cache_headers})])`; ' "This function will be removed in 2025.7", exclude_integrations={"http"}, diff --git a/tests/components/http/test_init.py b/tests/components/http/test_init.py index 7a9fb329fcd..2895209b5f9 100644 --- a/tests/components/http/test_init.py +++ b/tests/components/http/test_init.py @@ -543,5 +543,5 @@ async def test_register_static_paths( "Detected code that calls hass.http.register_static_path " "which is deprecated because it does blocking I/O in the " "event loop, instead call " - "`await hass.http.async_register_static_path" + "`await hass.http.async_register_static_paths" ) in caplog.text