from . import const as const
from _typeshed import Incomplete
from homeassistant.const import COMPRESSED_STATE_ATTRIBUTES as COMPRESSED_STATE_ATTRIBUTES, COMPRESSED_STATE_CONTEXT as COMPRESSED_STATE_CONTEXT, COMPRESSED_STATE_LAST_CHANGED as COMPRESSED_STATE_LAST_CHANGED, COMPRESSED_STATE_LAST_UPDATED as COMPRESSED_STATE_LAST_UPDATED, COMPRESSED_STATE_STATE as COMPRESSED_STATE_STATE
from homeassistant.core import Event as Event, State as State
from homeassistant.helpers.json import JSON_DUMP as JSON_DUMP
from homeassistant.util.json import find_paths_unserializable_data as find_paths_unserializable_data, format_unserializable_data as format_unserializable_data
from homeassistant.util.yaml.loader import JSON_TYPE as JSON_TYPE
from typing import Any, Final

_LOGGER: Final[Incomplete]
MINIMAL_MESSAGE_SCHEMA: Final[Incomplete]
BASE_COMMAND_MESSAGE_SCHEMA: Final[Incomplete]
IDEN_TEMPLATE: Final[str]
IDEN_JSON_TEMPLATE: Final[str]
STATE_DIFF_ADDITIONS: str
STATE_DIFF_REMOVALS: str
ENTITY_EVENT_ADD: str
ENTITY_EVENT_REMOVE: str
ENTITY_EVENT_CHANGE: str

def result_message(iden: int, result: Any = ...) -> dict[str, Any]: ...
def error_message(iden: Union[int, None], code: str, message: str) -> dict[str, Any]: ...
def event_message(iden: Union[JSON_TYPE, int], event: Any) -> dict[str, Any]: ...
def cached_event_message(iden: int, event: Event) -> str: ...
def _cached_event_message(event: Event) -> str: ...
def cached_state_diff_message(iden: int, event: Event) -> str: ...
def _cached_state_diff_message(event: Event) -> str: ...
def _state_diff_event(event: Event) -> dict: ...
def _state_diff(old_state: State, new_state: State) -> dict[str, dict[str, dict[str, dict[str, Union[str, list[str]]]]]]: ...
def message_to_json(message: dict[str, Any]) -> str: ...
