import aiounifi
from _typeshed import Incomplete
from datetime import datetime
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
from homeassistant.helpers.event import async_call_later as async_call_later, async_track_time_interval as async_track_time_interval

class UnifiEntityHelper:
    hass: Incomplete
    api: Incomplete
    _device_command: Incomplete
    _heartbeat: Incomplete
    def __init__(self, hass: HomeAssistant, api: aiounifi.Controller) -> None: ...
    def reset(self) -> None: ...
    def initialize(self) -> None: ...
    @property
    def signal_heartbeat(self) -> str: ...
    def update_heartbeat(self, unique_id: str, heartbeat_expire_time: datetime) -> None: ...
    def remove_heartbeat(self, unique_id: str) -> None: ...
    def queue_poe_port_command(self, device_id: str, port_idx: int, poe_mode: str) -> None: ...

class UnifiEntityHeartbeat:
    CHECK_HEARTBEAT_INTERVAL: Incomplete
    hass: Incomplete
    _cancel_heartbeat_check: Incomplete
    _heartbeat_time: Incomplete
    def __init__(self, hass: HomeAssistant) -> None: ...
    def reset(self) -> None: ...
    def initialize(self) -> None: ...
    @property
    def signal(self) -> str: ...
    def update(self, unique_id: str, heartbeat_expire_time: datetime) -> None: ...
    def remove(self, unique_id: str) -> None: ...
    def _check_for_stale(self, *_: datetime) -> None: ...

class UnifiDeviceCommand:
    COMMAND_DELAY: int
    hass: Incomplete
    api: Incomplete
    _command_queue: Incomplete
    _cancel_command: Incomplete
    def __init__(self, hass: HomeAssistant, api: aiounifi.Controller) -> None: ...
    def reset(self) -> None: ...
    def queue_poe_command(self, device_id: str, port_idx: int, poe_mode: str) -> None: ...
