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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading MicroplexDarknessToPercent Converter")

class MicroplexDarknessToPercent(Converter):
	def Execute(self, myList=[], *args):
		return round(int(100 * (int(int(myList[0])-10)) / 110))




plugin = MicroplexDarknessToPercent("MicroplexDarknessToPercent")

store.AddConverter(plugin)