from .entity import EsphomeEntity as EsphomeEntity, esphome_state_property as esphome_state_property, platform_async_setup_entry as platform_async_setup_entry
from .enum_mapper import EsphomeEnumMapper as EsphomeEnumMapper
from _typeshed import Incomplete
from aioesphomeapi import EntityInfo as EntityInfo, FanDirection, FanInfo, FanState
from homeassistant.components.fan import DIRECTION_FORWARD as DIRECTION_FORWARD, DIRECTION_REVERSE as DIRECTION_REVERSE, FanEntity as FanEntity, FanEntityFeature as FanEntityFeature
from homeassistant.config_entries import ConfigEntry as ConfigEntry
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
from homeassistant.util.percentage import ordered_list_item_to_percentage as ordered_list_item_to_percentage, percentage_to_ordered_list_item as percentage_to_ordered_list_item, percentage_to_ranged_value as percentage_to_ranged_value, ranged_value_to_percentage as ranged_value_to_percentage
from typing import Any

ORDERED_NAMED_FAN_SPEEDS: Incomplete

async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...

_FAN_DIRECTIONS: EsphomeEnumMapper[FanDirection, str]

class EsphomeFan(EsphomeEntity[FanInfo, FanState], FanEntity):
    _supports_speed_levels: bool
    async def async_set_percentage(self, percentage: int) -> None: ...
    async def _async_set_percentage(self, percentage: int | None) -> None: ...
    async def async_turn_on(self, percentage: int | None = None, preset_mode: str | None = None, **kwargs: Any) -> None: ...
    async def async_turn_off(self, **kwargs: Any) -> None: ...
    async def async_oscillate(self, oscillating: bool) -> None: ...
    async def async_set_direction(self, direction: str) -> None: ...
    async def async_set_preset_mode(self, preset_mode: str) -> None: ...
    @property
    def is_on(self) -> bool | None: ...
    @property
    def percentage(self) -> int | None: ...
    @property
    def oscillating(self) -> bool | None: ...
    @property
    def current_direction(self) -> str | None: ...
    @property
    def preset_mode(self) -> str | None: ...
    _attr_supported_features: Incomplete
    _attr_preset_modes: Incomplete
    _attr_speed_count: Incomplete
    def _on_static_info_update(self, static_info: EntityInfo) -> None: ...
