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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading SewooDarknessToPercent_Neg127To127 Converter")

class SewooDarknessToPercent_Neg127To127(Converter):

	def Execute(self, myList = [], *args):
		return round(int(100 * (int(myList[0]) + 127) / (254)))




plugin = SewooDarknessToPercent_Neg127To127("SewooDarknessToPercent_Neg127To127")

store.AddConverter(plugin)