fix: Add support for Reolink number based zooming (#2408)

- Closes #2034
This commit is contained in:
Dermot Duffy
2026-03-13 19:55:27 -07:00
committed by GitHub
parent ebe6b2f8c6
commit 95faddd9a0
8 changed files with 571 additions and 21 deletions
+30
View File
@@ -1328,6 +1328,36 @@ describe('CameraManager', () => {
// No visible action.
});
it('successfully with null hass', async () => {
const api = createCardAPI();
const engine = mock<CameraManagerEngine>();
const hass = createHASS();
vi.mocked(api.getHASSManager().getHASS).mockReturnValue(hass);
const action = {
action: 'perform-action' as const,
perform_action: 'action',
};
const manager = createCameraManager(api, engine, [
{
config: createCameraConfig({
baseCameraConfig,
id: 'another',
ptz: {
actions_left: action,
},
}),
},
]);
expect(await manager.initializeCamerasFromConfig()).toBeTruthy();
vi.mocked(api.getHASSManager().getHASS).mockReturnValue(null);
manager.executePTZAction('another', 'left');
expect(api.getActionsManager().executeActions).toBeCalledWith({
actions: action,
});
});
it('successfully', async () => {
const api = createCardAPI();
const engine = mock<CameraManagerEngine>();