From: Rahmadi Trimananda Date: Thu, 15 Aug 2019 15:52:52 +0000 (-0700) Subject: Update Switches.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a383e340f9842963c422033f78004deb9d25460d;p=smartapps.git Update Switches.groovy --- 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) }