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 # 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 ## [0.8.1] - 2026-02-19
### Added ### Added

View file

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

View file

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