mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Add defrosting to HVAC actions for ClimateEntity (#21330)
This commit is contained in:
parent
aa49d6ef6b
commit
877d0db1bb
@ -140,6 +140,9 @@ const ENTITIES: HassEntity[] = [
|
|||||||
createEntity("climate.auto_preheating", "auto", undefined, {
|
createEntity("climate.auto_preheating", "auto", undefined, {
|
||||||
hvac_action: "preheating",
|
hvac_action: "preheating",
|
||||||
}),
|
}),
|
||||||
|
createEntity("climate.auto_defrosting", "auto", undefined, {
|
||||||
|
hvac_action: "defrosting",
|
||||||
|
}),
|
||||||
createEntity("climate.auto_heating", "auto", undefined, {
|
createEntity("climate.auto_heating", "auto", undefined, {
|
||||||
hvac_action: "heating",
|
hvac_action: "heating",
|
||||||
}),
|
}),
|
||||||
|
@ -125,6 +125,7 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = {
|
|||||||
"off",
|
"off",
|
||||||
"idle",
|
"idle",
|
||||||
"preheating",
|
"preheating",
|
||||||
|
"defrosting",
|
||||||
"heating",
|
"heating",
|
||||||
"cooling",
|
"cooling",
|
||||||
"drying",
|
"drying",
|
||||||
|
@ -28,13 +28,14 @@ export type HvacMode = (typeof HVAC_MODES)[number];
|
|||||||
export const CLIMATE_PRESET_NONE = "none";
|
export const CLIMATE_PRESET_NONE = "none";
|
||||||
|
|
||||||
export type HvacAction =
|
export type HvacAction =
|
||||||
| "off"
|
|
||||||
| "preheating"
|
|
||||||
| "heating"
|
|
||||||
| "cooling"
|
| "cooling"
|
||||||
|
| "defrosting"
|
||||||
| "drying"
|
| "drying"
|
||||||
|
| "fan"
|
||||||
|
| "heating"
|
||||||
| "idle"
|
| "idle"
|
||||||
| "fan";
|
| "off"
|
||||||
|
| "preheating";
|
||||||
|
|
||||||
export type ClimateEntity = HassEntityBase & {
|
export type ClimateEntity = HassEntityBase & {
|
||||||
attributes: HassEntityAttributeBase & {
|
attributes: HassEntityAttributeBase & {
|
||||||
@ -89,12 +90,13 @@ export const compareClimateHvacModes = (mode1: HvacMode, mode2: HvacMode) =>
|
|||||||
|
|
||||||
export const CLIMATE_HVAC_ACTION_TO_MODE: Record<HvacAction, HvacMode> = {
|
export const CLIMATE_HVAC_ACTION_TO_MODE: Record<HvacAction, HvacMode> = {
|
||||||
cooling: "cool",
|
cooling: "cool",
|
||||||
|
defrosting: "heat",
|
||||||
drying: "dry",
|
drying: "dry",
|
||||||
fan: "fan_only",
|
fan: "fan_only",
|
||||||
preheating: "heat",
|
|
||||||
heating: "heat",
|
heating: "heat",
|
||||||
idle: "off",
|
idle: "off",
|
||||||
off: "off",
|
off: "off",
|
||||||
|
preheating: "heat",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CLIMATE_HVAC_MODE_ICONS: Record<HvacMode, string> = {
|
export const CLIMATE_HVAC_MODE_ICONS: Record<HvacMode, string> = {
|
||||||
|
@ -907,6 +907,7 @@ export const ENTITY_COMPONENT_ICONS: Record<string, ComponentIcons> = {
|
|||||||
idle: "mdi:clock-outline",
|
idle: "mdi:clock-outline",
|
||||||
off: "mdi:power",
|
off: "mdi:power",
|
||||||
preheating: "mdi:heat-wave",
|
preheating: "mdi:heat-wave",
|
||||||
|
defrosting: "mdi:snowflake-melt",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
preset_mode: {
|
preset_mode: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user