Update sonos-music-modes.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Tue, 6 Aug 2019 01:09:58 +0000 (18:09 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Tue, 6 Aug 2019 01:09:58 +0000 (18:09 -0700)
official/sonos-music-modes.groovy

index 6ed6dc7..811bde4 100755 (executable)
@@ -134,9 +134,9 @@ def mainPage() {
                        href "timeIntervalInput", title: "Only during a certain time"
                        input "days", "enum", title: "Only on certain days of the week", multiple: true, required: false,
                                options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
-                       if (settings.modes) {
+                       //if (settings.modes) {
                input "modes", "mode", title: "Only when mode is", multiple: true, required: false
-            }
+          //  }
                        input "oncePerDay", "bool", title: "Only once per day", required: false, defaultValue: false
                }
        }
@@ -176,7 +176,7 @@ def modeChangeHandler(evt) {
 private takeAction(evt) {
 
        def name = "mode_$evt.value".toString()
-       def selectedSong = state.selectedSongs."$name"
+       def selectedSong = state.selectedSongs
 
        if (selectedSong == "PAUSE") {
                sonos.stop()