From 0a77d9364392415e80b240d93c866f61c7124ba5 Mon Sep 17 00:00:00 2001 From: Ratatoskr Date: Thu, 8 Feb 2024 16:01:53 +0100 Subject: [PATCH] Update wecker.sh script - Add an echo statement to output the current notification information when the alarm is turned off. - Call 'generate_text.sh' script from '/root/iobroker_scripts/general/' when the alarm is turned off, providing a visual notification update. - Remove the call to 'generate_text.sh' when the alarm is dismissed, as it is now handled when the alarm is turned off. --- wecker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wecker.sh b/wecker.sh index 3b48962..387376c 100755 --- a/wecker.sh +++ b/wecker.sh @@ -135,8 +135,10 @@ check_notification() { elif [[ $output == *"com.urbandroid.sleep"* && $output != *"AlarmKlaxon"* ]]; then # Alarm turned off date && echo "Alarm turned off." + echo "$output" ssh -i /root/.ssh/A72 root@$A72_ip 'killall mpv' iobroker state set zigbee.0.04cd15fffee03198.state false + /root/iobroker_scripts/general/generate_text.sh # Call generate_text.sh script exit # Exit the script when the alarm is turned off else # Phone unreachable @@ -279,7 +281,6 @@ if [ $current_brightness -eq $end_brightness ] && [ $current_colortemp -eq $end_ fi if [ "$alarm_dismissed" = true ]; then echo "Alarm dismissed" - /root/iobroker_scripts/general/generate_text.sh # Call generate_text.sh script exit # Exit the script when the alarm is dismissed fi done