mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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.auto_idle", "auto", undefined, { hvac_action: "idle" }),
|
||||
createEntity("climate.auto_off", "auto", undefined, { hvac_action: "off" }),
|
||||
createEntity("climate.auto_preheating", "auto", undefined, {
|
||||
hvac_action: "preheating",
|
||||
}),
|
||||
createEntity("climate.auto_heating", "auto", undefined, {
|
||||
hvac_action: "heating",
|
||||
}),
|
||||
|
@ -102,7 +102,15 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = {
|
||||
frontend_stream_type: ["hls", "web_rtc"],
|
||||
},
|
||||
climate: {
|
||||
hvac_action: ["off", "idle", "heating", "cooling", "drying", "fan"],
|
||||
hvac_action: [
|
||||
"off",
|
||||
"idle",
|
||||
"preheating",
|
||||
"heating",
|
||||
"cooling",
|
||||
"drying",
|
||||
"fan",
|
||||
],
|
||||
},
|
||||
cover: {
|
||||
device_class: [
|
||||
|
@ -16,6 +16,7 @@ export const CLIMATE_PRESET_NONE = "none";
|
||||
|
||||
export type HvacAction =
|
||||
| "off"
|
||||
| "preheating"
|
||||
| "heating"
|
||||
| "cooling"
|
||||
| "drying"
|
||||
@ -77,6 +78,7 @@ export const HVAC_ACTION_TO_MODE: Record<HvacAction, HvacMode> = {
|
||||
cooling: "cool",
|
||||
drying: "dry",
|
||||
fan: "fan_only",
|
||||
preheating: "heat",
|
||||
heating: "heat",
|
||||
idle: "off",
|
||||
off: "off",
|
||||
|
@ -2,6 +2,7 @@ import {
|
||||
mdiClockOutline,
|
||||
mdiFan,
|
||||
mdiFire,
|
||||
mdiHeatWave,
|
||||
mdiPower,
|
||||
mdiSnowflake,
|
||||
mdiWaterPercent,
|
||||
@ -21,6 +22,7 @@ export const CLIMATE_HVAC_ACTION_ICONS: Record<HvacAction, string> = {
|
||||
heating: mdiFire,
|
||||
idle: mdiClockOutline,
|
||||
off: mdiPower,
|
||||
preheating: mdiHeatWave,
|
||||
};
|
||||
|
||||
export const CLIMATE_HVAC_ACTION_MODE: Record<HvacAction, HvacMode> = {
|
||||
@ -30,6 +32,7 @@ export const CLIMATE_HVAC_ACTION_MODE: Record<HvacAction, HvacMode> = {
|
||||
heating: "heat",
|
||||
idle: "off",
|
||||
off: "off",
|
||||
preheating: "heat",
|
||||
};
|
||||
|
||||
export const computeClimateBadge: ComputeBadgeFunction = (stateObj) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user