Add energy alert for <20%
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 1 Aug 2018 02:54:53 +0000 (22:54 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 1 Aug 2018 02:54:53 +0000 (22:54 -0400)
bin/khatus_controller

index 2b4fb07..411589d 100755 (executable)
@@ -145,6 +145,10 @@ function alert_check_energy(    from, dbg, state, remaining, subj, body) {
             subj = "Energy_Low"
             body = sprintf("%d%% Get the charger.", remaining)
             alert_trigger_hi(from, subj, body)
+        } else if (remaining < 20) {
+            subj = "Energy_Low"
+            body = sprintf("%d%% Get the charger.", remaining)
+            alert_trigger_med(from, subj, body)
         } else if (remaining < 50) {
             if (!state__alerts__energy__notified_bellow_half) {
                 state__alerts__energy__notified_bellow_half = 1
This page took 0.02089 seconds and 4 git commands to generate.