From e08fb02a4b5abae7d086d02e133e46deb00e79e2 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Mon, 5 Aug 2019 17:24:03 -0700 Subject: [PATCH] Update sonos-music-modes.groovy --- official/sonos-music-modes.groovy | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/official/sonos-music-modes.groovy b/official/sonos-music-modes.groovy index 29591db..f4ecdcc 100755 --- a/official/sonos-music-modes.groovy +++ b/official/sonos-music-modes.groovy @@ -17,6 +17,28 @@ */ +definition( + name: "Sonos Music Modes", + namespace: "smartthings", + author: "SmartThings", + description: "Plays a different selected song or station for each mode.", + category: "SmartThings Internal", + iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png", + iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png" +) + +preferences { + page(name: "mainPage", title: "Play a message on your Sonos when something happens", nextPage: "chooseTrack", uninstall: true) + page(name: "chooseTrack", title: "Select a song", install: true) + page(name: "timeIntervalInput", title: "Only during a certain time") { + section { + input "starting", "time", title: "Starting", required: false + input "ending", "time", title: "Ending", required: false + } + } +} + + private songOptions() { // Make sure current selection is in the set @@ -76,26 +98,6 @@ private saveSelectedSongs() { } } -definition( - name: "Sonos Music Modes", - namespace: "smartthings", - author: "SmartThings", - description: "Plays a different selected song or station for each mode.", - category: "SmartThings Internal", - iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png", - iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png" -) - -preferences { - page(name: "mainPage", title: "Play a message on your Sonos when something happens", nextPage: "chooseTrack", uninstall: true) - page(name: "chooseTrack", title: "Select a song", install: true) - page(name: "timeIntervalInput", title: "Only during a certain time") { - section { - input "starting", "time", title: "Starting", required: false - input "ending", "time", title: "Ending", required: false - } - } -} def mainPage() { dynamicPage(name: "mainPage") { -- 2.34.1