Display that entity is disabled in more info (#19378)

* Display that entity is disabled in more info

* Correct formatting
This commit is contained in:
Joakim Plate 2024-01-15 15:37:59 +01:00 committed by GitHub
parent 64b0b64468
commit 894205eff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,9 +45,13 @@ export class MoreInfoInfo extends LitElement {
<div class="container" data-domain=${domain}>
${!stateObj
? html`<ha-alert alert-type="warning">
${this.hass.localize(
"ui.dialogs.entity_registry.editor.unavailable"
)}
${this.entry?.disabled_by
? this.hass.localize(
"ui.dialogs.entity_registry.editor.entity_disabled"
)
: this.hass.localize(
"ui.dialogs.entity_registry.editor.unavailable"
)}
</ha-alert>`
: nothing}
${stateObj?.attributes.restored && entityRegObj