I encountered a long-term unstable WebSocket connection between Home Assistant (HA) and Home Assistant WebSocket in Node-RED, which is manifested as follows:
- Status reading wrong
When using the “current state” node to read the status of HA entities, the data is wrong. For example, when reading the sun.sun entity, the HA Developer tools already displays “above_horizon”, but Node-RED always reporting state “below_horizon”, causing the automatic logic based on state judgment to completely fail. - Temporarily restored but repeatedly failed
Every time when I edit the Server configuration associated with the “current state” node (whether you switch to the “Use the Home Assistant Add-on” mode or the “Access token” with correct token), the reading of the “current state” node can be temporarily restored synchronized, but after a period of time (the duration is not fixed), the problem will reappear again. - Some actions attempted:
- Updated the “node-red-contrib-home-assistant-websocket” palette to the latest version;
- Separately tested the “Enable heartbeat” option by check/uncheck in the Server configuration;
- Check the access token permissions and confirm that there are no obvious configuration errors.
Environmental information:
- Home Assistant version:
Installation method: Home Assistant OS
Core:2026.4.4
Supervisor:2026.04.0
Operating System:17.2
Frontend:20260325.8 - Node-RED version: 21.0.7
- node-red-contrib-home-assistant-websocket version: 0.80.3
Is there any who have encountered similar problems before? What are the possible reasons? Are there any stable solutions? Thank you for your guidance!


