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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading GeneralToMicroplexSpeed Converter")

class GeneralToMicroplexSpeed(Converter):
    def Execute(self, myList=[], *args):
        if myList == None or myList[0] == None:
			return
        
        value = int(float(myList[0]) / 2.54)

        return value




plugin = GeneralToMicroplexSpeed("GeneralToMicroplexSpeed")

store.AddConverter(plugin)