Namespaces | |
| const | |
| models | |
| utils | |
Classes | |
| class | USBCallbackMatcher |
| class | USBDiscovery |
| class | UsbServiceInfo |
Functions | |
| bool | _fnmatch_lower (str|None name, str pattern) |
| bool | _is_matching (USBDevice device, USBMatcher|USBCallbackMatcher matcher) |
| bool | async_is_plugged_in (HomeAssistant hass, USBCallbackMatcher matcher) |
| CALLBACK_TYPE | async_register_initial_scan_callback (HomeAssistant hass, CALLBACK_TYPE callback) |
| CALLBACK_TYPE | async_register_scan_request_callback (HomeAssistant hass, CALLBACK_TYPE callback) |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
| str | get_serial_by_id (str dev_path) |
| str | human_readable_device_name (str device, str|None serial_number, str|None manufacturer, str|None description, str|None vid, str|None pid) |
| None | websocket_usb_scan (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
Variables | |
| list | __all__ |
| _LOGGER = logging.getLogger(__name__) | |
| CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) | |
| int | REQUEST_SCAN_COOLDOWN = 60 |
The USB Discovery integration.
|
private |
Match a lowercase version of the name.
Definition at line 161 of file __init__.py.
|
private |
Return True if a device matches.
Definition at line 168 of file __init__.py.
| bool homeassistant.components.usb.async_is_plugged_in | ( | HomeAssistant | hass, |
| USBCallbackMatcher | matcher | ||
| ) |
Return True is a USB device is present.
Definition at line 80 of file __init__.py.
| CALLBACK_TYPE homeassistant.components.usb.async_register_initial_scan_callback | ( | HomeAssistant | hass, |
| CALLBACK_TYPE | callback | ||
| ) |
Register to receive a callback when the initial USB scan is done. If the initial scan is already done, the callback is called immediately.
Definition at line 68 of file __init__.py.
| CALLBACK_TYPE homeassistant.components.usb.async_register_scan_request_callback | ( | HomeAssistant | hass, |
| CALLBACK_TYPE | callback | ||
| ) |
Register to receive a callback when a scan should be initiated.
Definition at line 59 of file __init__.py.
| bool homeassistant.components.usb.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up the USB Discovery integration.
Definition at line 150 of file __init__.py.
| str homeassistant.components.usb.get_serial_by_id | ( | str | dev_path | ) |
Return a /dev/serial/by-id match for given device if available.
Definition at line 138 of file __init__.py.
| str homeassistant.components.usb.human_readable_device_name | ( | str | device, |
| str | None | serial_number, | ||
| str | None | manufacturer, | ||
| str | None | description, | ||
| str | None | vid, | ||
| str | None | pid | ||
| ) |
Return a human readable name from USBDevice attributes.
Definition at line 119 of file __init__.py.
| None homeassistant.components.usb.websocket_usb_scan | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Scan for new usb devices.
Definition at line 428 of file __init__.py.
|
private |
Definition at line 44 of file __init__.py.
|
private |
Definition at line 40 of file __init__.py.
| homeassistant.components.usb.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) |
Definition at line 51 of file __init__.py.
| int homeassistant.components.usb.REQUEST_SCAN_COOLDOWN = 60 |
Definition at line 42 of file __init__.py.