Skip to content

Move websocket connection to background tasks (5-minute HA startup hang) - #43

Open
proscar87 wants to merge 1 commit into
Connectlife-LLC:mainfrom
proscar87:fix/websocket-blocking-startup
Open

Move websocket connection to background tasks (5-minute HA startup hang)#43
proscar87 wants to merge 1 commit into
Connectlife-LLC:mainfrom
proscar87:fix/websocket-blocking-startup

Conversation

@proscar87

Copy link
Copy Markdown

Summary

Fixes Bug 1 of #28: HisenseWebSocket._connect_ws() runs in the setup path and can hang until Home Assistant's 5-minute setup timeout, blocking all integrations from completing startup. Several users report removing the integration because of this (see #28 thread); on my instance all 7 ACs came up unavailable after a restart with this signature.

The connect logic moves into a retrying background task (_connect_ws_loop) so setup returns immediately and the socket (re)connects out of band.

Credit

This is @bsantelicesm's fix, cherry-picked with authorship preserved from their fork (offered in the #28 thread in June, never PR'd). Upstreaming so it reaches HACS users.

Related symptom reports: #25 (periodic unavailable), #33, #17.

🤖 Upstreamed with Claude Code

Switches WebSocket connections to prevent HA hanging on startup until the startup wrap timeouts. This would hang the startup process as described in issue Connectlife-LLC#28 bug 1.

(cherry picked from commit b247df6)
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