import voluptuous as vol
from . import PyNUTData as PyNUTData
from .const import DEFAULT_HOST as DEFAULT_HOST, DEFAULT_PORT as DEFAULT_PORT, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DOMAIN as DOMAIN
from _typeshed import Incomplete
from collections.abc import Mapping
from homeassistant import exceptions as exceptions
from homeassistant.components import zeroconf as zeroconf
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, OptionsFlow as OptionsFlow
from homeassistant.const import CONF_ALIAS as CONF_ALIAS, CONF_BASE as CONF_BASE, CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, CONF_USERNAME as CONF_USERNAME
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.data_entry_flow import FlowResult as FlowResult
from typing import Any

_LOGGER: Incomplete

def _base_schema(discovery_info: zeroconf.ZeroconfServiceInfo | None) -> vol.Schema: ...
def _ups_schema(ups_list: dict[str, str]) -> vol.Schema: ...
async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, Any]: ...
def _format_host_port_alias(user_input: Mapping[str, Any]) -> str: ...

class NutConfigFlow(ConfigFlow, domain=DOMAIN):
    VERSION: int
    nut_config: Incomplete
    discovery_info: Incomplete
    ups_list: Incomplete
    title: Incomplete
    def __init__(self) -> None: ...
    async def async_step_zeroconf(self, discovery_info: zeroconf.ZeroconfServiceInfo) -> FlowResult: ...
    async def async_step_user(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_ups(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    def _host_port_alias_already_configured(self, user_input: dict[str, Any]) -> bool: ...
    async def _async_validate_or_error(self, config: dict[str, Any]) -> tuple[dict[str, Any], dict[str, str]]: ...
    @staticmethod
    def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlow: ...

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: ...

class CannotConnect(exceptions.HomeAssistantError): ...
