mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +00:00
Add missing localization for Fan Mode in Climate More Info (#2716)
* Add missing localization for Fan Mode in Climate More Info * Separate Climate Fan Mode from Operation Mode * Separated out climate.fan_mode into state_attributess Separated out climate.fan_mode into state_attributess * Fix bad merge and update localizeFanMode funtion.
This commit is contained in:
parent
c8cda3c817
commit
79a5947587
@ -227,7 +227,7 @@ class MoreInfoClimate extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
items="[[stateObj.attributes.fan_list]]"
|
||||
on-dom-change="handleFanListUpdate"
|
||||
>
|
||||
<paper-item>[[item]]</paper-item>
|
||||
<paper-item>[[_localizeFanMode(localize, item)]]</paper-item>
|
||||
</template>
|
||||
</paper-listbox>
|
||||
</paper-dropdown-menu>
|
||||
@ -553,6 +553,10 @@ class MoreInfoClimate extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
_localizeOperationMode(localize, mode) {
|
||||
return localize(`state.climate.${mode}`) || mode;
|
||||
}
|
||||
|
||||
_localizeFanMode(localize, mode) {
|
||||
return localize(`state_attributes.climate.fan_mode.${mode}`) || mode;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("more-info-climate", MoreInfoClimate);
|
||||
|
@ -315,6 +315,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"state_attributes": {
|
||||
"climate": {
|
||||
"fan_mode": {
|
||||
"off": "[%key:state::default::off%]",
|
||||
"on": "[%key:state::default::on%]",
|
||||
"auto": "[%key:state::climate::auto%]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"state_badge": {
|
||||
"default": {
|
||||
"unknown": "Unk",
|
||||
|
@ -267,6 +267,15 @@
|
||||
"returning": "Returning to dock"
|
||||
}
|
||||
},
|
||||
"state_attributes": {
|
||||
"climate": {
|
||||
"fan_mode": {
|
||||
"off": "Off",
|
||||
"on": "On",
|
||||
"auto": "Auto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"state_badge": {
|
||||
"default": {
|
||||
"unknown": "Unk",
|
||||
|
Loading…
x
Reference in New Issue
Block a user