fix: Add editor support for go2rtc metadata fetch timeout (#2372)

This commit is contained in:
Dermot Duffy
2026-02-22 19:39:55 -08:00
committed by GitHub
parent dd25e191ce
commit d5e1e02328
4 changed files with 16 additions and 2 deletions
+1 -2
View File
@@ -41,13 +41,12 @@ const go2rtcConfigSchema = z.object({
.string() .string()
.transform((input) => input.replace(/\/+$/, '')) .transform((input) => input.replace(/\/+$/, ''))
.optional(), .optional(),
host: z.string().optional(),
modes: z.enum(['webrtc', 'mse', 'mp4', 'mjpeg']).array().optional(), modes: z.enum(['webrtc', 'mse', 'mp4', 'mjpeg']).array().optional(),
stream: z.string().optional(), stream: z.string().optional(),
metadata_fetch_timeout_seconds: z metadata_fetch_timeout_seconds: z
.number() .number()
.int() .int()
.positive() .nonnegative()
.default(go2rtcConfigDefault.metadata_fetch_timeout_seconds), .default(go2rtcConfigDefault.metadata_fetch_timeout_seconds),
}); });
+2
View File
@@ -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_URL = `${CONF_CAMERAS}.#.frigate.url` as const;
export const CONF_CAMERAS_ARRAY_FRIGATE_ZONES = export const CONF_CAMERAS_ARRAY_FRIGATE_ZONES =
`${CONF_CAMERAS}.#.frigate.zones` as const; `${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_MODES = `${CONF_CAMERAS}.#.go2rtc.modes` as const;
export const CONF_CAMERAS_ARRAY_GO2RTC_STREAM = export const CONF_CAMERAS_ARRAY_GO2RTC_STREAM =
`${CONF_CAMERAS}.#.go2rtc.stream` as const; `${CONF_CAMERAS}.#.go2rtc.stream` as const;
+12
View File
@@ -61,6 +61,7 @@ import {
CONF_CAMERAS_ARRAY_FRIGATE_LABELS, CONF_CAMERAS_ARRAY_FRIGATE_LABELS,
CONF_CAMERAS_ARRAY_FRIGATE_URL, CONF_CAMERAS_ARRAY_FRIGATE_URL,
CONF_CAMERAS_ARRAY_FRIGATE_ZONES, CONF_CAMERAS_ARRAY_FRIGATE_ZONES,
CONF_CAMERAS_ARRAY_GO2RTC_METADATA_FETCH_TIMEOUT_SECONDS,
CONF_CAMERAS_ARRAY_GO2RTC_MODES, CONF_CAMERAS_ARRAY_GO2RTC_MODES,
CONF_CAMERAS_ARRAY_GO2RTC_STREAM, CONF_CAMERAS_ARRAY_GO2RTC_STREAM,
CONF_CAMERAS_ARRAY_GO2RTC_URL, CONF_CAMERAS_ARRAY_GO2RTC_URL,
@@ -2518,6 +2519,17 @@ export class AdvancedCameraCardEditor extends LitElement implements LovelaceCard
)} )}
${this._renderStringInput( ${this._renderStringInput(
getArrayConfigPath(CONF_CAMERAS_ARRAY_GO2RTC_URL, cameraIndex), 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( ${this._putInSubmenu(
+1
View File
@@ -117,6 +117,7 @@
}, },
"go2rtc": { "go2rtc": {
"editor_label": "go2rtc Options", "editor_label": "go2rtc Options",
"metadata_fetch_timeout_seconds": "Metadata fetch timeout in seconds",
"modes": { "modes": {
"editor_label": "go2rtc Modes", "editor_label": "go2rtc Modes",
"mjpeg": "Motion JPEG (MJPEG)", "mjpeg": "Motion JPEG (MJPEG)",