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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading BixolonDarknessToPercentSRP Converter")

class BixolonDarknessToPercentSRP(Converter):

    def Execute(self, args):
        return round(max(1, ((int(args[0]) - 55.0) / 55.0) * 100))

plugin = BixolonDarknessToPercentSRP("BixolonDarknessToPercentSRP")

store.AddConverter(plugin)