Skip to content

2.0.0

Latest

Choose a tag to compare

@jesmak jesmak released this 19 Sep 20:42
· 2 commits to main since this release

Every disease now has sensors for the whole country and for each wellbeing services county, with cases and incidence per 100 000 people, and the flu-like illness visits in primary care can be followed alongside them. All of it lives in one integration entry.

Breaking changes

Diseases are now subentries. Where each disease used to be its own integration entry, there is now a single THL entry with a disease inside it for each. They are converted automatically on the first start; nothing needs to be re-added, and entity IDs, unique IDs and history carry over.

The language is set once, for the whole entry. It is changed with Reconfigure, which renames every disease and every area name in the attributes. The ids in the attributes never change, so anything reading them keeps working.

What to do after upgrading

Nothing. Your disease sensors keep their entity IDs, their history and their values attribute, so dashboards, automations and thl-card keep working.

Two things are worth doing once:

  • Add Add flu-like illness visits from the integration's page if you want them. They show a flu season starting before the lab-confirmed cases do.
  • Update thl-card to 2.0.0 to draw the counties by incidence and to see the trends.

Also in this release

  • Incidence per 100 000 people, for the whole country and every county, which is the figure that compares fairly between counties — a large county has more cases simply because more people live there.
  • A sensor per county for both cases and incidence, recorded like any other sensor, so a single county can be graphed or used in an automation.
  • Flu-like illness visits in primary care as a share of all visits, per county, from THL's Avohilmo data.
  • New sensors are given the past six months in their statistics when they are created, so their graphs have a history from the start. A sensor that already has statistics keeps them untouched.
  • A week's figure is stored at the point the sensor would have shown it, because THL publishes a week during the week after it, so the imported past and what the recorder keeps from now on line up.
  • Each refresh reads the whole six months in a single request, and the weekly numbers and the flu-like illness visits share one copy of THL's dimensions file.
  • Rewritten internals: a coordinator per disease, config subentries, and 48 tests with CI running ruff, pytest and hassfest.