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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading PercentTocabDarkness Converter")

class PercentTocabDarkness(Converter):

    def Execute(self, args):
        return int(round(((40) * ((int(args[0]) -1)/ 100.0)) -20))



plugin = PercentTocabDarkness("PercentTocabDarkness")

store.AddConverter(plugin)