Skip to content

Commit a8cd8b1

Browse files
authored
Use platform icon color in entity configuration (#198)
1 parent fa8d50f commit a8cd8b1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/knx-configure-entity.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { TemplateResult } from "lit";
22
import { css, html, LitElement, nothing } from "lit";
33
import { customElement, property } from "lit/decorators";
4+
import { styleMap } from "lit/directives/style-map";
45

56
import "@ha/components/ha-card";
67
import "@ha/components/ha-control-select";
@@ -50,7 +51,13 @@ export class KNXConfigureEntity extends LitElement {
5051
const errors = extractValidationErrors(this.validationErrors, "data"); // "data" is root key in our python schema
5152
return html`
5253
<div class="header">
53-
<h1><ha-svg-icon .path=${this.platform.iconPath}></ha-svg-icon>${this.platform.name}</h1>
54+
<h1>
55+
<ha-svg-icon
56+
.path=${this.platform.iconPath}
57+
style=${styleMap({ "background-color": this.platform.color })}
58+
></ha-svg-icon>
59+
${this.platform.name}
60+
</h1>
5461
<p>${this.platform.description}</p>
5562
</div>
5663
<slot name="knx-validation-error"></slot>

0 commit comments

Comments
 (0)