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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading NoConversionFloatRange50pt8To225 Converter")

class NoConversionFloatRange50pt8To225(Converter):

	def Execute(self, myList=[], *args):
		if myList == None or myList[0] == None:
			return

		MinBound = 50.8
		MaxBound = 225
		res = max(MinBound, min(float(myList[0]), MaxBound))
		return res




plugin = NoConversionFloatRange50pt8To225("NoConversionFloatRange50pt8To225")

store.AddConverter(plugin)