extractedEvents.write(line)
event.close()
elif eventList[i] == "switch":
+
#Check which capability
variable = eventVarMap[eventList[i]]
if eventList[i] not in eventVarCounterMap.keys():
eventVarCounterMap[eventList[i]] = eventVarCount + 1
capability = capabilityMap[variable[eventVarCount]]
#Write two events subsequently
+ print("//////////////////////")
+ print(capability)
if capability == "capability.switch":
event = open("eventSimulator/switchOnEvent.groovy", "r")
elif capability == "capability.switchLevel":
event = open("eventSimulator/switchLevelEvent.groovy", "r")
elif capability == "capability.colorControl":
event = open("eventSimulator/colorLevelChangeEvent.groovy", "r")
+ elif capability == "capability.switch":
+ event = open("eventSimulator/switchLevelChangeEvent.groovy", "r")
for line in event:
extractedEvents.write(line)
event.close()