diff --git a/supervisor/hardware/helper.py b/supervisor/hardware/helper.py index 45844e922..55a0443d3 100644 --- a/supervisor/hardware/helper.py +++ b/supervisor/hardware/helper.py @@ -17,7 +17,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) _PROC_STAT: Path = Path("/proc/stat") _RE_BOOT_TIME: re.Pattern = re.compile(r"btime (\d+)") -_RE_HIDE_SYSFS: re.Pattern = re.compile(r"/sys/devices/virtual/(?:tty|block)/.*") +_RE_HIDE_SYSFS: re.Pattern = re.compile(r"/sys/devices/virtual/(?:tty|block|vc)/.*") class HwHelper(CoreSysAttributes): diff --git a/tests/hardware/test_helper.py b/tests/hardware/test_helper.py index 1a6fa07f6..65b938057 100644 --- a/tests/hardware/test_helper.py +++ b/tests/hardware/test_helper.py @@ -69,7 +69,10 @@ def test_hide_virtual_device(coresys): udev_device.sys_path = "/sys/devices/virtual/block/test" assert coresys.hardware.helper.hide_virtual_device(udev_device) - udev_device.sys_path = "/sys/devices/virtual/tty/test" + udev_device.sys_path = "/sys/devices/virtual/tty/tty1" + assert coresys.hardware.helper.hide_virtual_device(udev_device) + + udev_device.sys_path = "/sys/devices/virtual/vc/vcs1" assert coresys.hardware.helper.hide_virtual_device(udev_device)