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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading GeneralToBixolonSpeed Converter")

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




plugin = GeneralToBixolonSpeed("GeneralToBixolonSpeed")

store.AddConverter(plugin)