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 6ed6dc7790b1599c9eccc7d3cf05ad63aaa28f3a..811bde42dab3afb0e54b3aafa6243c2c2c6d5348 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()