Fix state display in vacuum more info (#17063)

This commit is contained in:
Bram Kragten 2023-06-28 13:31:26 +02:00 committed by GitHub
parent 952bcff8c8
commit 927c6dd778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,8 +105,6 @@ class MoreInfoVacuum extends LitElement {
return html` return html`
${stateObj.state !== UNAVAILABLE ${stateObj.state !== UNAVAILABLE
? html` <div class="flex-horizontal"> ? html` <div class="flex-horizontal">
${supportsFeature(stateObj, VacuumEntityFeature.STATUS)
? html`
<div> <div>
<span class="status-subtitle" <span class="status-subtitle"
>${this.hass!.localize( >${this.hass!.localize(
@ -115,15 +113,17 @@ class MoreInfoVacuum extends LitElement {
</span> </span>
<span> <span>
<strong> <strong>
${computeAttributeValueDisplay( ${supportsFeature(stateObj, VacuumEntityFeature.STATUS) &&
stateObj.attributes.status
? computeAttributeValueDisplay(
this.hass.localize, this.hass.localize,
stateObj, stateObj,
this.hass.locale, this.hass.locale,
this.hass.config, this.hass.config,
this.hass.entities, this.hass.entities,
"status" "status"
) || )
computeStateDisplay( : computeStateDisplay(
this.hass.localize, this.hass.localize,
stateObj, stateObj,
this.hass.locale, this.hass.locale,
@ -133,8 +133,6 @@ class MoreInfoVacuum extends LitElement {
</strong> </strong>
</span> </span>
</div> </div>
`
: ""}
${supportsFeature(stateObj, VacuumEntityFeature.BATTERY) && ${supportsFeature(stateObj, VacuumEntityFeature.BATTERY) &&
stateObj.attributes.battery_level stateObj.attributes.battery_level
? html` ? html`