In addition to numeric device IDs, it should also be possible to select devices by strings, e.g. device="hdmi".
I think it would be practical to use case-insensitive search, probably a space separated list of substring would also be useful, e.g. device="hdmi 1".
We could allow glob patterns and/or regular expressions, but I think that might be overkill.
If a string fits to several devices, an error should be raised.