From 30f376f41b6bf11d567c31140b68d483cb0bec8f Mon Sep 17 00:00:00 2001 From: The-Dark-Mode <167715404+The-Dark-Mode@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:08:58 +1300 Subject: [PATCH] changed frigate_url to homeassistant_url for easier understanding --- log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/log.py b/log.py index a843808..77e7aed 100644 --- a/log.py +++ b/log.py @@ -31,7 +31,7 @@ SMTP_USERNAME = config["smtp"]["username"] SMTP_PASSWORD = config["smtp"]["password"] EMAIL_FROM = config["smtp"]["from"] EMAIL_TO = config["smtp"]["to"] -FRIGATE_URL = config["frigate_url"] +HOMEASSISTANT_URL = config["homeassistant_url"] # MQTT configuration MQTT_BROKER_IP = config["mqtt"]["broker_ip"] @@ -76,7 +76,7 @@ def send_email(message, snapshot_urls, event_label, clip_url): def handle_event(event_id, event_label, snapshot_urls): time.sleep(7.5) # Wait for more snapshots before sending email - clip_url = f"{FRIGATE_URL}/api/frigate/notifications/{event_id}/gate/clip.mp4" + clip_url = f"{HOMEASSISTANT_URL}/api/frigate/notifications/{event_id}/gate/clip.mp4" email_message = f"A {event_label} was detected.\nEvent ID: {event_id}" send_email(email_message, snapshot_urls, event_label, clip_url) @@ -91,7 +91,7 @@ def on_message(client, userdata, message): event_label = event_data["after"]["label"] event_id = event_data["after"]["id"] - snapshot_url = f"{FRIGATE_URL}/api/frigate/notifications/{event_id}/snapshot.jpg" + snapshot_url = f"{HOMEASSISTANT_URL}/api/frigate/notifications/{event_id}/snapshot.jpg" if event_id in event_cache: event_cache[event_id]['snapshot_urls'].append(snapshot_url)