feat: 워치 스킨 가운데를 날씨 따라 비구름·천둥 구름·눈구름으로 — 초단기예보 낙뢰(LGT)로 2시간 안 천둥을 워치에 알림
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a74e3b49d0
commit
c0e0363759
10 files changed
+236
-37
No files matched your search
@@ -9,6 +9,7 @@ class WatchNow(WebPacketProtocol):
|
||||
temp_c: Optional[float] = None
|
||||
icon: Optional[str] = None
|
||||
rain_2h: Optional[bool] = None
|
||||
thunder: Optional[bool] = None # 2시간 안에 낙뢰 예보
|
||||
text: Optional[str] = None
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ async def get_watch_summary(
|
||||
for s in today.slots if s.at > now
|
||||
]
|
||||
if now_w is not None:
|
||||
res.now = (res.now or WatchNow()).model_copy(update={"rain_2h": now_w.will_rain_2h, "text": now_w.rain_2h_text})
|
||||
res.now = (res.now or WatchNow()).model_copy(update={"rain_2h": now_w.will_rain_2h, "thunder": now_w.thunder_2h, "text": now_w.rain_2h_text})
|
||||
res.warning = now_w.warnings[0].text if now_w.warnings else None
|
||||
|
||||
if board is not None:
|
||||
|
||||
Reference in new issue
Block a user