A custom integration that calculates the meteorological season based on SMHI (Swedish Meteorological and Hydrological Institute) definitions.
- Calculates daily average temperature automatically.
- Tracks consecutive days to determine season changes.
- Follows strict SMHI date and temperature rules:
- Vinter: ≤ 0.0°C (5 days)
- Vår: > 0.0°C (7 days, earliest Feb 15)
- Sommar: ≥ 10.0°C (5 days)
- Höst: < 10.0°C (5 days, earliest Aug 1)
- All temperatures are daily averages
- Sensor 1:
sensor.meteorologisk_arstid(Shows current season, progress count, and arrival dates for current cycle). - Sensor 2:
sensor.meteorologisk_arstid_historisk(Shows arrival dates for the previous cycle). - Sensor 3:
sensor.meteorologisk_arstid_logg(Show last update) - Available in Swedish and English Language.
- Ensure HACS is installed.
- Go to HACS -> Integrations.
- Click + Explore & Download Repositories.
- Search for "Meteorologisk årstid".
- Click Download.
- Restart Home Assistant.
- Copy the
custom_components/smhi_seasonfolder to your HAcustom_componentsdirectory. - Restart Home Assistant.
- Go to Settings -> Devices & Services.
- Click Add Integration.
- Search for "Meteorologisk årstid".
- Select your outdoor temperature sensor (e.g.,
sensor.outdoor_temperature).
The main sensor provides:
- Ankomstdatum: Date the current season started.
- Dagar sedan frost: Number of days since the last frost (daily minimum temperature ≤ 0°C).
- Vinterdygn 0/5: Progress towards Winter.
- Vårdygn 0/7: Progress towards Spring.
- Sommardygn 0/5: Progress towards Summer.
- Höstdygn 0/5: Progress towards Autumn.
- Förra dygnets medeltemp: The calculated average used for the logic.
Note: After a season is confirmed (e.g., Spring at 7/7), the counter continues to increment as long as the criteria are met (8/7, 9/7, …). This shows the total number of consecutive days that qualify for the current season. The counter resets to 0 only when a day no longer meets the season's criteria.
For testing and simulation, you can enable Debug Entities through the integration's configuration choices (Options). When enabled, three new entities are provided:
- Debug Date: Lets you manually set a mock date.
- Debug Temp: Lets you manually set the daily average temperature for simulation.
- Debug Step Day (Button): Pressing this button will process the mock date and temperature as if the day has just ended.
This makes it easy to simulate consecutive days of specific temperatures and quickly verify season transitions.
See the full history in CHANGELOG.md.
- Added: Debug entities for simulating days and temperatures to test season transitions manually.
- Fixed: Resolves issue #11.
This project is an independent custom integration and is not affiliated with, endorsed by, or connected to SMHI (Swedish Meteorological and Hydrological Institute) in any way. It simply uses their public meteorological definitions to calculate seasons.

