Codereview fixes.

This commit is contained in:
Dermot Duffy committed 2023-03-12 15:47:16 -07:00
1 parent 342d988bbd
commit c053286aa7
2 files changed
+6 -4

No files matched your search

+4 -2
View File
@@ -276,11 +276,13 @@ export class FrigateCameraManagerEngine
// If zone(s) are specified, the master occupancy sensor for the overall
// camera is not used by default (but could be manually added by the
// user).
const camerasAndZones = cameraConfig.frigate.zones
const camerasAndZones = cameraConfig.frigate.zones?.length
? cameraConfig.frigate.zones
: [cameraConfig.frigate.camera_name];
const labels = cameraConfig.frigate.labels ? cameraConfig.frigate.labels : ['all'];
const labels = cameraConfig.frigate.labels?.length
? cameraConfig.frigate.labels
: ['all'];
for (const cameraOrZone of camerasAndZones) {
for (const label of labels) {
addEntityIDIfFound(cameraOrZone, label);