Merge pull request 'fix: NINA mapData nur ohne AGS-Codes abfragen (v0.8.2)' (#7) from nina_test into main

This commit is contained in:
ppfeiffer 2026-02-19 13:29:32 +01:00
commit ff9ecadd75
3 changed files with 21 additions and 9 deletions

View file

@ -1,5 +1,13 @@
# Changelog
## [0.8.2] - 2026-02-19
### Fixed
- **NINA mapData geografische Filterung**: mapData-Endpunkte werden nur noch abgefragt,
wenn **keine** AGS-Codes konfiguriert sind. Sind AGS-Codes gesetzt, filtert der
Dashboard-Endpunkt bereits serverseitig regional (deckt alle Quellen inkl. DWD ab).
Vorher wurden bundesweite Meldungen außerhalb der konfigurierten Regionen angezeigt.
## [0.8.1] - 2026-02-19
### Added

View file

@ -1,4 +1,4 @@
version: "0.8.1"
version: "0.8.2"
bot:
name: "MeshDD-Bot"

View file

@ -223,14 +223,18 @@ class NinaBot:
except Exception:
logger.exception("NINA dashboard error for AGS %s", ags)
# 2. mapData: national per-source polling (severity + source filter only)
for source_key, endpoint in SOURCE_MAP_ENDPOINTS.items():
if not sources.get(source_key, True):
continue
try:
await self._fetch_map_data(session, source_key, endpoint, min_level, channel)
except Exception:
logger.exception("NINA mapData error for source %s", source_key)
# 2. mapData: national per-source polling nur wenn KEINE AGS-Codes konfiguriert
# sind, da mapData keine geografische Filterung unterstützt und sonst
# bundesweite Meldungen außerhalb der konfigurierten Regionen erscheinen.
# Mit AGS-Codes deckt das Dashboard bereits alle Quellen regional ab.
if not ags_codes:
for source_key, endpoint in SOURCE_MAP_ENDPOINTS.items():
if not sources.get(source_key, True):
continue
try:
await self._fetch_map_data(session, source_key, endpoint, min_level, channel)
except Exception:
logger.exception("NINA mapData error for source %s", source_key)
# ── De-duplication helper ────────────────────────────────────────────────