Add fire sensors to smhi#153224
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds fire weather sensors to the SMHI integration, introducing fire risk monitoring capabilities including fire weather indices, moisture codes, and spread indicators. All new fire sensors are disabled by default to prevent overwhelming users with additional entities.
Key Changes:
- Adds 10 new fire weather sensors with FWI (Fire Weather Index) and related metrics
- Integrates a new fire forecast API endpoint alongside existing weather data
- Provides comprehensive fire risk assessment tools for Swedish weather conditions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
coordinator.py |
Adds fire forecast API client and data fetching for fire weather metrics |
sensor.py |
Implements 10 new fire sensor entities with proper state classes and device classes |
strings.json |
Adds translations and state mappings for fire weather terminology |
icons.json |
Defines appropriate icons for fire-related sensors |
| Test files | Updates test fixtures and mocks to support fire forecast functionality |
joostlek
left a comment
There was a problem hiding this comment.
One downside is now that we always poll for fire, even if there are none enabled. It would be nice if we could use coordinator context or split coordinators to make sure we don't do that :)
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
9bea6e7 to
c3b3488
Compare
| "extremely_dry": "Extemely dry", | ||
| "moderate_wet": "Moderate wet", |
There was a problem hiding this comment.
Missed that one earlier:
There is an "r" missing in "Extremely dry", and to match that it should be "Moderately wet"
There was a problem hiding this comment.
Gonna blame AI on the missing r 🤣
Gonna blame the Swedish weather institute for not being able to spell out moderately 😛
I'll get it fixed
Breaking change
Proposed change
Adds fire sensors to SMHI integration
All sensors are disabled by default.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: