Allow the view parameters to be overridden.

This commit is contained in:
Dermot Duffy
2022-05-01 13:22:04 -07:00
parent f2ceaa0a41
commit 2a52144d4c
3 changed files with 47 additions and 12 deletions
+3 -2
View File
@@ -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) {