Add out-of-the-box Frigate PTZ support.
This commit is contained in:
@@ -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,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user