fix: Reolink PTZ support should detect presets (#1997)

- Related: #1964
This commit is contained in:
Dermot Duffy
2025-04-06 17:47:43 +01:00
committed by GitHub
parent e7a9e20c9e
commit a24c9628c5
6 changed files with 253 additions and 63 deletions
+19
View File
@@ -14,6 +14,7 @@ import {
createPTZControlsAction,
createPTZDigitalAction,
createPTZMultiAction,
createSelectOptionAction,
createViewAction,
getActionConfigGivenAction,
hasAction,
@@ -267,6 +268,24 @@ describe('createPerformAction', () => {
});
});
describe('createSelectOptionAction', () => {
it('should create select option action', () => {
expect(
createSelectOptionAction('select', 'select.foo', 'option', {
cardID: 'card_id',
}),
).toEqual({
action: 'perform-action',
perform_action: 'select.select_option',
card_id: 'card_id',
target: { entity_id: 'select.foo' },
data: {
option: 'option',
},
});
});
});
describe('getActionConfigGivenAction', () => {
const action = createViewAction('clips');