From 259bffc515a2855120d0f8ec7cd9c9286d4cebee Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 16 Oct 2023 16:10:17 +0200 Subject: [PATCH] switch: show a message on toggling the button To see more easily whether we have control. --- files/etc/gl-switch.d/sim.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/etc/gl-switch.d/sim.sh b/files/etc/gl-switch.d/sim.sh index 1ab62b1..f5aa840 100644 --- a/files/etc/gl-switch.d/sim.sh +++ b/files/etc/gl-switch.d/sim.sh @@ -1,16 +1,20 @@ #!/bin/sh +. /lib/functions/gl_util.sh + action=$1 logger -p notice -t blue-merle-toggle "Called... ${action}" if [ "$action" = "on" ];then + mcu_send_message "Blue Merle ${action}" echo "on" > /tmp/sim_change_switch elif [ "$action" = "off" ];then + mcu_send_message "Blue Merle ${action}" echo "off" > /tmp/sim_change_switch + else echo "off" > /tmp/sim_change_switch fi sleep 1 -