diff --git a/src/dialogs/more-info/controls/more-info-fan.ts b/src/dialogs/more-info/controls/more-info-fan.ts index 15c3a1af42..af32733d77 100644 --- a/src/dialogs/more-info/controls/more-info-fan.ts +++ b/src/dialogs/more-info/controls/more-info-fan.ts @@ -276,13 +276,21 @@ class MoreInfoFan extends LitElement { slot="trigger" .disabled=${this.stateObj.state === UNAVAILABLE} > - ${this._presetMode || - computeAttributeNameDisplay( - this.hass.localize, - this.stateObj, - this.hass.entities, - "preset_mode" - )} + ${this._presetMode + ? computeAttributeValueDisplay( + this.hass.localize, + this.stateObj!, + this.hass.locale, + this.hass.entities, + "preset_mode", + this._presetMode + ) + : computeAttributeNameDisplay( + this.hass.localize, + this.stateObj, + this.hass.entities, + "preset_mode" + )} - ${this._effect || - computeAttributeNameDisplay( - this.hass.localize, - this.stateObj, - this.hass.entities, - "effect" - )} + ${this._effect + ? computeAttributeValueDisplay( + this.hass.localize, + this.stateObj!, + this.hass.locale, + this.hass.entities, + "effect", + this._effect + ) + : computeAttributeNameDisplay( + this.hass.localize, + this.stateObj, + this.hass.entities, + "effect" + )} ${this.stateObj.attributes.effect_list.map( (effect: string) => html` @@ -250,7 +261,14 @@ class MoreInfoLight extends LitElement { .value=${effect} .activated=${this.stateObj!.attributes.effect === effect} > - ${effect} + ${computeAttributeValueDisplay( + this.hass.localize, + this.stateObj!, + this.hass.locale, + this.hass.entities, + "effect", + effect + )} ` )}