Skip to content

A live bird collage card for your Home Assistant dashboard.

fix: remove un-needed removal of quote characters, we handle them fine nowadays

frederikc6cb753e25e8
diff --git a/scripts/utils/notifications.py b/scripts/utils/notifications.py
index e0c79b74..a12e819f 100644
--- a/scripts/utils/notifications.py
+++ b/scripts/utils/notifications.py
@@ -138,7 +138,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path,
today = datetime.now().strftime("%Y-%m-%d")
cur.execute(f"SELECT DISTINCT(Com_Name), COUNT(Com_Name) FROM detections WHERE Date = DATE('{today}') GROUP BY Com_Name")
known_species = cur.fetchall()
- detections = [d[1] for d in known_species if d[0] == comName.replace("'", "")]
+ detections = [d[1] for d in known_species if d[0] == comName]
numberDetections = 0
if len(detections):
numberDetections = detections[0]
@@ -161,7 +161,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path,
today = datetime.now().strftime("%Y-%m-%d")
cur.execute(f"SELECT DISTINCT(Com_Name), COUNT(Com_Name) FROM detections WHERE Date >= DATE('{today}', '-7 day') GROUP BY Com_Name")
known_species = cur.fetchall()
- detections = [d[1] for d in known_species if d[0] == comName.replace("'", "")]
+ detections = [d[1] for d in known_species if d[0] == comName]
numberDetections = 0
if len(detections):
numberDetections = detections[0]