fix: Add editor support for go2rtc metadata fetch timeout (#2372)
This commit is contained in:
@@ -41,13 +41,12 @@ const go2rtcConfigSchema = z.object({
|
||||
.string()
|
||||
.transform((input) => input.replace(/\/+$/, ''))
|
||||
.optional(),
|
||||
host: z.string().optional(),
|
||||
modes: z.enum(['webrtc', 'mse', 'mp4', 'mjpeg']).array().optional(),
|
||||
stream: z.string().optional(),
|
||||
metadata_fetch_timeout_seconds: z
|
||||
.number()
|
||||
.int()
|
||||
.positive()
|
||||
.nonnegative()
|
||||
.default(go2rtcConfigDefault.metadata_fetch_timeout_seconds),
|
||||
});
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ export const CONF_CAMERAS_ARRAY_FRIGATE_LABELS =
|
||||
export const CONF_CAMERAS_ARRAY_FRIGATE_URL = `${CONF_CAMERAS}.#.frigate.url` as const;
|
||||
export const CONF_CAMERAS_ARRAY_FRIGATE_ZONES =
|
||||
`${CONF_CAMERAS}.#.frigate.zones` as const;
|
||||
export const CONF_CAMERAS_ARRAY_GO2RTC_METADATA_FETCH_TIMEOUT_SECONDS =
|
||||
`${CONF_CAMERAS}.#.go2rtc.metadata_fetch_timeout_seconds` as const;
|
||||
export const CONF_CAMERAS_ARRAY_GO2RTC_MODES = `${CONF_CAMERAS}.#.go2rtc.modes` as const;
|
||||
export const CONF_CAMERAS_ARRAY_GO2RTC_STREAM =
|
||||
`${CONF_CAMERAS}.#.go2rtc.stream` as const;
|
||||
|
||||
@@ -61,6 +61,7 @@ import {
|
||||
CONF_CAMERAS_ARRAY_FRIGATE_LABELS,
|
||||
CONF_CAMERAS_ARRAY_FRIGATE_URL,
|
||||
CONF_CAMERAS_ARRAY_FRIGATE_ZONES,
|
||||
CONF_CAMERAS_ARRAY_GO2RTC_METADATA_FETCH_TIMEOUT_SECONDS,
|
||||
CONF_CAMERAS_ARRAY_GO2RTC_MODES,
|
||||
CONF_CAMERAS_ARRAY_GO2RTC_STREAM,
|
||||
CONF_CAMERAS_ARRAY_GO2RTC_URL,
|
||||
@@ -2518,6 +2519,17 @@ export class AdvancedCameraCardEditor extends LitElement implements LovelaceCard
|
||||
)}
|
||||
${this._renderStringInput(
|
||||
getArrayConfigPath(CONF_CAMERAS_ARRAY_GO2RTC_URL, cameraIndex),
|
||||
)}
|
||||
${this._renderNumberInput(
|
||||
getArrayConfigPath(
|
||||
CONF_CAMERAS_ARRAY_GO2RTC_METADATA_FETCH_TIMEOUT_SECONDS,
|
||||
cameraIndex,
|
||||
),
|
||||
{
|
||||
min: 0,
|
||||
default:
|
||||
this._defaults.cameras.go2rtc.metadata_fetch_timeout_seconds,
|
||||
},
|
||||
)} `,
|
||||
)}
|
||||
${this._putInSubmenu(
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
},
|
||||
"go2rtc": {
|
||||
"editor_label": "go2rtc Options",
|
||||
"metadata_fetch_timeout_seconds": "Metadata fetch timeout in seconds",
|
||||
"modes": {
|
||||
"editor_label": "go2rtc Modes",
|
||||
"mjpeg": "Motion JPEG (MJPEG)",
|
||||
|
||||
Reference in New Issue
Block a user