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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading cabDarknessToPercent Converter")

class cabDarknessToPercent(Converter):

    def Execute(self, args):
        return round(int(100 * (int(args[0]) + 20) / (20 + 20)))




plugin = cabDarknessToPercent("cabDarknessToPercent")

store.AddConverter(plugin)