Fix webhook delivery and callback crash on HA 2026.5#199
Open
sevorl wants to merge 1 commit into
Open
Conversation
Owner
|
Hi, this PR mixes fixes for several issues into one.
For 1. and 2. I never saw a bug report and I also did not experience that error. Where does this come from? For 2: the fix will trigger the web-hook multiple times for different URLs. That does not make any sense to me. And also this PR looks very much AI generated. Was any of this tested locally? Regards, |
Author
|
Hi @arnonym, Yes, I did this with AI assistance. |
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.
What this fixes
Webhook automations not triggering reliably on HA Core 2026.5+ (notably with local_only true).
Runtime crash on incoming/registration callbacks:
AttributeError: Account object has no attribute onRegState
Changes
Added dedicated webhook base URL support (HA_WEBHOOK_BASE_URL) and wired it through config/runtime.
In add-on mode, default webhook endpoint now targets Core directly via homeassistant hostname.
Implemented webhook delivery fallback chain with better logging and exception handling.
Fixed pjsua2 callback dispatch compatibility by explicitly binding callback handlers on Account instances.
Enforced LF line endings for shell scripts via .gitattributes to prevent bash carriage-return startup failures.
Added/updated tests for webhook URL selection and send behavior.
Updated README with webhook base URL behavior.
Validation
Reproduced and fixed startup failure caused by CRLF shell scripts.
Verified webhook-triggered automations fire again in HA OS test deployment.
Verified focused webhook unit tests pass.
Issue
Closes #197