from .const import CONF_ALLOW_SERVICE_CALLS as CONF_ALLOW_SERVICE_CALLS, CONF_DEVICE_NAME as CONF_DEVICE_NAME, CONF_NOISE_PSK as CONF_NOISE_PSK, DEFAULT_ALLOW_SERVICE_CALLS as DEFAULT_ALLOW_SERVICE_CALLS, DEFAULT_NEW_CONFIG_ALLOW_ALLOW_SERVICE_CALLS as DEFAULT_NEW_CONFIG_ALLOW_ALLOW_SERVICE_CALLS, DOMAIN as DOMAIN
from .dashboard import async_get_or_create_dashboard_manager as async_get_or_create_dashboard_manager, async_set_dashboard_info as async_set_dashboard_info
from _typeshed import Incomplete
from aioesphomeapi import DeviceInfo as DeviceInfo
from collections.abc import Mapping
from homeassistant.components import dhcp as dhcp, zeroconf as zeroconf
from homeassistant.components.hassio import HassioServiceInfo as HassioServiceInfo
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, OptionsFlow as OptionsFlow
from homeassistant.const import CONF_HOST as CONF_HOST, CONF_NAME as CONF_NAME, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT
from homeassistant.core import callback as callback
from homeassistant.data_entry_flow import FlowResult as FlowResult
from homeassistant.helpers.device_registry import format_mac as format_mac
from typing import Any

ERROR_REQUIRES_ENCRYPTION_KEY: str
ERROR_INVALID_ENCRYPTION_KEY: str
ESPHOME_URL: str
_LOGGER: Incomplete
ZERO_NOISE_PSK: str

class EsphomeFlowHandler(ConfigFlow, domain=DOMAIN):
    VERSION: int
    _host: Incomplete
    _port: Incomplete
    _password: Incomplete
    _noise_required: Incomplete
    _noise_psk: Incomplete
    _device_info: Incomplete
    _reauth_entry: Incomplete
    _device_name: Incomplete
    def __init__(self) -> None: ...
    async def _async_step_user_base(self, user_input: dict[str, Any] | None = None, error: str | None = None) -> FlowResult: ...
    async def async_step_user(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult: ...
    async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    @property
    def _name(self) -> str | None: ...
    @_name.setter
    def _name(self, value: str) -> None: ...
    async def _async_try_fetch_device_info(self) -> FlowResult: ...
    async def _async_authenticate_or_add(self) -> FlowResult: ...
    async def async_step_discovery_confirm(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_zeroconf(self, discovery_info: zeroconf.ZeroconfServiceInfo) -> FlowResult: ...
    async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult: ...
    async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> FlowResult: ...
    def _async_get_entry(self) -> FlowResult: ...
    async def async_step_encryption_key(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_authenticate(self, user_input: dict[str, Any] | None = None, error: str | None = None) -> FlowResult: ...
    async def fetch_device_info(self) -> str | None: ...
    async def try_login(self) -> str | None: ...
    async def _retrieve_encryption_key_from_dashboard(self) -> bool: ...
    @staticmethod
    def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlowHandler: ...

class OptionsFlowHandler(OptionsFlow):
    config_entry: Incomplete
    def __init__(self, config_entry: ConfigEntry) -> None: ...
    async def async_step_init(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
