A live bird collage card for your Home Assistant dashboard.
Allow 'notify each new species' to be toggled too
ehpersonal3829ce93d30801
diff --git a/scripts/config.php b/scripts/config.phpindex 7f2b1fb4..6c4e73d6 100644--- a/scripts/config.php+++ b/scripts/config.php@@ -17,6 +17,11 @@ if(isset($_GET['apprise_notify_each_detection'])) {} else {$apprise_notify_each_detection = 0;}+if(isset($_GET['apprise_notify_each_species'])) {+ exec('sudo systemctl start pushed_notifications.service');+} else {+ exec('sudo systemctl stop pushed_notifications.service');+}@@ -122,7 +127,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}<input name="apprise_notification_title" type="text" value="<?php print($config['APPRISE_NOTIFICATION_TITLE']);?>" /><br><label for="apprise_notification_body">Notification Body (use variables $sciname, $comname, or $confidence): </label><input name="apprise_notification_body" type="text" value="<?php print($config['APPRISE_NOTIFICATION_BODY']);?>" /><br>- <input type="checkbox" name="apprise_notify_each_species" value="true" disabled checked>+ <input type="checkbox" name="apprise_notify_each_species" <?php $output = shell_exec("service pushed_notifications status"); if (!strpos($output, 'dead') !== false) { echo "checked"; } ?>><label for="apprise_notify_each_species">Notify each new species</label><br><input type="checkbox" name="apprise_notify_each_detection" <?php if($config['APPRISE_NOTIFY_EACH_DETECTION'] == 1) { echo "checked"; };?> ><label for="apprise_notify_each_detection">Notify each new detection</label><br><br>