Feature:
+switch status light
This commit is contained in:
2020-12-26 10:51:54 +01:00
parent 2219d769e6
commit 96877df4dc

View File

@@ -323,7 +323,7 @@ option_13() {
# Mute OFF # Mute OFF
option_14() { option_14() {
#playing="Playing Deezer Flow..." <= Shazaaam playing=""
echo -e "\n\033[1m Mute OFF... \033[0m" echo -e "\n\033[1m Mute OFF... \033[0m"
sonos $loc $device mute off && sleep 2 sonos $loc $device mute off && sleep 2
} }
@@ -565,6 +565,34 @@ shazam() {
sleep 2.5 sleep 2.5
#read -p "< Press Enter>" #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 # Soco device Lists Menu