A live bird collage card for your Home Assistant dashboard.
Merge branch 'main' into feature/add-confidencepct-variable-to-apprise-notification
ehpersonal385af7dd9cede7
diff --cc scripts/server.pyindex ecbf5b2b,ccae3489..8108e3a7--- a/scripts/server.py+++ b/scripts/server.py@@@ -276,9 -272,10 +278,9 @@@ def analyzeAudioData(chunks, lat, lon,start = time.time()print('ANALYZING AUDIO...', end=' ', flush=True)- if model == "BirdNET_GLOBAL_3K_V2.2_Model_FP16":+ if model == "BirdNET_GLOBAL_3K_V2.3_Model_FP16":if len(PREDICTED_SPECIES_LIST) == 0 or len(INCLUDE_LIST) != 0:- predictSpeciesList(lat,lon,week)-+ predictSpeciesList(lat, lon, week)# Convert and prepare metadatamdata = convertMetadata(np.array([lat, lon, week]))diff --cc scripts/utils/notifications.pyindex 59cf2ffc,99265a5f..94df122b--- a/scripts/utils/notifications.py+++ b/scripts/utils/notifications.py@@@ -72,12 -79,12 +82,13 @@@ def sendAppriseNotifications(species, cimage_url = ""if len(settings_dict.get('FLICKR_API_KEY')) > 0 and "$flickrimage" in body:- if not comName in flickr_images:+ if comName not in flickr_images:try:# TODO: Make this work with non-english comnames. Implement the "// convert sci name to English name" logic from overview.php here- url = 'https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key='+str(settings_dict.get('FLICKR_API_KEY'))+'&text='+str(- comName)+' bird&sort=relevance&per_page=5&media=photos&format=json&license=2%2C3%2C4%2C5%2C6%2C9&nojsoncallback=1'- resp = requests.get(url=url)+ headers = {'User-Agent': 'Python_Flickr/1.0'}+ url = 'https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key='+str(settings_dict.get('FLICKR_API_KEY'))+'&text='+str(comName)+' bird&sort=relevance&per_page=5&media=photos&format=json&license=2%2C3%2C4%2C5%2C6%2C9&nojsoncallback=1'+ resp = requests.get(url=url, headers=headers)++resp.encoding = "utf-8"data = resp.json()["photos"]["photo"][0]