mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 17:18:23 +00:00
Adjust deprecation message
This commit is contained in:
parent
b01cc38bc8
commit
415122a074
@ -149,12 +149,14 @@ def deprecate_hass_binding[**_P, _T](
|
||||
from homeassistant.core import HomeAssistant # noqa: PLC0415
|
||||
|
||||
if isinstance(args[0], HomeAssistant):
|
||||
_print_deprecation_warning(
|
||||
func,
|
||||
"without hass",
|
||||
_print_deprecation_warning_internal(
|
||||
"hass",
|
||||
func.__module__,
|
||||
f"{func.__name__} without hass argument",
|
||||
"argument",
|
||||
"called with hass as the first argument",
|
||||
f"passed to {func.__name__}",
|
||||
breaks_in_ha_version,
|
||||
log_when_no_integration_is_found=True,
|
||||
)
|
||||
args = args[1:] # type: ignore[assignment]
|
||||
return func(*args, **kwargs)
|
||||
|
@ -1712,8 +1712,9 @@ async def test_register_admin_service_return_response(
|
||||
|
||||
|
||||
_DEPRECATED_VERIFY_DOMAIN_CONTROL_MESSAGE = (
|
||||
"verify_domain_control is a deprecated argument which will be removed"
|
||||
" in HA Core 2026.2. Use without hass instead"
|
||||
"The deprecated argument hass was passed to verify_domain_control. It will be"
|
||||
" removed in HA Core 2026.2. Use verify_domain_control without hass argument"
|
||||
" instead"
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user