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
fix(locations): include empty Locations-page entries (#854)
The integration only read locations from GET /api/v1/location, which
returns the distinct location values referenced by at least one spool.
Locations created on Spoolman's Locations settings page but not yet
assigned to a spool (e.g. 'External Spool Holder', 'Ordered') were
therefore missing from the Home Assistant location selector.
Add SpoolmanAPI.get_setting_locations(), reading the full UI-managed
list from GET /api/v1/setting/locations (a Setting whose JSON-encoded
'value' is a string array, decoded here). The coordinator now fetches
both endpoints independently and merges them, so empty locations show
up while spool-only locations are still covered. Each source degrades
gracefully on older Spoolman servers (404), unset/empty value and
malformed JSON; when both are unavailable it falls back to deriving
locations from spools as before.
Tests: API-level parsing/edge cases, coordinator merge + fallback, and
the characterization snapshot now lists the empty locations.
To the reporter: sorry — I misread the original report and the earlier
fix (switching to /api/v1/location in #839) didn't actually cover the
empty Locations-page entries you described. This should now be fixed.
Thanks for the precise write-up pointing at /api/v1/setting/locations.
0 commit comments