diff --git a/light9/collector/weblisteners.py b/light9/collector/weblisteners.py --- a/light9/collector/weblisteners.py +++ b/light9/collector/weblisteners.py @@ -10,6 +10,10 @@ from light9.newtypes import (DeviceUri, log = logging.getLogger('weblisteners') +def shortenOutput(out: OutputUri) -> str: + return str(out).rstrip('/').rsplit('/', 1)[-1] + + class UiListener(Protocol): async def sendMessage(self, msg): @@ -78,7 +82,7 @@ class WebListeners(object): for attr, val in attrs.items(): outputUri, bufIndex = outputMap[(dev, attr)] dmxIndex = DmxIndex(bufIndex + 1) - attrRows.append({'attr': attr.rsplit('/')[-1], 'val': val, 'chan': (outputUri, dmxIndex)}) + attrRows.append({'attr': attr.rsplit('/')[-1], 'val': val, 'chan': (shortenOutput(outputUri), dmxIndex)}) attrRows.sort(key=lambda r: r['chan']) for row in attrRows: row['chan'] = '%s %s' % (row['chan'][0], row['chan'][1])