Allow the view parameters to be overridden.
This commit is contained in:
1 parent
f2ceaa0a41
commit
2a52144d4c
3 files changed
+47
-12
No files matched your search
+3
-2
@@ -697,6 +697,7 @@ export class FrigateCard extends LitElement {
|
||||
}
|
||||
|
||||
this._config = config;
|
||||
this._overriddenConfig = undefined;
|
||||
this._cameras = undefined;
|
||||
this._view = undefined;
|
||||
this._message = null;
|
||||
@@ -754,8 +755,8 @@ export class FrigateCard extends LitElement {
|
||||
*/
|
||||
protected _setLightOrDarkMode(): void {
|
||||
const needDarkMode =
|
||||
this._config.view.dark_mode === 'on' ||
|
||||
(this._config.view.dark_mode === 'auto' &&
|
||||
this._getConfig().view.dark_mode === 'on' ||
|
||||
(this._getConfig().view.dark_mode === 'auto' &&
|
||||
(!this._interactionTimerID || this._hass?.themes.darkMode));
|
||||
|
||||
if (needDarkMode) {
|
||||
|
||||
@@ -942,6 +942,7 @@ const overrideConfigurationSchema = z.object({
|
||||
live: deepRemoveDefaults(liveOverridableConfigSchema).optional(),
|
||||
menu: deepRemoveDefaults(menuConfigSchema).optional(),
|
||||
image: deepRemoveDefaults(imageConfigSchema).optional(),
|
||||
view: deepRemoveDefaults(viewConfigSchema).optional(),
|
||||
});
|
||||
export type OverrideConfigurationKey = keyof z.infer<typeof overrideConfigurationSchema>;
|
||||
|
||||
|
||||
Reference in new issue
Block a user