mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Hide scenes from device info page when no entities (#5647)
This commit is contained in:
parent
f3e88f6f2e
commit
ae10330844
@ -317,16 +317,14 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
${
|
${
|
||||||
isComponentLoaded(this.hass, "scene")
|
isComponentLoaded(this.hass, "scene") && entities.length
|
||||||
? html`
|
? html`
|
||||||
<ha-card>
|
<ha-card>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.devices.scene.scenes"
|
"ui.panel.config.devices.scene.scenes"
|
||||||
)}
|
)}
|
||||||
${
|
|
||||||
entities.length
|
|
||||||
? html`
|
|
||||||
<paper-icon-button
|
<paper-icon-button
|
||||||
@click=${this._createScene}
|
@click=${this._createScene}
|
||||||
title=${this.hass.localize(
|
title=${this.hass.localize(
|
||||||
@ -334,9 +332,6 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
)}
|
)}
|
||||||
icon="hass:plus-circle"
|
icon="hass:plus-circle"
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
`
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${
|
${
|
||||||
|
Loading…
x
Reference in New Issue
Block a user