mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +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]]"
|
items="[[stateObj.attributes.fan_list]]"
|
||||||
on-dom-change="handleFanListUpdate"
|
on-dom-change="handleFanListUpdate"
|
||||||
>
|
>
|
||||||
<paper-item>[[item]]</paper-item>
|
<paper-item>[[_localizeFanMode(localize, item)]]</paper-item>
|
||||||
</template>
|
</template>
|
||||||
</paper-listbox>
|
</paper-listbox>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
@ -553,6 +553,10 @@ class MoreInfoClimate extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
|||||||
_localizeOperationMode(localize, mode) {
|
_localizeOperationMode(localize, mode) {
|
||||||
return localize(`state.climate.${mode}`) || 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);
|
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": {
|
"state_badge": {
|
||||||
"default": {
|
"default": {
|
||||||
"unknown": "Unk",
|
"unknown": "Unk",
|
||||||
|
@ -267,6 +267,15 @@
|
|||||||
"returning": "Returning to dock"
|
"returning": "Returning to dock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"state_attributes": {
|
||||||
|
"climate": {
|
||||||
|
"fan_mode": {
|
||||||
|
"off": "Off",
|
||||||
|
"on": "On",
|
||||||
|
"auto": "Auto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"state_badge": {
|
"state_badge": {
|
||||||
"default": {
|
"default": {
|
||||||
"unknown": "Unk",
|
"unknown": "Unk",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user