Skip to content

fix: run carrier detection load() in executor - #85

Merged
jmdevita merged 1 commit into
mainfrom
fix/blocking-io-carrier-detection
Apr 25, 2026
Merged

fix: run carrier detection load() in executor#85
jmdevita merged 1 commit into
mainfrom
fix/blocking-io-carrier-detection

Conversation

@jmdevita

Copy link
Copy Markdown
Owner

To avoid blocking event loop

Offload the blocking filesystem I/O (scandir, read_text, open) in CarrierDetector.load() to the executor via hass.async_add_executor_job, preventing HA from logging blocking call warnings. Also removes the lazy-load fallback in detect() to ensure load() is never called synchronously from the event loop.

Fixes #84

… loop

Offload the blocking filesystem I/O (scandir, read_text, open) in
CarrierDetector.load() to the executor via hass.async_add_executor_job,
preventing HA from logging blocking call warnings. Also removes the
lazy-load fallback in detect() to ensure load() is never called
synchronously from the event loop.

Fixes #84
@github-actions github-actions Bot added the fix label Apr 23, 2026
@jmdevita
jmdevita merged commit 6b18457 into main Apr 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error after updtaing to latest version in logs

1 participant