From e77888cb4d37fc1552bdeec70675ee138d1def73 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Thu, 15 Aug 2019 15:24:23 -0700 Subject: [PATCH] Update speaker-mood-music.groovy --- official/speaker-mood-music.groovy | 40 ++++++++++++++---------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/official/speaker-mood-music.groovy b/official/speaker-mood-music.groovy index d5cbe78..d7fe147 100755 --- a/official/speaker-mood-music.groovy +++ b/official/speaker-mood-music.groovy @@ -15,7 +15,26 @@ * Author: SmartThings * Date: 2014-02-12 */ +definition( + name: "Speaker Mood Music", + namespace: "smartthings", + author: "SmartThings", + description: "Plays a selected song or station.", + category: "SmartThings Labs", + 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 selected song or station on your Speaker 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() { @@ -64,27 +83,6 @@ private saveSelectedSong() { } } -definition( - name: "Speaker Mood Music", - namespace: "smartthings", - author: "SmartThings", - description: "Plays a selected song or station.", - category: "SmartThings Labs", - 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 selected song or station on your Speaker 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 - } - } -} - // input "motion", "capability.motionSensor", title: "Motion Here", required: false, multiple: true // input "contact", "capability.contactSensor", title: "Contact Opens", required: false, multiple: true // input "contactClosed", "capability.contactSensor", title: "Contact Closes", required: false, multiple: true -- 2.34.1