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:
parent
eb6911acf8
commit
0a77d93643
@ -135,8 +135,10 @@ check_notification() {
|
|||||||
elif [[ $output == *"com.urbandroid.sleep"* && $output != *"AlarmKlaxon"* ]]; then
|
elif [[ $output == *"com.urbandroid.sleep"* && $output != *"AlarmKlaxon"* ]]; then
|
||||||
# Alarm turned off
|
# Alarm turned off
|
||||||
date && echo "Alarm turned off."
|
date && echo "Alarm turned off."
|
||||||
|
echo "$output"
|
||||||
ssh -i /root/.ssh/A72 root@$A72_ip 'killall mpv'
|
ssh -i /root/.ssh/A72 root@$A72_ip 'killall mpv'
|
||||||
iobroker state set zigbee.0.04cd15fffee03198.state false
|
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
|
exit # Exit the script when the alarm is turned off
|
||||||
else
|
else
|
||||||
# Phone unreachable
|
# Phone unreachable
|
||||||
@ -279,7 +281,6 @@ if [ $current_brightness -eq $end_brightness ] && [ $current_colortemp -eq $end_
|
|||||||
fi
|
fi
|
||||||
if [ "$alarm_dismissed" = true ]; then
|
if [ "$alarm_dismissed" = true ]; then
|
||||||
echo "Alarm dismissed"
|
echo "Alarm dismissed"
|
||||||
/root/iobroker_scripts/general/generate_text.sh # Call generate_text.sh script
|
|
||||||
exit # Exit the script when the alarm is dismissed
|
exit # Exit the script when the alarm is dismissed
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user