import asyncio
from .const import DATA_COMPONENT as DATA_COMPONENT, DOMAIN as DOMAIN, VacuumActivity as VacuumActivity, VacuumEntityFeature as VacuumEntityFeature
from .websocket import async_register_websocket_handlers as async_register_websocket_handlers
from _typeshed import Incomplete
from dataclasses import dataclass
from homeassistant.config_entries import ConfigEntry as ConfigEntry
from homeassistant.const import ATTR_BATTERY_LEVEL as ATTR_BATTERY_LEVEL, ATTR_COMMAND as ATTR_COMMAND, SERVICE_TOGGLE as SERVICE_TOGGLE, SERVICE_TURN_OFF as SERVICE_TURN_OFF, SERVICE_TURN_ON as SERVICE_TURN_ON, STATE_ON as STATE_ON
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
from homeassistant.helpers.entity import Entity as Entity, EntityDescription as EntityDescription
from homeassistant.helpers.entity_component import EntityComponent as EntityComponent
from homeassistant.helpers.entity_platform import EntityPlatform as EntityPlatform
from homeassistant.helpers.frame import ReportBehavior as ReportBehavior, report_usage as report_usage
from homeassistant.helpers.icon import icon_for_battery_level as icon_for_battery_level
from homeassistant.helpers.typing import ConfigType as ConfigType
from homeassistant.loader import bind_hass as bind_hass
from propcache.api import cached_property
from typing import Any, final

_LOGGER: Incomplete
ENTITY_ID_FORMAT: Incomplete
PLATFORM_SCHEMA: Incomplete
PLATFORM_SCHEMA_BASE: Incomplete
SCAN_INTERVAL: Incomplete
ATTR_BATTERY_ICON: str
ATTR_CLEANED_AREA: str
ATTR_FAN_SPEED: str
ATTR_FAN_SPEED_LIST: str
ATTR_PARAMS: str
ATTR_STATUS: str
SERVICE_CLEAN_SPOT: str
SERVICE_CLEAN_AREA: str
SERVICE_LOCATE: str
SERVICE_RETURN_TO_BASE: str
SERVICE_SEND_COMMAND: str
SERVICE_SET_FAN_SPEED: str
SERVICE_START_PAUSE: str
SERVICE_START: str
SERVICE_PAUSE: str
SERVICE_STOP: str
DEFAULT_NAME: str
ISSUE_SEGMENTS_CHANGED: str
_BATTERY_DEPRECATION_IGNORED_PLATFORMS: Incomplete

@bind_hass
def is_on(hass: HomeAssistant, entity_id: str) -> bool: ...
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...

class StateVacuumEntityDescription(EntityDescription, frozen_or_thawed=True): ...

STATE_VACUUM_CACHED_PROPERTIES_WITH_ATTR_: Incomplete

class StateVacuumEntity(Entity, cached_properties=STATE_VACUUM_CACHED_PROPERTIES_WITH_ATTR_):
    entity_description: StateVacuumEntityDescription
    _entity_component_unrecorded_attributes: Incomplete
    _attr_battery_icon: str
    _attr_battery_level: int | None
    _attr_fan_speed: str | None
    _attr_fan_speed_list: list[str]
    _attr_activity: VacuumActivity | None
    _attr_supported_features: VacuumEntityFeature
    _segments_not_configured_issue_created: bool
    _segments_changed_last_seen: list[dict[str, Any]] | None
    __vacuum_legacy_battery_level: bool
    __vacuum_legacy_battery_icon: bool
    __vacuum_legacy_battery_feature: bool
    def __init_subclass__(cls, **kwargs: Any) -> None: ...
    def __setattr__(self, name: str, value: Any) -> None: ...
    @callback
    def add_to_platform_start(self, hass: HomeAssistant, platform: EntityPlatform, parallel_updates: asyncio.Semaphore | None) -> None: ...
    @callback
    def async_registry_entry_updated(self) -> None: ...
    @callback
    def _report_deprecated_battery_properties(self, property: str) -> None: ...
    @callback
    def _report_deprecated_battery_feature(self) -> None: ...
    @cached_property
    def battery_level(self) -> int | None: ...
    @property
    def battery_icon(self) -> str: ...
    @property
    def capability_attributes(self) -> dict[str, Any] | None: ...
    @cached_property
    def fan_speed(self) -> str | None: ...
    @cached_property
    def fan_speed_list(self) -> list[str]: ...
    @property
    def state_attributes(self) -> dict[str, Any]: ...
    @final
    @property
    def state(self) -> str | None: ...
    @cached_property
    def activity(self) -> VacuumActivity | None: ...
    @cached_property
    def supported_features(self) -> VacuumEntityFeature: ...
    def stop(self, **kwargs: Any) -> None: ...
    async def async_stop(self, **kwargs: Any) -> None: ...
    def return_to_base(self, **kwargs: Any) -> None: ...
    async def async_return_to_base(self, **kwargs: Any) -> None: ...
    def clean_spot(self, **kwargs: Any) -> None: ...
    async def async_clean_spot(self, **kwargs: Any) -> None: ...
    async def async_get_segments(self) -> list[Segment]: ...
    @final
    @property
    def last_seen_segments(self) -> list[Segment] | None: ...
    @final
    async def async_internal_clean_area(self, cleaning_area_id: list[str], **kwargs: Any) -> None: ...
    def clean_segments(self, segment_ids: list[str], **kwargs: Any) -> None: ...
    async def async_clean_segments(self, segment_ids: list[str], **kwargs: Any) -> None: ...
    @callback
    def async_create_segments_issue(self) -> None: ...
    @callback
    def _async_check_segments_issues(self) -> None: ...
    def locate(self, **kwargs: Any) -> None: ...
    async def async_locate(self, **kwargs: Any) -> None: ...
    def set_fan_speed(self, fan_speed: str, **kwargs: Any) -> None: ...
    async def async_set_fan_speed(self, fan_speed: str, **kwargs: Any) -> None: ...
    def send_command(self, command: str, params: dict[str, Any] | list[Any] | None = None, **kwargs: Any) -> None: ...
    async def async_send_command(self, command: str, params: dict[str, Any] | list[Any] | None = None, **kwargs: Any) -> None: ...
    def start(self) -> None: ...
    async def async_start(self) -> None: ...
    def pause(self) -> None: ...
    async def async_pause(self) -> None: ...

@dataclass(slots=True)
class Segment:
    id: str
    name: str
    group: str | None = ...
