Conversation
The connect method unconditionally created an SSL context and passed it to websockets.connect(), which fails when HA_URL uses http:// or ws://. Only create and pass the SSL context when the URL scheme is wss://. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ksanislo
force-pushed
the
fix/ha-ws-ssl-on-plain-ws
branch
from
February 6, 2026 23:27
806a10c to
115a31c
Compare
|
Please merge this PR, solves an actual problem |
nayot
added a commit
to nayot/homeassistant-claude-kit
that referenced
this pull request
Sep 6, 2026
…ections
ha-ws and lovelace-sync at v1.0.0 build an SSL context and pass it to
websockets.connect() regardless of scheme. websockets >= 14 raises
ValueError("ssl argument is incompatible with a ws:// URI"), and install.sh
pulls the latest websockets, so both tools break on any install whose HA_URL
is plain HTTP. ha-ws had been failing here since the last HA OS update.
The fix itself is applied on the HA host (a local commit on top of v1.0.0 in
/config/claude-code-ha/, which install.sh never overwrites — it only chmods
and re-symlinks bin/). tools/patch_claude_code_ha_ssl.py is the idempotent
re-apply script for a fresh clone, and CLAUDE.md documents both.
Upstream danbuhler/claude-code-ha#2 and dcb#5 are open and unfixed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
ha-wsandlovelace-syncunconditionally created an SSL context and passed it towebsockets.connect(), which fails whenHA_URLuseshttp://orws://wss://Test plan
ha-wsconnects successfully with anhttps:///wss://HA_URLha-wsconnects successfully with anhttp:///ws://HA_URLlovelace-syncconnects successfully with both URL schemes🤖 Generated with Claude Code