mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Reverse the order of all modes features and toggle (#24420)
Reverse the order of all modes features
This commit is contained in:
parent
a5b7f2466e
commit
51193cf441
@ -119,7 +119,7 @@ class HuiAlarmModeCardFeature
|
|||||||
|
|
||||||
const color = stateColorCss(this.stateObj);
|
const color = stateColorCss(this.stateObj);
|
||||||
|
|
||||||
const supportedModes = supportedAlarmModes(this.stateObj);
|
const supportedModes = supportedAlarmModes(this.stateObj).reverse();
|
||||||
|
|
||||||
const options = filterModes(
|
const options = filterModes(
|
||||||
supportedModes,
|
supportedModes,
|
||||||
|
@ -122,7 +122,8 @@ class HuiClimateHvacModesCardFeature
|
|||||||
|
|
||||||
const ordererHvacModes = (this.stateObj.attributes.hvac_modes || [])
|
const ordererHvacModes = (this.stateObj.attributes.hvac_modes || [])
|
||||||
.concat()
|
.concat()
|
||||||
.sort(compareClimateHvacModes);
|
.sort(compareClimateHvacModes)
|
||||||
|
.reverse();
|
||||||
|
|
||||||
const options = filterModes(
|
const options = filterModes(
|
||||||
ordererHvacModes,
|
ordererHvacModes,
|
||||||
|
@ -93,7 +93,7 @@ class HuiHumidifierToggleCardFeature
|
|||||||
|
|
||||||
const color = stateColorCss(this.stateObj);
|
const color = stateColorCss(this.stateObj);
|
||||||
|
|
||||||
const options = ["on", "off"].map<ControlSelectOption>((entityState) => ({
|
const options = ["off", "on"].map<ControlSelectOption>((entityState) => ({
|
||||||
value: entityState,
|
value: entityState,
|
||||||
label: this.hass!.formatEntityState(this.stateObj!, entityState),
|
label: this.hass!.formatEntityState(this.stateObj!, entityState),
|
||||||
path: entityState === "on" ? mdiWaterPercent : mdiPower,
|
path: entityState === "on" ? mdiWaterPercent : mdiPower,
|
||||||
|
@ -110,7 +110,8 @@ class HuiWaterHeaterOperationModeCardFeature
|
|||||||
|
|
||||||
const orderedModes = (this.stateObj.attributes.operation_list || [])
|
const orderedModes = (this.stateObj.attributes.operation_list || [])
|
||||||
.concat()
|
.concat()
|
||||||
.sort(compareWaterHeaterOperationMode);
|
.sort(compareWaterHeaterOperationMode)
|
||||||
|
.reverse();
|
||||||
|
|
||||||
const options = filterModes(
|
const options = filterModes(
|
||||||
orderedModes,
|
orderedModes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user