From 110cd32dc301e94697c7aa13fcf864b89f40c3ae Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 12 Dec 2017 10:41:05 +0100 Subject: [PATCH] Update hardware.py (#275) --- hassio/hardware.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hassio/hardware.py b/hassio/hardware.py index 09be04acc..ef296dd4e 100644 --- a/hassio/hardware.py +++ b/hassio/hardware.py @@ -20,6 +20,7 @@ PROC_STAT = Path("/proc/stat") RE_BOOT_TIME = re.compile(r"btime (\d+)") GPIO_DEVICES = Path("/sys/class/gpio") +RE_TTY = re.compile(r"tty[A-Z]+") class Hardware(object): @@ -34,7 +35,7 @@ class Hardware(object): """Return all serial and connected devices.""" dev_list = set() for device in self.context.list_devices(subsystem='tty'): - if 'ID_VENDOR' in device: + if 'ID_VENDOR' in device or RE_TTY.match(device.device_node): dev_list.add(device.device_node) return dev_list