mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Add preheating HVAC action to climate (#16922)
This commit is contained in:
parent
40c8301df0
commit
8abb58ae7d
@ -135,6 +135,9 @@ const ENTITIES: HassEntity[] = [
|
|||||||
createEntity("climate.fan_only", "fan_only"),
|
createEntity("climate.fan_only", "fan_only"),
|
||||||
createEntity("climate.auto_idle", "auto", undefined, { hvac_action: "idle" }),
|
createEntity("climate.auto_idle", "auto", undefined, { hvac_action: "idle" }),
|
||||||
createEntity("climate.auto_off", "auto", undefined, { hvac_action: "off" }),
|
createEntity("climate.auto_off", "auto", undefined, { hvac_action: "off" }),
|
||||||
|
createEntity("climate.auto_preheating", "auto", undefined, {
|
||||||
|
hvac_action: "preheating",
|
||||||
|
}),
|
||||||
createEntity("climate.auto_heating", "auto", undefined, {
|
createEntity("climate.auto_heating", "auto", undefined, {
|
||||||
hvac_action: "heating",
|
hvac_action: "heating",
|
||||||
}),
|
}),
|
||||||
|
@ -102,7 +102,15 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = {
|
|||||||
frontend_stream_type: ["hls", "web_rtc"],
|
frontend_stream_type: ["hls", "web_rtc"],
|
||||||
},
|
},
|
||||||
climate: {
|
climate: {
|
||||||
hvac_action: ["off", "idle", "heating", "cooling", "drying", "fan"],
|
hvac_action: [
|
||||||
|
"off",
|
||||||
|
"idle",
|
||||||
|
"preheating",
|
||||||
|
"heating",
|
||||||
|
"cooling",
|
||||||
|
"drying",
|
||||||
|
"fan",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
cover: {
|
cover: {
|
||||||
device_class: [
|
device_class: [
|
||||||
|
@ -16,6 +16,7 @@ export const CLIMATE_PRESET_NONE = "none";
|
|||||||
|
|
||||||
export type HvacAction =
|
export type HvacAction =
|
||||||
| "off"
|
| "off"
|
||||||
|
| "preheating"
|
||||||
| "heating"
|
| "heating"
|
||||||
| "cooling"
|
| "cooling"
|
||||||
| "drying"
|
| "drying"
|
||||||
@ -77,6 +78,7 @@ export const HVAC_ACTION_TO_MODE: Record<HvacAction, HvacMode> = {
|
|||||||
cooling: "cool",
|
cooling: "cool",
|
||||||
drying: "dry",
|
drying: "dry",
|
||||||
fan: "fan_only",
|
fan: "fan_only",
|
||||||
|
preheating: "heat",
|
||||||
heating: "heat",
|
heating: "heat",
|
||||||
idle: "off",
|
idle: "off",
|
||||||
off: "off",
|
off: "off",
|
||||||
|
@ -2,6 +2,7 @@ import {
|
|||||||
mdiClockOutline,
|
mdiClockOutline,
|
||||||
mdiFan,
|
mdiFan,
|
||||||
mdiFire,
|
mdiFire,
|
||||||
|
mdiHeatWave,
|
||||||
mdiPower,
|
mdiPower,
|
||||||
mdiSnowflake,
|
mdiSnowflake,
|
||||||
mdiWaterPercent,
|
mdiWaterPercent,
|
||||||
@ -21,6 +22,7 @@ export const CLIMATE_HVAC_ACTION_ICONS: Record<HvacAction, string> = {
|
|||||||
heating: mdiFire,
|
heating: mdiFire,
|
||||||
idle: mdiClockOutline,
|
idle: mdiClockOutline,
|
||||||
off: mdiPower,
|
off: mdiPower,
|
||||||
|
preheating: mdiHeatWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CLIMATE_HVAC_ACTION_MODE: Record<HvacAction, HvacMode> = {
|
export const CLIMATE_HVAC_ACTION_MODE: Record<HvacAction, HvacMode> = {
|
||||||
@ -30,6 +32,7 @@ export const CLIMATE_HVAC_ACTION_MODE: Record<HvacAction, HvacMode> = {
|
|||||||
heating: "heat",
|
heating: "heat",
|
||||||
idle: "off",
|
idle: "off",
|
||||||
off: "off",
|
off: "off",
|
||||||
|
preheating: "heat",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const computeClimateBadge: ComputeBadgeFunction = (stateObj) => {
|
export const computeClimateBadge: ComputeBadgeFunction = (stateObj) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user