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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading PercentToBixolonDarkness Converter")

class PercentToBixolonDarkness(Converter):

    def Execute(self, args):
        return max(1, round(int(args[0])/100.0*30))




plugin = PercentToBixolonDarkness("PercentToBixolonDarkness")

store.AddConverter(plugin)