diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index dc3a60220a..2e33fbfa63 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -4,7 +4,6 @@ import { customElement, property } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import { ifDefined } from "lit/directives/if-defined"; import { DOMAINS_INPUT_ROW } from "../../../common/const"; -import { stopPropagation } from "../../../common/dom/stop_propagation"; import { toggleAttribute } from "../../../common/dom/toggle_attribute"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateName } from "../../../common/entity/compute_state_name"; @@ -62,30 +61,43 @@ export class HuiGenericEntityRow extends LitElement { const name = this.config.name ?? computeStateName(stateObj); return html` -
+
${!this.hideName ? html`
${this.config.name || computeStateName(stateObj)} ${hasSecondary @@ -158,7 +170,7 @@ export class HuiGenericEntityRow extends LitElement {
` - : html``} + : html``}
`; } @@ -190,7 +202,8 @@ export class HuiGenericEntityRow extends LitElement { outline: none; transition: background-color 180ms ease-in-out; } - .row:focus-visible { + .row:has(state-badge:focus-visible), + .row:has(.info:focus-visible) { background-color: var(--primary-background-color); } .info { @@ -199,6 +212,7 @@ export class HuiGenericEntityRow extends LitElement { padding-inline-start: 16px; padding-inline-end: 8px; flex: 1 1 30%; + outline: none; } .info, .info > * {