Device Dashboard for Dummies

great.
I will integrate it with maybe a slightly different version of the same idea

			var devicetype = device.device_type;
			if (device.device_type.startsWith('urn:schemas-dcineco-com:device:MSwitch')) {
				// replace MSwitchxxxxx by MSwitch
				var elems = device.device_type.split(':');
				elems[3] = "MSwitch";
				devicetype = elems.join(':');
			} 
			if (_devicetypesDB[ devicetype ]!=null && _devicetypesDB[ devicetype ].DeviceDrawFunc!=null) {
				devicebodyHtml+= Altui_ExecuteFunctionByName(_devicetypesDB[ devicetype ].DeviceDrawFunc, window, device);
			}
			else {
				devicebodyHtml+= _defaultDeviceDraw(device);
			}

I was wanting to find a more elegant solution vs my brute force approach. You found it. Thanks for the integration