Add entity attribute value translations for vacuum (#16564)

This commit is contained in:
Franck Nijhof 2023-05-17 15:27:05 +02:00 committed by GitHub
parent d873f26db3
commit 42aa4ab7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,16 @@ class MoreInfoVacuum extends LitElement {
>
${stateObj.attributes.fan_speed_list!.map(
(mode) => html`
<mwc-list-item .value=${mode}>${mode}</mwc-list-item>
<mwc-list-item .value=${mode}>
${computeAttributeValueDisplay(
this.hass.localize,
stateObj,
this.hass.locale,
this.hass.entities,
"fan_speed",
mode
)}
</mwc-list-item>
`
)}
</ha-select>
@ -205,7 +214,13 @@ class MoreInfoVacuum extends LitElement {
>
<span>
<ha-svg-icon .path=${mdiFan}></ha-svg-icon>
${stateObj.attributes.fan_speed}
${computeAttributeValueDisplay(
this.hass.localize,
stateObj,
this.hass.locale,
this.hass.entities,
"fan_speed"
)}
</span>
</div>
</div>