Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "../../../../components/entity/state-badge";
import "../../../../components/ha-card";
import "../../../../components/ha-formfield";
import "../../../../components/ha-icon";
import "../../../../components/ha-icon-input";
import "../../../../components/ha-switch";
import type { HomeAssistant } from "../../../../types";
import type { EntitiesCardConfig } from "../../cards/types";
Expand Down Expand Up @@ -78,6 +79,10 @@ export class HuiEntitiesCardEditor
return this._config!.theme || "";
}

get _icon(): string {
return this._config!.icon || "";
}

protected render(): TemplateResult {
if (!this.hass || !this._config) {
return html``;
Expand Down Expand Up @@ -113,6 +118,16 @@ export class HuiEntitiesCardEditor
.configValue=${"theme"}
@value-changed=${this._valueChanged}
></hui-theme-select-editor>
<ha-icon-input
.value=${this._icon}
.configValue=${"icon"}
@value-changed=${this._valueChanged}
.label="${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.icon"
)} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional"
)})"
></ha-icon-input>
<div class="side-by-side">
<ha-formfield
.label=${this.hass.localize(
Expand Down Expand Up @@ -179,7 +194,8 @@ export class HuiEntitiesCardEditor

if (
(configValue! === "title" && target.value === this._title) ||
(configValue! === "theme" && target.value === this._theme)
(configValue! === "theme" && target.value === this._theme) ||
(configValue! === "icon" && target.value === this._icon)
) {
return;
}
Expand Down