Fix more info vacuum status (#16051)

This commit is contained in:
Paul Bottein 2023-04-04 13:36:45 +02:00 committed by GitHub
parent 99e6547807
commit 6e35f841cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,8 @@ import {
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { stopPropagation } from "../../../common/dom/stop_propagation";
import { computeAttributeValueDisplay } from "../../../common/entity/compute_attribute_display";
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
import { supportsFeature } from "../../../common/entity/supports-feature";
import "../../../components/ha-attributes";
import "../../../components/ha-icon";
@ -113,11 +115,19 @@ class MoreInfoVacuum extends LitElement {
</span>
<span>
<strong>
${stateObj.attributes.status ||
this.hass.localize(
`component.vacuum.entity_component._.state.${stateObj.state}`
${computeAttributeValueDisplay(
this.hass.localize,
stateObj,
this.hass.locale,
this.hass.entities,
"status"
) ||
stateObj.state}
computeStateDisplay(
this.hass.localize,
stateObj,
this.hass.locale,
this.hass.entities
)}
</strong>
</span>
</div>