diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index a8721720dfb..c9c75b0c04e 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -505,15 +505,14 @@ class HomeAssistantHTTP: self, url_path: str, path: str, cache_headers: bool = True ) -> None: """Register a folder or file to serve as a static path.""" - frame.report( + frame.report_usage( "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_paths(" f'[StaticPathConfig("{url_path}", "{path}", {cache_headers})])`; ' "This function will be removed in 2025.7", exclude_integrations={"http"}, - error_if_core=False, - error_if_integration=False, + core_behavior=frame.ReportBehavior.LOG, ) configs = [StaticPathConfig(url_path, path, cache_headers)] resources = self._make_static_resources(configs) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index f1748c6b7fb..09d09dbdf75 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -63,7 +63,7 @@ from .helpers.event import ( RANDOM_MICROSECOND_MIN, async_call_later, ) -from .helpers.frame import ReportBehavior, report, report_usage +from .helpers.frame import ReportBehavior, report_usage from .helpers.json import json_bytes, json_bytes_sorted, json_fragment from .helpers.typing import UNDEFINED, ConfigType, DiscoveryInfoType, UndefinedType from .loader import async_suggest_report_issue @@ -1191,14 +1191,13 @@ class FlowCancelledError(Exception): def _report_non_awaited_platform_forwards(entry: ConfigEntry, what: str) -> None: """Report non awaited platform forwards.""" - report( + report_usage( f"calls {what} for integration {entry.domain} with " f"title: {entry.title} and entry_id: {entry.entry_id}, " f"during setup without awaiting {what}, which can cause " "the setup lock to be released before the setup is done. " "This will stop working in Home Assistant 2025.1", - error_if_integration=False, - error_if_core=False, + core_behavior=ReportBehavior.LOG, ) @@ -1266,10 +1265,8 @@ class ConfigEntriesFlowManager( SOURCE_RECONFIGURE, } and "entry_id" not in context: # Deprecated in 2024.12, should fail in 2025.12 - report( + report_usage( f"initialises a {source} flow without a link to the config entry", - error_if_integration=False, - error_if_core=True, ) flow_id = ulid_util.ulid_now() @@ -2321,14 +2318,13 @@ class ConfigEntries: multiple platforms at once and is more efficient since it does not require a separate import executor job for each platform. """ - report( + report_usage( "calls async_forward_entry_setup for " f"integration, {entry.domain} with title: {entry.title} " f"and entry_id: {entry.entry_id}, which is deprecated and " "will stop working in Home Assistant 2025.6, " "await async_forward_entry_setups instead", - error_if_core=False, - error_if_integration=False, + core_behavior=ReportBehavior.LOG, ) if not entry.setup_lock.locked(): async with entry.setup_lock: diff --git a/homeassistant/helpers/event.py b/homeassistant/helpers/event.py index 61a798dbd75..779cd8d5108 100644 --- a/homeassistant/helpers/event.py +++ b/homeassistant/helpers/event.py @@ -224,10 +224,10 @@ def async_track_state_change( Must be run within the event loop. """ - frame.report( + frame.report_usage( "calls `async_track_state_change` instead of `async_track_state_change_event`" " which is deprecated and will be removed in Home Assistant 2025.5", - error_if_core=False, + core_behavior=frame.ReportBehavior.LOG, ) if from_state is not None: diff --git a/homeassistant/util/async_.py b/homeassistant/util/async_.py index d010d8cb341..f8901d11114 100644 --- a/homeassistant/util/async_.py +++ b/homeassistant/util/async_.py @@ -39,7 +39,7 @@ def create_eager_task[_T]( # pylint: disable-next=import-outside-toplevel from homeassistant.helpers import frame - frame.report("attempted to create an asyncio task from a thread") + frame.report_usage("attempted to create an asyncio task from a thread") raise return Task(coro, loop=loop, name=name, eager_start=True)