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:
committed by
dermotduffy
parent
9d088d7bcb
commit
261a7e1a92
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user