Repository navigation
Address HACS review feedback, bump to 4.1.0 - #64
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the review on hacs/default#12923.
Changes
toniebox.upload_audio(custom_components/toniebox/__init__.py)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.hass.config.is_allowed_path(). That check only allows/config/wwwby default, so the documented/config/tonie_audio/...path would stop working for existing users.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 raisesServiceValidationErrorinstead of only logging.ICI MQTT
disconnect()(custom_components/toniebox/ici_client.py)client.disconnect()andclient.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.jsonbumped to 4.1.0, with a matchingCHANGELOG.jsonentry.upload_audiois admin-only.Testing
py_compile, andCHANGELOG.jsonparses.After merge
v4.1.0.Generated by Claude Code