Pollen Forecast (Sweden)
Fetch current pollen forecasts from the Swedish Pollen Report (Pollenrapporten) API.
Quick Start
CODEBLOCK0
Example cities: Göteborg, Stockholm, Malmö, Jönköping, Uppsala
How It Works
- 1. Location mapping: The script matches your city to the nearest region ID from the Swedish Pollen Report network
- Fetches forecast: Current pollen levels and text summary from INLINECODE0
- Fetches pollen types: Maps pollen IDs to human-readable names with threshold values
- Fetches level definitions: Swedish names for severity levels from API
- Returns formatted output: Severity levels + text forecast + grass pollen alerts (if
--alert flag used)
Severity Levels
- - 0: None (Inga halter)
- 1: Low (Låga halter)
- 2: Moderate (Måttliga halter)
- 3: High (Höga halter)
- 4: Very High (Mycket höga halter)
Grass Pollen Alerts
Use the --alert flag for enhanced warnings about grass pollen (Gräs), which is the most common trigger for severe allergies.
Alert triggers:
| Level | Alert | Recommendations |
|---|
| 2 - Moderate | 💊 Start allergy medication | Consider mask for extended outdoor time |
| 3 - High |
😷 Mask + 👓 glasses required | Keep windows closed, use air purifier |
|
4 - Very High | 🚨 CRITICAL | Minimize outdoor exposure, shower after being outside |
Usage for allergy sufferers:
CODEBLOCK1
Usage
Command Line
CODEBLOCK2
From SKILL.md
The skill automatically:
- 1. Reads the region mappings from INLINECODE3
- Finds the closest matching region for the requested city
- Calls the Pollenrapporten API
- Formats the response with pollen types and severity levels
Data Sources
- - API: https://api.pollenrapporten.se/v1/
- Source: Swedish Museum of Natural History (Naturhistoriska riksmuseet)
- Coverage: 24 regions across Sweden
- Update frequency: Daily during pollen season
Output Format
Standard output:
CODEBLOCK3
With --alert flag (grass pollen warning mode):
CODEBLOCK4
Region Coverage
See references/regions.json for the complete list of 24 monitored regions including:
- - Göteborg (Gothenburg)
- Stockholm
- Malmö
- Jönköping
- Uppsala (nearest: Stockholm)
- Linköping (nearest: Norrköping)
- Lund (nearest: Malmö)
Notes
- - Forecasts are in Swedish; the API returns Swedish text summaries. You must send in Swedish, and also in English.
- Pollen season typically runs February–September
- Some smaller towns map to the nearest major monitoring station
花粉预报(瑞典)
从瑞典花粉报告(Pollenrapporten)API获取当前花粉预报。
快速开始
bash
基础预报
python3 $OPENCLAW
HOME/workspace/skills/pollen-forecast/scripts/getforecast.py <城市名称>
带牧草花粉警报(适用于过敏患者)
python3 $OPENCLAW
HOME/workspace/skills/pollen-forecast/scripts/getforecast.py <城市名称> --alert
示例城市:哥德堡、斯德哥尔摩、马尔默、延雪平、乌普萨拉
工作原理
- 1. 位置映射:脚本将您的城市匹配到瑞典花粉报告网络中最接近的区域ID
- 获取预报:从api.pollenrapporten.se获取当前花粉水平和文本摘要
- 获取花粉类型:将花粉ID映射为带阈值的人类可读名称
- 获取等级定义:从API获取严重等级的瑞典语名称
- 返回格式化输出:严重等级 + 文本预报 + 牧草花粉警报(如果使用了--alert标志)
严重等级
- - 0:无(Inga halter)
- 1:低(Låga halter)
- 2:中等(Måttliga halter)
- 3:高(Höga halter)
- 4:非常高(Mycket höga halter)
牧草花粉警报
使用--alert标志获取关于牧草花粉(Gräs)的增强警告,这是引发严重过敏的最常见诱因。
警报触发条件:
| 等级 | 警报 | 建议 |
|---|
| 2 - 中等 | 💊 开始服用过敏药物 | 长时间户外活动考虑佩戴口罩 |
| 3 - 高 |
😷 需要口罩 + 👓 眼镜 | 关闭窗户,使用空气净化器 |
|
4 - 非常高 | 🚨 危急 | 尽量减少户外暴露,外出后淋浴 |
过敏患者使用方法:
bash
python3 $OPENCLAWHOME/workspace/skills/pollen-forecast/scripts/getforecast.py 哥德堡 --alert
使用方法
命令行
bash
获取哥德堡的预报
python3 $OPENCLAW
HOME/workspace/skills/pollen-forecast/scripts/getforecast.py 哥德堡
获取斯德哥尔摩的预报并带牧草花粉警报
python3 $OPENCLAW
HOME/workspace/skills/pollen-forecast/scripts/getforecast.py 斯德哥尔摩 --alert
列出可用城市
python3 $OPENCLAW
HOME/workspace/skills/pollen-forecast/scripts/getforecast.py --help
从SKILL.md使用
该技能自动:
- 1. 读取references/regions.json中的区域映射
- 为请求的城市找到最匹配的区域
- 调用Pollenrapporten API
- 使用花粉类型和严重等级格式化响应
数据来源
- - API:https://api.pollenrapporten.se/v1/
- 来源:瑞典自然历史博物馆(Naturhistoriska riksmuseet)
- 覆盖范围:瑞典24个区域
- 更新频率:花粉季节期间每日更新
输出格式
标准输出:
🌿 哥德堡花粉预报
📅 2026-03-10 至 2026-03-11
📝 摘要:
周二至周三预计榛树花粉将达到中等至高等水平...
📊 当前水平:
• 榛树:低 / Låga
• 桤木:非常高 / Måttliga till höga
• 柳树:无 / Inga halter
• 牧草:无 / Inga halter
带--alert标志(牧草花粉警告模式):
🌿 哥德堡花粉预报
📅 2026-03-10 至 2026-03-11
📝 摘要:
...
📊 当前水平:
• 牧草:高 / Höga halter
...
⚠️ 牧草花粉警报 ⚠️
🌾 牧草处于高水平。
💊 立即服用过敏药物。
😷 外出时佩戴口罩 + 👓 眼镜。
🚪 关闭窗户。如有条件请使用空气净化器。
区域覆盖
参见references/regions.json获取完整的24个监测区域列表,包括:
- - 哥德堡
- 斯德哥尔摩
- 马尔默
- 延雪平
- 乌普萨拉(最近:斯德哥尔摩)
- 林雪平(最近:诺尔雪平)
- 隆德(最近:马尔默)
备注
- - 预报为瑞典语;API返回瑞典语文本摘要。您必须同时发送瑞典语和英语版本。
- 花粉季节通常为2月至9月
- 部分小城镇会映射到最近的主要监测站