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.
This commit is contained in:
Ratatoskr 2024-02-08 16:01:53 +01:00
parent eb6911acf8
commit 0a77d93643
Signed by: Ratatoskr
GPG Key ID: 28B77439A6D78F4E

View File

@ -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