接入香港天文台 HKO + 流浮山 LFS 1分钟实时温度

HKO 公共天气 API 免费无注册,提供 1 分钟温度 CSV。
两个站点加入高频推送,与首尔/釜山同级。

Station: HK Observatory (HKO) 27.0°C, Lau Fau Shan (LFS) 25.9°C
Interval: 60s

Tested: pytest 176 passed, HKO API 实测通过
This commit is contained in:
2569718930@qq.com
2026-05-13 00:33:56 +08:00
parent 7084bdf1ec
commit fe9bf61ad6
5 changed files with 193 additions and 7 deletions
+7 -4
View File
@@ -690,8 +690,8 @@ def start_trade_alert_push_loop(bot: Any, config: Dict[str, Any]) -> Optional[th
# ── high-freq airport push loop ──
HIGH_FREQ_AIRPORT_CITIES = {"seoul", "busan", "tokyo", "ankara", "helsinki", "amsterdam", "istanbul", "paris"}
HIGH_FREQ_AIRPORT_ICAO = {"seoul": "RKSI", "busan": "RKPK", "tokyo": "RJTT", "ankara": "17128", "helsinki": "EFHK", "amsterdam": "EHAM", "istanbul": "17058", "paris": "LFPB"}
HIGH_FREQ_AIRPORT_CITIES = {"seoul", "busan", "tokyo", "ankara", "helsinki", "amsterdam", "istanbul", "paris", "hong kong", "lau fau shan"}
HIGH_FREQ_AIRPORT_ICAO = {"seoul": "RKSI", "busan": "RKPK", "tokyo": "RJTT", "ankara": "17128", "helsinki": "EFHK", "amsterdam": "EHAM", "istanbul": "17058", "paris": "LFPB", "hong kong": "HKO", "lau fau shan": "LFS"}
_AIRPORT_PUSH_STATE_PATH = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
@@ -751,7 +751,8 @@ def _build_airport_status_message(
) -> str:
_AIRPORT_EN = {"seoul": "Incheon", "busan": "Gimhae", "tokyo": "Haneda",
"ankara": "Esenboğa", "helsinki": "Vantaa", "amsterdam": "Schiphol",
"istanbul": "Airport", "paris": "Le Bourget"}
"istanbul": "Airport", "paris": "Le Bourget",
"hong kong": "Observatory", "lau fau shan": "Lau Fau Shan"}
en_name = city.title()
ap_name = _AIRPORT_EN.get(city, "")
time_suffix = f" {local_time}" if local_time else ""
@@ -816,7 +817,9 @@ _AIRPORT_PUSH_INTERVAL = {
"helsinki": 600, # FMI 10-min
"amsterdam": 600, # KNMI 10-min
"istanbul": 600, # MGM ~10-min
"paris": 900, # AROME HD 15-min model
"paris": 900, # AROME HD 15-min model
"hong kong": 60, # HKO 1-min
"lau fau shan": 60, # HKO 1-min
}
_DEB_PROXIMITY_THRESHOLD_C = 3.0