Only reset primary/accent color if theme actually changes (#14659)

fixes undefined
This commit is contained in:
Philip Allgaier 2022-12-12 10:43:20 +01:00 committed by GitHub
parent 0f971e5868
commit 0b377c060c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,6 +194,10 @@ export class HaPickThemeRow extends LitElement {
private _handleThemeSelection(ev) {
const theme = ev.target.value;
if (theme === this.hass.selectedTheme?.theme) {
return;
}
if (theme === "Backend-selected") {
if (this.hass.selectedTheme?.theme) {
fireEvent(this, "settheme", {