Always render a view even if default is unsupported.

This commit is contained in:
Dermot Duffy
2024-03-08 20:00:35 -08:00
parent e261c17f75
commit ecdd02c7ce
7 changed files with 98 additions and 7 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ export class FrigateCamera extends Camera {
hass: HomeAssistant,
cameraConfig: CameraConfig,
): Promise<PTZCapabilities | null> {
if (!cameraConfig.frigate.camera_name) {
if (!cameraConfig.frigate.camera_name || isBirdseye(cameraConfig)) {
return null;
}
+5
View File
@@ -24,6 +24,7 @@ export interface CameraManagerReadOnlyConfigStore {
getCameraIDs(): Set<string>;
getVisibleCameraIDs(): Set<string>;
getDefaultCameraID(): string | null;
getAllDependentCameras(cameraID: string): Set<string>;
}
@@ -61,6 +62,10 @@ export class CameraManagerStore implements CameraManagerReadOnlyConfigStore {
return this.getVisibleCameraIDs().size;
}
public getDefaultCameraID(): string | null {
return this._cameras.keys().next().value ?? null;
}
public getCameras(): Map<string, Camera> {
return this._cameras;
}