Skip to content

Fix minor issues in update and services (NEW-3..NEW-6)#55

Merged
g4bri3lDev merged 1 commit into
OpenDisplay:feat/clean-portfrom
balloob:fix/ha-minor-fixes
Jul 6, 2026
Merged

Fix minor issues in update and services (NEW-3..NEW-6)#55
g4bri3lDev merged 1 commit into
OpenDisplay:feat/clean-portfrom
balloob:fix/ha-minor-fixes

Conversation

@balloob

@balloob balloob commented Jul 6, 2026

Copy link
Copy Markdown

Batch of four small, surgical fixes to the HA integration.

  • NEW-3 async_release_notes() could raise AttributeError_attr_release_notes was only assigned on the successful GitHub-fetch path, but RELEASE_NOTES is advertised for every device. Added a class-level _attr_release_notes: str | None = None default so calls before/without a successful fetch (e.g. unknown IC type, fetch failure) return None.
  • NEW-4 Undeclared direct epaper_dithering import — services.py imported ColorScheme directly from epaper_dithering, which is only present transitively via py-opendisplay. Now imported from opendisplay, which re-exports it (confirmed at pinned v7.9.0).
  • NEW-5 External HTTP calls had no explicit timeout — added aiohttp.ClientTimeout to every external session.get: GitHub metadata (30s) in update.py, firmware asset download (120s) in update.py, and media download (30s) in services.py.
  • NEW-6 Blocking os.path.isdir on the event loop — _font_search_dirs does blocking stat calls and is invoked from async _drawcustom_for_device; it now runs via hass.async_add_executor_job.

Verified: both edited files pass py_compile; ColorScheme resolves from opendisplay at v7.9.0. No test harness present in the repo.

🤖 Generated with Claude Code

https://claude.ai/code/session_012g2e8mr132vcizx92WsgiR

- NEW-3: default _attr_release_notes at class level so async_release_notes()
  can't raise AttributeError before/without a successful GitHub fetch.
- NEW-4: import ColorScheme from opendisplay (re-exported) instead of the
  undeclared direct epaper_dithering dependency.
- NEW-5: add explicit aiohttp.ClientTimeout to all external HTTP calls
  (GitHub metadata 30s, firmware download 120s, media download 30s).
- NEW-6: run blocking os.path.isdir font-dir checks in the executor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012g2e8mr132vcizx92WsgiR
@balloob balloob requested a review from g4bri3lDev as a code owner July 6, 2026 06:03
@g4bri3lDev g4bri3lDev merged commit 141e9b3 into OpenDisplay:feat/clean-port Jul 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants