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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading EnabledToBoolean Converter")

class EnabledToBoolean(Converter):
	def Execute(self, myList=[], *args):
		res = ""
		if myList[0] == "Enabled":
			res = True
		elif myList[0] == "Disabled":
			res = False
		return res




plugin = EnabledToBoolean("EnabledToBoolean")

store.AddConverter(plugin)