Skip to content

Address HACS review feedback, bump to 4.1.0 - #64

Merged
git4sim merged 1 commit into
mainfrom
claude/hacs-review-4.1.0
Nov 2, 2026
Merged

git4sim merged 1 commit into
mainfrom
claude/hacs-review-4.1.0

Conversation

@git4sim

@git4sim git4sim commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Addresses the review on hacs/default#12923.

Changes

toniebox.upload_audio (custom_components/toniebox/__init__.py)

  • Registered via async_register_admin_service. The action reads an arbitrary host path and uploads it to the Tonie Cloud, so only admins may call it. Automations and scripts can still call it.
  • I chose this over hass.config.is_allowed_path(). That check only allows /config/www by default, so the documented /config/tonie_audio/... path would stop working for existing users.
  • The os.path.isfile() check now runs in the executor job together with the read, so it no longer blocks the event loop. A missing file now raises ServiceValidationError instead of only logging.

ICI MQTT disconnect() (custom_components/toniebox/ici_client.py)

  • client.disconnect() and client.loop_stop() now run in the executor, the same way connect already does. loop_stop() joins paho's network thread. Until now that blocked the event loop on every token refresh, unexpected disconnect and unload.

Other

  • manifest.json bumped to 4.1.0, with a matching CHANGELOG.json entry.
  • The README (EN/DE) now notes that upload_audio is admin-only.

Testing

  • The changed files compile with py_compile, and CHANGELOG.json parses.
  • Not run against a live Home Assistant instance.

After merge


Generated by Claude Code

- Register toniebox.upload_audio as an admin service: it reads an
  arbitrary host path and uploads it to the Tonie Cloud, so non-admin
  users must not be able to call it.
- Move the os.path.isfile() check into the executor job with the read
  so it no longer blocks the event loop; a missing file now raises
  ServiceValidationError.
- Run the ICI MQTT disconnect()/loop_stop() in the executor. loop_stop()
  joins paho's network thread and blocked the event loop on every token
  refresh, unexpected disconnect and unload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSAsYTC3THUC3kLoYc7sSf
@git4sim
git4sim merged commit 025965e into main Nov 2, 2026
2 checks passed
@git4sim
git4sim deleted the claude/hacs-review-4.1.0 branch November 2, 2026 19:56
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