Fix incorrect engine detection.

This commit is contained in:
Dermot Duffy
2023-04-29 15:09:50 -07:00
parent bd4866669a
commit 2b00d95176
5 changed files with 239 additions and 7 deletions
+5
View File
@@ -7,6 +7,7 @@ import { DateRange } from './range';
import orderBy from 'lodash-es/orderBy';
import uniqBy from 'lodash-es/uniqBy';
import { ViewMedia } from '../view/media';
import { CameraConfig } from '../types';
export const convertRangeToCacheFriendlyTimes = (
range: DateRange,
@@ -53,3 +54,7 @@ export const sortMedia = (mediaArray: ViewMedia[]): ViewMedia[] => {
'asc',
);
};
export const getCameraEntityFromConfig = (cameraConfig: CameraConfig): string | null => {
return cameraConfig.camera_entity ?? cameraConfig.webrtc_card?.entity ?? null;
};