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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading PercentToBixolonDarknessSRP_v2 Converter")

class PercentToBixolonDarknessSRP_v2(Converter):

    def Execute(self, args):
        raw_darkness = 75 + ((int(args[0]) / 100.0) * 45)
        return int(5 * round(raw_darkness / 5))

plugin = PercentToBixolonDarknessSRP_v2("PercentToBixolonDarknessSRP_v2")

store.AddConverter(plugin)