Skip to content

Commit

Permalink
Wrap dict attributes (#18290)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmcrty authored Oct 20, 2023
1 parent 5e933e8 commit 16766f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/ha-attribute-value.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 16766f8

Please sign in to comment.