from .models import USBDevice as USBDevice
from collections.abc import Sequence
from homeassistant.helpers.service_info.usb import UsbServiceInfo as UsbServiceInfo
from homeassistant.loader import USBMatcher as USBMatcher
from serial.tools.list_ports_common import ListPortInfo as ListPortInfo

def usb_device_from_port(port: ListPortInfo) -> USBDevice: ...
def scan_serial_ports() -> Sequence[USBDevice]: ...
def usb_device_from_path(device_path: str) -> USBDevice | None: ...
def _fnmatch_lower(name: str | None, pattern: str) -> bool: ...
def usb_device_matches_matcher(device: USBDevice, matcher: USBMatcher) -> bool: ...
def usb_unique_id_from_service_info(usb_info: UsbServiceInfo) -> str: ...
def usb_service_info_from_device(usb_device: USBDevice) -> UsbServiceInfo: ...
