Use detection instead of file

https://github.com/alexbelgium/hassio-addons/issues/1706
This commit is contained in:
Alexandre
2025-01-09 12:30:35 +01:00
committed by GitHub
parent 90b04df347
commit c89b9a174c

View File

@@ -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