Add Wunderground as Shenzhen settlement source

This commit is contained in:
2569718930@qq.com
2026-03-25 17:00:36 +08:00
parent b1ce479909
commit 2b0e6a6f67
10 changed files with 244 additions and 8 deletions
+1 -1
View File
@@ -665,7 +665,7 @@ def _analyze(city: str, force_refresh: bool = False) -> Dict[str, Any]:
mc = metar.get("current", {}) if metar else {}
mg_cur = mgm.get("current", {}) if mgm else {}
sc_cur = settlement_current.get("current", {}) if settlement_current else {}
use_settlement_current = settlement_source in {"hko", "cwa", "noaa"} and bool(sc_cur)
use_settlement_current = settlement_source in {"hko", "cwa", "noaa", "wunderground"} and bool(sc_cur)
primary_current = sc_cur if use_settlement_current else mc
cur_temp = _sf(primary_current.get("temp"))
if cur_temp is None:
+1
View File
@@ -76,6 +76,7 @@ SETTLEMENT_SOURCE_LABELS: Dict[str, str] = {
"cwa": "CWA",
"noaa": "NOAA",
"mgm": "MGM",
"wunderground": "Wunderground",
}
_cache: Dict[str, Dict] = {}