X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=third-party%2FSwitches.groovy;h=52549f2b284629208ae4f7aad8e6b4eca1189c59;hb=b51a1ebcdd2aad93864d307c21decb690d5ed645;hp=645fa432a7a8cec807ffc29b5295d96505c7146d;hpb=b284400d334f3e839cc17d6983f6182012077194;p=smartapps.git diff --git a/third-party/Switches.groovy b/third-party/Switches.groovy index 645fa43..52549f2 100755 --- a/third-party/Switches.groovy +++ b/third-party/Switches.groovy @@ -52,6 +52,7 @@ def initialize() { def switchHandler(evt) { def s = switches.find{ evt.deviceId == it.id } //def phrase = location.helloHome.getPhrases().find { it.label == s.displayName } + def phrase if (phrase) { location.helloHome.execute(phrase.label) }