From c89b9a174cbe461f3d6bf287ec24e7187808a175 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:30:35 +0100 Subject: [PATCH] Use detection instead of file https://github.com/alexbelgium/hassio-addons/issues/1706 --- birdnet-pi/rootfs/helpers/birdnet_to_mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdnet-pi/rootfs/helpers/birdnet_to_mqtt.py b/birdnet-pi/rootfs/helpers/birdnet_to_mqtt.py index 601a0fa28..c75fc8e0a 100644 --- a/birdnet-pi/rootfs/helpers/birdnet_to_mqtt.py +++ b/birdnet-pi/rootfs/helpers/birdnet_to_mqtt.py @@ -51,8 +51,8 @@ def get_bird_code(scientific_name): def automatic_mqtt_publish(file, detection, path): bird = {} - bird['Date'] = file.file_date - bird['Time'] = file.start_time + bird['Date'] = detection.date + bird['Time'] = detection.time bird['ScientificName'] = detection.scientific_name.replace('_', ' ') bird['CommonName'] = detection.common_name bird['Confidence'] = detection.confidence