from _typeshed import Incomplete
from collections.abc import Callable, Coroutine
from homeassistant.core import HassJob as HassJob, HassJobType as HassJobType, HomeAssistant as HomeAssistant, callback as callback, get_hassjob_callable_job_type as get_hassjob_callable_job_type
from homeassistant.loader import bind_hass as bind_hass
from homeassistant.util.async_ import run_callback_threadsafe as run_callback_threadsafe
from homeassistant.util.logging import catch_log_exception as catch_log_exception, log_exception as log_exception
from homeassistant.util.signal_type import SignalType as SignalType
from typing import Any, overload

_LOGGER: Incomplete
DATA_DISPATCHER: str
_DispatcherDataType: Incomplete

@overload
def dispatcher_connect(hass: HomeAssistant, signal: SignalType[Unpack[_Ts]], target: Callable[[Unpack[_Ts]], None]) -> Callable[[], None]: ...
@overload
def dispatcher_connect(hass: HomeAssistant, signal: str, target: Callable[..., None]) -> Callable[[], None]: ...
def _async_remove_dispatcher(dispatchers: _DispatcherDataType[Unpack[_Ts]], signal: SignalType[Unpack[_Ts]] | str, target: Callable[[Unpack[_Ts]], Any] | Callable[..., Any]) -> None: ...
@overload
def async_dispatcher_connect(hass: HomeAssistant, signal: SignalType[Unpack[_Ts]], target: Callable[[Unpack[_Ts]], Any]) -> Callable[[], None]: ...
@overload
def async_dispatcher_connect(hass: HomeAssistant, signal: str, target: Callable[..., Any]) -> Callable[[], None]: ...
@overload
def dispatcher_send(hass: HomeAssistant, signal: SignalType[Unpack[_Ts]], *args: Unpack[_Ts]) -> None: ...
@overload
def dispatcher_send(hass: HomeAssistant, signal: str, *args: Any) -> None: ...
def _format_err(signal: SignalType[Unpack[_Ts]] | str, target: Callable[[Unpack[_Ts]], Any] | Callable[..., Any], *args: Any) -> str: ...
def _generate_job(signal: SignalType[Unpack[_Ts]] | str, target: Callable[[Unpack[_Ts]], Any] | Callable[..., Any]) -> HassJob[..., Coroutine[Any, Any, None] | None]: ...
@overload
def async_dispatcher_send(hass: HomeAssistant, signal: SignalType[Unpack[_Ts]], *args: Unpack[_Ts]) -> None: ...
@overload
def async_dispatcher_send(hass: HomeAssistant, signal: str, *args: Any) -> None: ...
def async_dispatcher_send_internal(hass: HomeAssistant, signal: SignalType[Unpack[_Ts]] | str, *args: Unpack[_Ts]) -> None: ...
