feat: Auto-resolve Frigate client_id from camera entity (#2475)

Credit goes to @Eduardo-Jaramillo for the inspiration and contribution
of https://github.com/dermotduffy/advanced-camera-card/pull/2474 .
This commit is contained in:
Dermot Duffy
2026-06-30 17:45:12 -07:00
committed by dermotduffy
parent 9d088d7bcb
commit 261a7e1a92
8 changed files with 207 additions and 32 deletions
@@ -113,6 +113,7 @@ const createFrigateCameraConfig = (
return createCameraConfig({
frigate: {
camera_name: 'camera-1',
client_id: 'frigate',
},
camera_entity: 'camera.office',
...config,
@@ -355,6 +356,17 @@ describe('FrigateCameraManagerEngine', () => {
);
expect(endpoint).toBeNull();
});
it('should get no path when client_id is unresolved', async () => {
const endpoint = await createEngine().getMediaDownloadPath(
createHASS(),
createFrigateCameraConfig({
frigate: { camera_name: 'camera-1' },
}),
createClipMedia(),
);
expect(endpoint).toBeNull();
});
});
describe('generateDefaultEventQuery', () => {