feat: Automatically recover from frozen live streams (#2569)

- Closes: #2099
This commit is contained in:
Dermot Duffy
2026-07-07 21:37:24 -07:00
committed by GitHub
parent 9f956fe89f
commit fb1bbc739e
73 changed files with 3321 additions and 364 deletions
+6
View File
@@ -60,6 +60,7 @@ export class Camera {
protected _eventCallback?: CameraEventCallback;
protected _destroyCallbacks: DestroyCallback[] = [];
protected _entity: Entity | null = null;
protected _initialized = false;
constructor(
config: CameraConfig,
@@ -79,6 +80,10 @@ export class Camera {
return this._entity;
}
public isInitialized(): boolean {
return this._initialized;
}
async initialize(options: CameraInitializationOptions): Promise<Camera> {
// Freeze a single HASS snapshot for the whole (async, multi-step)
// initialization so every step observes a consistent entity world; live
@@ -116,6 +121,7 @@ export class Camera {
}
}
this._initialized = true;
return this;
}