fix: Substream only cameras should not be triggerable (#1848)

- Closes #1846
This commit is contained in:
Dermot Duffy
2025-01-21 07:17:09 -08:00
committed by GitHub
parent 596a724714
commit 0212840688
13 changed files with 100 additions and 9 deletions
+6 -4
View File
@@ -34,10 +34,12 @@ export class Camera {
}
async initialize(options: CameraInitializationOptions): Promise<Camera> {
options.stateWatcher.subscribe(
this._stateChangeHandler,
this._config.triggers.entities,
);
if (this._capabilities?.has('trigger')) {
options.stateWatcher.subscribe(
this._stateChangeHandler,
this._config.triggers.entities,
);
}
this._onDestroy(() => options.stateWatcher.unsubscribe(this._stateChangeHandler));
return this;
}