Add support for perform-action calls.

This commit is contained in:
Dermot Duffy
2024-09-09 22:05:49 -07:00
parent 804aa97d0b
commit a0283c35c1
14 changed files with 247 additions and 112 deletions
+10 -10
View File
@@ -423,8 +423,8 @@ describe('should convert webrtc card PTZ to Frigate card PTZ', () => {
expect.objectContaining({
ptz: expect.objectContaining({
[`actions_${action}`]: {
action: 'call-service',
service: 'foo',
action: 'perform-action',
perform_action: 'foo',
data: {
device: '048123',
cmd: action,
@@ -465,8 +465,8 @@ describe('should convert webrtc card PTZ to Frigate card PTZ', () => {
expect.objectContaining({
ptz: expect.objectContaining({
[`actions_${action}_start`]: {
action: 'call-service',
service: 'foo',
action: 'perform-action',
perform_action: 'foo',
data: {
device: '048123',
cmd: action,
@@ -474,8 +474,8 @@ describe('should convert webrtc card PTZ to Frigate card PTZ', () => {
},
},
[`actions_${action}_stop`]: {
action: 'call-service',
service: 'foo',
action: 'perform-action',
perform_action: 'foo',
data: {
device: '048123',
cmd: action,
@@ -511,16 +511,16 @@ describe('should convert webrtc card PTZ to Frigate card PTZ', () => {
ptz: expect.objectContaining({
presets: {
home: {
action: 'call-service',
service: 'service_inner',
action: 'perform-action',
perform_action: 'service_inner',
data: {
device: '048123',
cmd: 'home',
},
},
another: {
action: 'call-service',
service: 'service_inner',
action: 'perform-action',
perform_action: 'service_inner',
data: {
device: '048123',
cmd: 'another',