Skip to content

v0.2.6-beta.1 — Fix blocking read_bytes warning

Pre-release
Pre-release

Choose a tag to compare

@derspe derspe released this 28 Apr 17:46

Bug fix

Fixes a blocking-call warning emitted on Home Assistant startup:

Detected blocking call to read_bytes ... inside the event loop by custom integration easy_stock

The cache-busting hash for the bundled card JS was being computed via a synchronous file read in async_setup. This pre-release wraps the read in async_add_executor_job so it runs off the event loop.

Thanks to the original reporter for the precise diagnosis and suggested workaround.

How to test

Install via HACS (enable beta/pre-release for the Easy Stock repository) or download the source and replace custom_components/easy_stock/__init__.py. Restart Home Assistant and confirm the warning no longer appears in the log.

Changes

  • Fix blocking read_bytes call in async_setup (b093845)
  • Bump version to 0.2.6 (b84d18e)