[tinyusb] Add on_mount/on_unmount triggers and is_mounted condition (#19067)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Keith Burzinski
2026-09-14 21:16:14 +00:00
committed by GitHub
co-authored by Claude Fable 5.1
parent 588ad529e0
commit 328077c4f8
7 changed files with 141 additions and 5 deletions
+9
View File
@@ -6,6 +6,15 @@ tinyusb:
usb_product_str: ESPHomeTestProduct
usb_serial_str: ESPHomeTestSerialNumber
usb_vendor_id: 0x2345
on_mount:
- logger.log: USB host mounted
- if:
condition:
tinyusb.is_mounted:
then:
- logger.log: USB host is mounted
on_unmount:
- logger.log: USB host unmounted
# tinyusb requires at least one USB class companion; usb_cdc_acm satisfies that.
usb_cdc_acm: