mirror of
https://github.com/home-assistant/core.git
synced 2026-05-31 20:54:23 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
27 lines
596 B
Python
27 lines
596 B
Python
"""Models helper class for the usb integration."""
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(slots=True, frozen=True, kw_only=True)
|
|
class SerialDevice:
|
|
"""A serial device."""
|
|
|
|
device: str
|
|
serial_number: str | None
|
|
manufacturer: str | None
|
|
description: str | None
|
|
interface_description: str | None = None
|
|
interface_num: int | None = None
|
|
|
|
|
|
@dataclass(slots=True, frozen=True, kw_only=True)
|
|
class USBDevice(SerialDevice):
|
|
"""A usb device."""
|
|
|
|
vid: str
|
|
pid: str
|
|
|
|
# bcdDevice descriptor, often the firmware revision
|
|
bcd_device: int | None = None
|