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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading GeneralToBixolonSpeed Converter")

class GeneralToBixolonSpeed(Converter):
	def Execute(self, myList=[], *args):
		res = 1.0
		if float(myList[0]) < 76.0:
			res = 76.2
		elif float(myList[0]) > 178.0:
			res = 177.8
		else:
			res = float(myList[0])
		return res




plugin = GeneralToBixolonSpeed("GeneralToBixolonSpeed")

store.AddConverter(plugin)