v0.1.5 — Bug fixes from comprehensive integration testing
Several bug fixes uncovered during end-to-end testing against an HP M283fdw.
Fixed
- Options flow changes now actually take effect. The OptionsFlow used a deprecated
__init__(config_entry)pattern that silently broke the update-listener wiring, so saved options were stored to disk but the running integration kept using old values. - Views now resolve the coordinator dynamically. Previously, views captured the coordinator at registration time; after an options-flow reload, a fresh coordinator was built but views kept calling the dead one.
- PDF EOF validation. HP MFPs sometimes return malformed PDFs (catalog header only, ~58 bytes; or no
%%EOFtrailer) for unsupported DPI/color combos. We now mark these asfailedwith a clear error rather than reporting success. - HP 503 retry.
NextDocumentreturning 503 is sometimes transient ("retry me") rather than terminal ("no more documents"). Now retries with backoff before giving up. - Server-side job cleanup on failure paths. Failed scans previously left a stale job on the device, blocking the next
ScanJobscreate with 503. - Status-code precedence for /file and /cancel. 404 (unknown), 409 (not ready / already terminal), 502 (device refused) — were all collapsing to 502 before.
- Blocking I/O eliminated.
write_bytes,glob, and the card hash read now run in the executor (HA was warning about these on every scan).