You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
# Changelog
2
2
3
+
## [0.2.10] — 2026-05-10
4
+
5
+
Two fixes from v0.2.9 testing. Drop-in upgrade from 0.2.9.
6
+
7
+
-**Bundled medicines list wins when newer.**`MedicineDatabase.async_load` now compares `list_version` between the integration's bundled file and the user's stored copy; the lexicographically newer one wins (the `YYYY.MM.DD-N` format sorts correctly that way). Pre-v0.2.10, anyone who'd ever clicked **Refresh medicine list now** stayed pinned to that cached list across integration upgrades — the v0.2.9 jump from 216 to 7331 bundled entries was invisible until a manual re-refresh. Explicit URL refreshes ahead of the bundle still win.
8
+
-**NPL ID auto-fills from the catalog.** Picking a known medicine in the Add/Edit modal now populates the NPL ID field the same way ATC code and active substance already do. Three spots fixed: `_normalize_entry` preserves `npl_id` on load (was being stripped), `sanitize_for_ws` forwards it to the panel over `pillpilot/get_medicines_db`, and `_applyDrugNameAutoFill` copies it into the draft when empty. User-entered NPL IDs are never overwritten.
9
+
3
10
## [0.2.9] — 2026-05-10
4
11
5
12
Medicine list rebuilt from Läkemedelsverket. Drop-in upgrade from 0.2.8.
> Medicine list rebuilt from Läkemedelsverket. Drop-in upgrade from 0.2.8.
3
+
> Two fixes from v0.2.9 testing. Drop-in upgrade from 0.2.9.
4
4
5
-
## What's new
5
+
## What's fixed
6
6
7
-
`medicines_se.json` is now generated from [Läkemedelsverket's open-data register](https://www.dataportal.se/datasets/140_5467) (Sök läkemedelsfakta, dataset 140_5467) instead of being hand-curated. 216 entries → 7331. Covers every human medicine currently `Godkänd` or `Registrerad`. Veterinary and deregistered products are filtered at build time. Snapshot 2026-05-10.
7
+
**Bundled medicines list wins when newer.** Pre-v0.2.10 the stored copy in `.storage/pillpilot.medicines_se` always won over the integration's bundled file. So if you'd ever clicked **Refresh medicine list now** in an earlier release, you stayed stuck on that cached list across HACS upgrades — the v0.2.9 jump from 216 to 7331 entries was invisible until you manually refreshed again. `MedicineDatabase.async_load` now compares `list_version` on the two and picks the newer one. Explicit URL refreshes ahead of the bundle still take precedence.
8
8
9
-
Each entry now carries `npl_id`, and `aliases` includes former product names from the `Tidigare läkemedelsnamn` column — searching an old brand name finds the current entry.
10
-
11
-
## Build tool
12
-
13
-
`tools/build_medicines_se.py` regenerates the JSON from a fresh `Lakemedelsprodukter.xlsx` export. Maintainer tool — not shipped in the integration zip.
Curated aliases on existing entries are preserved across rebuilds.
9
+
**NPL ID auto-fills from the catalog.** When you pick a known medicine in the panel's Add/Edit modal, the NPL ID field now populates from the Läkemedelsverket export, the same way ATC code and active substance already do. Three spots that all had to be in sync: `_normalize_entry` preserves the field on load, `sanitize_for_ws` forwards it to the panel, and `_applyDrugNameAutoFill` writes it into the draft. Anything you typed yourself isn't overwritten.
23
10
24
11
## Upgrading
25
12
26
-
Replace the `pillpilot` directory in `custom_components/` with the contents of this zip and restart Home Assistant. HACS users: update normally. Existing medicines are unaffected.
13
+
Replace the `pillpilot` directory in `custom_components/` with the contents of this zip and restart Home Assistant. HACS users: update normally.
27
14
28
-
ATC codes come straight from Läkemedelsverket. Still verify against FASS or Sök VARA before relying on them clinically.
15
+
Anyone on the v0.2.9 bundled list (`2026.05.10-1`) and a stored copy from before will be flipped to the bundled list on first load after this upgrade. Existing medicines configured before the upgrade are unaffected.
0 commit comments