diff --git a/supervisor/misc/hardware.py b/supervisor/misc/hardware.py index 07db2fb75..72de4a15b 100644 --- a/supervisor/misc/hardware.py +++ b/supervisor/misc/hardware.py @@ -89,10 +89,9 @@ class Hardware: """Return all serial and connected devices.""" dev_list: List[Device] = [] for device in self.devices: - if ( - device.subsystem != "tty" - or "ID_VENDOR" not in device.attributes - or not RE_TTY.search(str(device.path)) + if device.subsystem != "tty" or ( + "ID_VENDOR" not in device.attributes + and not RE_TTY.search(str(device.path)) ): continue diff --git a/tests/misc/test_hardware.py b/tests/misc/test_hardware.py index 7ac2e1ece..246374991 100644 --- a/tests/misc/test_hardware.py +++ b/tests/misc/test_hardware.py @@ -58,6 +58,7 @@ def test_serial_devices(): assert [(device.name, device.links) for device in system.serial_devices] == [ ("ttyACM0", []), ("ttyUSB0", [Path("/dev/serial/by-id/xyx")]), + ("ttyS0", []), ]