-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Pirate Weather provides minutely precipitation forecasts (Dark Sky-style "rain starting in 12 minutes"), but the data is currently unused. This feature should parse the minutely block, generate notifications, and include a setting to toggle them.
What the Minutely Block Contains
PW returns a minutely block with per-minute precipitation intensity and probability for the next 60 minutes. This enables notifications like:
- "Rain starting in 12 minutes"
- "Snow ending in 25 minutes"
- "Heavy rain expected in 8 minutes"
- "Precipitation clearing up in 15 minutes"
This was one of Dark Sky's most loved features.
Implementation
1. Parse Minutely Data
- Add
_parse_minutely()toPirateWeatherClient - Extract precipitation intensity, probability, and type per minute
- Detect transitions: dry→wet (precipitation starting) and wet→dry (precipitation ending)
- Calculate "starts in X minutes" / "ends in X minutes" from transition points
2. Notification Integration
- Wire into the existing notification flow (
src/accessiweather/notifications/) - Trigger notifications on precipitation transitions:
- Precipitation starting soon (configurable threshold, e.g. within 15 min)
- Precipitation ending soon
- Intensity changes (light→heavy)
- Include precipitation type in notification (rain, snow, sleet, etc.)
- Respect notification cooldown to avoid spamming
3. Settings
- Add toggle: "Minutely precipitation alerts" (on/off, default on)
- Add threshold setting: "Notify when precipitation starts within X minutes" (default 15)
- Only available when Pirate Weather is the selected source (or in auto mode with PW configured)
- Settings location: Settings > Notifications or Settings > Data Sources
4. Accessibility
- Notifications should be screen reader friendly
- Use clear, spoken-style text: "Rain expected to start in about 12 minutes" not "precip_intensity transition at minute 12"
- Consider a sound event for precipitation alerts (could tie into sound packs)
References
- Pirate Weather API minutely block: https://pirateweather.net/en/latest/API/
- PW client:
src/accessiweather/pirate_weather_client.py - Notifications:
src/accessiweather/notifications/ - Sound events:
src/accessiweather/sound_events.py - Pirate Weather provider: PR feat: Add Pirate Weather with full integration (#477, #481, #482, #483) #479
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request