fix: Prevent premature reinitialization when stale HA reconnects (#2717)

- Closes: #2714
This commit is contained in:
Dermot Duffy authored and GitHub committed 2026-08-29 13:47:38 -07:00
1 parent fb53681978
commit 4b101545cc
15 files changed
+333 -131

No files matched your search

+8
View File
@@ -210,6 +210,14 @@ export class FakeHASS {
*/
public setConnected(connected: boolean): void {
this._connected = connected;
// The real frontend keeps the pre-disconnect `hass.config` until its own
// `get_config` resolves after the socket returns. Mint a fresh object
// here to models that behavior.
if (connected) {
this._config = createConfig(this._config.state);
}
this._renew();
}