From 8b1abf3d561206826755a388051ab68bd006c421 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 12 May 2026 17:21:05 +0800 Subject: [PATCH] =?UTF-8?q?@=20=E4=BF=AE=E5=A4=8D=E4=B8=9C=E4=BA=AC?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E6=B8=A9=E5=BA=A6=E7=BC=BA=E5=A4=B1=EF=BC=9A?= =?UTF-8?q?JMA=20=E6=95=B0=E6=8D=AE=E5=9C=A8=20mgm=5Fnearby=20=E8=80=8C?= =?UTF-8?q?=E9=9D=9E=20jma=5Fofficial=5Fnearby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _attach_japan_official_nearby 将 JMA 数据写入 raw["mgm_nearby"], 但 _analyze 未透传 jma_official_nearby 字段到 city_weather 输出层。 改为从 mgm_nearby[0].temp 取东京 JMA 实时温度。 Tested: ruff check 通过 @ --- src/utils/telegram_push.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index 81255f6f..5d13160d 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -874,10 +874,12 @@ def _run_high_freq_airport_cycle( runway_data = (amos.get("runway_obs") or {}) if amos else {} runway_pairs = runway_data.get("runway_pairs") or [] runway_temps = runway_data.get("temperatures") or [] - jma_nearby = (city_weather.get("jma_official_nearby") or [None])[0] or {} + # Tokyo JMA data lives in mgm_nearby (set by _attach_japan_official_nearby) + mgm_nearby = city_weather.get("mgm_nearby") or [] + nearby_row = mgm_nearby[0] if mgm_nearby else {} current_temp = ( amos.get("temp_c") - or jma_nearby.get("temp") + or nearby_row.get("temp") or latest_obs.get("temp_c") or (city_weather.get("current") or {}).get("temp") )