mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
reduce
This commit is contained in:
parent
b23b62b018
commit
6e85f90447
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user