From 16766f8878a944ba3ebff438efd8bb96e5e45392 Mon Sep 17 00:00:00 2001 From: Josh McCarty Date: Fri, 20 Oct 2023 08:07:14 -0700 Subject: [PATCH] Wrap dict attributes (#18290) --- src/components/ha-attribute-value.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/ha-attribute-value.ts b/src/components/ha-attribute-value.ts index 61b943becdaa..be4d8248bc17 100644 --- a/src/components/ha-attribute-value.ts +++ b/src/components/ha-attribute-value.ts @@ -1,5 +1,5 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { html, LitElement, nothing } from "lit"; +import { css, html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import { until } from "lit/directives/until"; import { HomeAssistant } from "../types"; @@ -64,6 +64,13 @@ class HaAttributeValue extends LitElement { return this.hass.formatEntityAttributeValue(this.stateObj!, this.attribute); } + + static styles = css` + pre { + margin: 0; + white-space: pre-wrap; + } + `; } declare global {