sonos.sh
Feature: +switch status light
This commit is contained in:
30
sonos.sh
30
sonos.sh
@@ -323,7 +323,7 @@ option_13() {
|
||||
|
||||
# Mute OFF
|
||||
option_14() {
|
||||
#playing="Playing Deezer Flow..." <= Shazaaam
|
||||
playing=""
|
||||
echo -e "\n\033[1m Mute OFF... \033[0m"
|
||||
sonos $loc $device mute off && sleep 2
|
||||
}
|
||||
@@ -566,6 +566,34 @@ shazam() {
|
||||
#read -p "< Press Enter>"
|
||||
}
|
||||
|
||||
# Switch status light
|
||||
led() {
|
||||
playing="Switch status light..."
|
||||
echo -e "\n\033[1m $playing \033[0m"
|
||||
|
||||
led=$(sonos $loc $device status_light)
|
||||
echo -e "Status light is ${bold}$led${reset}"
|
||||
|
||||
if [[ "$led" == "on" ]]; then
|
||||
|
||||
echo -e "${italic} ...Switching status light off${reset}"
|
||||
sleep 0.5
|
||||
sonos $loc $device status_light off
|
||||
status="OFF"
|
||||
#echo -e "Status light is ${bold}off${reset}"
|
||||
elif [[ "$led" == "off" ]]; then
|
||||
echo -e "${italic} ...Switching status light on${reset}"
|
||||
sleep 0.5
|
||||
sonos $loc $device status_light on
|
||||
status="ON"
|
||||
#echo -e "Status light is ${bold}on${reset}"
|
||||
fi
|
||||
|
||||
echo -e "Status light is ${bold}$status${reset}"
|
||||
playing="Status light $status..."
|
||||
sleep 1.5
|
||||
}
|
||||
|
||||
|
||||
# Soco device Lists Menu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user