From 6e85f90447d825929af9ea4b0aa79dff365c299b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 16 Apr 2025 10:51:59 -1000 Subject: [PATCH] reduce --- homeassistant/components/dhcp/__init__.py | 24 ----------------------- homeassistant/components/dhcp/helpers.py | 6 +++++- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/homeassistant/components/dhcp/__init__.py b/homeassistant/components/dhcp/__init__.py index 9d073abb3b5..76d11f22424 100644 --- a/homeassistant/components/dhcp/__init__.py +++ b/homeassistant/components/dhcp/__init__.py @@ -37,7 +37,6 @@ from homeassistant.const import ( STATE_HOME, ) from homeassistant.core import ( - CALLBACK_TYPE, Event, EventStateChangedData, HomeAssistant, @@ -121,29 +120,6 @@ def async_index_integration_matchers( ) -@callback -def async_register_dhcp_callback_internal( - hass: HomeAssistant, - callback_: Callable[[dict[str, DHCPAddressData]], None], -) -> CALLBACK_TYPE: - """Register a dhcp callback. - - For internal use only. - This is not intended for use by integrations. - """ - callbacks = hass.data[DATA_DHCP].callbacks - callbacks.add(callback_) - return partial(callbacks.remove, callback_) - - -@callback -def async_get_address_data_internal( - hass: HomeAssistant, -) -> dict[str, DHCPAddressData]: - """Get the address data.""" - return hass.data[DATA_DHCP].address_data - - async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the dhcp component.""" integration_matchers = async_index_integration_matchers(await async_get_dhcp(hass)) diff --git a/homeassistant/components/dhcp/helpers.py b/homeassistant/components/dhcp/helpers.py index 7c3f7cf8d95..e5ab767ee71 100644 --- a/homeassistant/components/dhcp/helpers.py +++ b/homeassistant/components/dhcp/helpers.py @@ -29,5 +29,9 @@ def async_register_dhcp_callback_internal( def async_get_address_data_internal( hass: HomeAssistant, ) -> dict[str, DHCPAddressData]: - """Get the address data.""" + """Get the address data. + + For internal use only. + This is not intended for use by integrations. + """ return hass.data[DATA_DHCP].address_data