mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-14 13:31:10 +00:00
Translate entity attribute names & attribute states (#15822)
This commit is contained in:
@@ -4,7 +4,7 @@ import { customElement, property, query } from "lit/decorators";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import { computeStateDisplay } from "../../common/entity/compute_state_display";
|
||||
import { getStates } from "../../common/entity/get_states";
|
||||
import { formatAttributeValue } from "../../data/entity_attributes";
|
||||
import { computeAttributeValueDisplay } from "../../common/entity/compute_attribute_display";
|
||||
import { PolymerChangedEvent } from "../../polymer-types";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import "../ha-combo-box";
|
||||
@@ -58,7 +58,14 @@ class HaEntityStatePicker extends LitElement {
|
||||
this.hass.entities,
|
||||
key
|
||||
)
|
||||
: formatAttributeValue(this.hass, key),
|
||||
: computeAttributeValueDisplay(
|
||||
this.hass.localize,
|
||||
state,
|
||||
this.hass.locale,
|
||||
this.hass.entities,
|
||||
this.attribute,
|
||||
key
|
||||
),
|
||||
}))
|
||||
: [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user