See the custom code FAQ. It sounds as though you may have tried to paste a device type handler into the smart app section.