fix: Substream only cameras should not be triggerable (#1848)
- Closes #1846
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user