github Xunil99/ha-bosch-ebike v1.8.5
v1.8.5 — Fix Wikipedia layer empty for some tours

latest releases: v1.19.7b1, v1.18.10, v1.18.2...
one month ago

Bugfix

When navigating prev/next through tours, some tours showed Wikipedia (i)-markers and others didn't — even tours between two well-populated ones. Toggling the layer off and back on didn't help either.

Root cause: the cache treated any array — including the empty array `[]` — as a valid result. Two ways the display got poisoned:

  1. localStorage entries from versions before 1.8.1 still held empty `[]` from transient Wikipedia failures. v1.8.1+ code never wrote empty arrays to localStorage but happily read them back.
  2. After a fetch that returned no results, the in-memory cache stored `[]`. The next visit to that tour skipped the fetch entirely — a one-off transient empty became permanent for the session.

Fix: the same handling that POI has had since v1.7.1 — treat empty arrays as cache misses and re-fetch. Cost: at most one extra Wikipedia geosearch call per genuinely-empty tour. For tours with articles nothing changes, the cache still works.

Action after update

If you previously saw poisoned empty caches, clearing leftovers in the Web-Inspektor console doesn't hurt:

```js
Object.keys(localStorage).filter(k=>k.startsWith("eb-wiki-")).forEach(k=>localStorage.removeItem(k))
```

But it's no longer required — v1.8.5 ignores empty entries automatically.

Installation

Update via HACS, restart Home Assistant, hard-refresh the browser (Cmd+Shift+R / Ctrl+Shift+R).

Don't miss a new ha-bosch-ebike release

NewReleases is sending notifications on new releases.