X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Extractor%2FExtractorScript.py;h=63f0111c98a89a4afe35dd15929cf10013f7754a;hb=91baad001ce2d84cf5eb1b5d3f62ce90a6c8b0a2;hp=1172b4e392a6d987c1ea764a0a74109fb268e9fd;hpb=dfb8324dab3d283394c1d672657c8c7f276f2789;p=smartthings-infrastructure.git diff --git a/Extractor/ExtractorScript.py b/Extractor/ExtractorScript.py index 1172b4e..63f0111 100644 --- a/Extractor/ExtractorScript.py +++ b/Extractor/ExtractorScript.py @@ -15,7 +15,6 @@ app2Subscribe = False # Mapping for event type and number of events # e.g., switch has 2 events: on and off eventTypeCounterMap = {'lock': 2, - 'unlock' : 1, 'nfcTouch' : 1, 'app' : 1, 'button' : 2, @@ -76,7 +75,6 @@ eventTypesMap = {'alarm.both': 'alarm', 'mode.away' : 'location', 'mode.home' : 'location', 'mode.night' : 'location', - 'unlock' : 'lock', 'lock.locked' : 'lock', 'lock.unlocked' : 'lock', 'motion.active' : 'motion', @@ -214,7 +212,10 @@ def ExtractFunctions(F, appName): #print "DEBUG: %s - %s" % (variable, Temp) #print capabilityMap #print "DEBUG: location variable: %s" % Temp - + + #This is a bogus event, just skip it... + if Temp == "unlock": + continue #Translate and reduce through mapping if Temp in eventTypesMap.keys(): Temp = eventTypesMap[Temp]