Add out-of-the-box Frigate PTZ support.

This commit is contained in:
Dermot Duffy
2023-10-29 14:10:41 -07:00
parent fa43d2e439
commit e12912fa85
74 changed files with 3981 additions and 1514 deletions
+19
View File
@@ -8,6 +8,8 @@ import {
eventSummarySchema,
FrigateEvent,
frigateEventsSchema,
PTZInfo,
ptzInfoSchema,
recordingSegmentsSchema,
RecordingSummary,
recordingSummarySchema,
@@ -151,3 +153,20 @@ export const getEventSummary = async (
true,
);
};
export const getPTZInfo = async (
hass: HomeAssistant,
clientID: string,
cameraName: string,
): Promise<PTZInfo> => {
return await homeAssistantWSRequest(
hass,
ptzInfoSchema,
{
type: 'frigate/ptz/info',
instance_id: clientID,
camera: cameraName,
},
true,
);
};