其他
需要按天气自动通知或触发工作流时…
当你要按地点、日期范围和阈值获取天气数据,并自动发送通知或触发其他自动化动作时适用。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 35/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 38/100 ×0.15
适用场景
需要按天气自动通知或触发工作流时,用天气特定
解决思路
- 通过 weather-mcp 调用天气工具:weather_current 获取当前天气,weather_forecast 获取预报,weather_alerts 获取告警,weather_historical 获取历史数据。
- 按技能定义准备输入 Locations、Date ranges、Alert thresholds、Automation triggers,并解析输出 Weather data、Forecasts、Alert notifications、Reports。
- 获取当前天气:传入 location(如 San Francisco, CA)或坐标 lat、lon(如 37.7749、-122.4194),解析 temperature、feels_like、humidity、wind_speed、conditions、uv_index。
- 获取预报:传入 location(如 New York, NY)和 days(如 7);按日读取 date、high、low、conditions、precipitation_chance,按小时设置 interval(如 3)和 periods(如 24)。
- 配置天气告警规则 alert_rules:每条规则包含 name、condition、action。例如 Rain Alert 在 precipitation_chance > 70% 且 within_hours 为 6 时,action 通知 slack,消息为「☔ 预计未来 6 小时有雨」;Freeze Warning 在 temperature < 32°F 时,action 通知 sms,并 trigger home_assistant 执行 protect_pipes。
- 构建 Morning Briefing:trigger 为每天 6:30 AM;先 get_forecast 取 location=home、days=1,再 send_notification 到 slack_dm,消息包含 high、low、conditions,若 rain 则追加「☔ 带上雨伞!」。
- 构建 Event Planning:trigger 为 calendar_event_tomorrow;条件 event_type=outdoor;获取 event.location 和 event.date 的 forecast;若 precipitation_chance > 50%,则通知 organizer,消息为「考虑备用场地——可能下雨」。
- 对频繁请求做缓存。
- 同时支持公制/英制单位。
- 使用可靠数据源以保证准确性。
- 设置合理的告警阈值。
- 支持多种地点格式。
适用边界 · 注意事项
- 没有 weather-mcp 或等价天气数据源时无法直接使用。
- 需要 Slack/SMS/Home Assistant 等动作时,若未配置对应集成则无法执行通知或触发。
- 数据源不可靠或阈值不合理时,不适合用于高风险决策。