1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Use nothing in more lit template (#15966)

* Use nothing in more lit template

* Use nothing in more lit template
This commit is contained in:
Paul Bottein
2023-03-29 12:20:25 +02:00
committed by GitHub
parent 0f5320c6fb
commit 4d2d7cd125
22 changed files with 86 additions and 85 deletions

View File

@@ -3,7 +3,7 @@ import "@material/mwc-list/mwc-list-item";
import { mdiPower } from "@mdi/js";
import type { ChartOptions } from "chart.js";
import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { css, html, LitElement, PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement, nothing, PropertyValues } from "lit";
import { customElement, property, state } from "lit/decorators";
import { ifDefined } from "lit/directives/if-defined";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
@@ -209,7 +209,7 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
}
}
protected render(): TemplateResult {
protected render() {
let boardId: string | undefined;
let boardName: string | undefined;
let imageURL: string | undefined;
@@ -343,7 +343,7 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
)}
</mwc-button>
`
: null}
: nothing}
${isComponentLoaded(this.hass, "hassio")
? html`
<mwc-button @click=${this._openHardware}>
@@ -352,7 +352,7 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
)}
</mwc-button>
`
: null}
: nothing}
</div>`
: ""}
</ha-card>