import clr
clr.AddReference('Soti.IoT.SemanticEngine.Conversions')

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading BrotherPJMediaSensorTypeToGeneric Converter")

class BrotherPJMediaSensorTypeToGeneric(Converter):

	def Execute(self, myList=[], *args):
		res = ""
		if int(myList[0]) <= 85:
			res = "None"
		elif int(myList[0]) <= 170:
			res = "Gap"
		elif int(myList[0]) <= 255:
			res = "Mark"
		return res




plugin = BrotherPJMediaSensorTypeToGeneric("BrotherPJMediaSensorTypeToGeneric")

store.AddConverter(plugin)