mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +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, {
|
||||
hvac_action: "preheating",
|
||||
}),
|
||||
createEntity("climate.auto_defrosting", "auto", undefined, {
|
||||
hvac_action: "defrosting",
|
||||
}),
|
||||
createEntity("climate.auto_heating", "auto", undefined, {
|
||||
hvac_action: "heating",
|
||||
}),
|
||||
|
@ -125,6 +125,7 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = {
|
||||
"off",
|
||||
"idle",
|
||||
"preheating",
|
||||
"defrosting",
|
||||
"heating",
|
||||
"cooling",
|
||||
"drying",
|
||||
|
@ -28,13 +28,14 @@ export type HvacMode = (typeof HVAC_MODES)[number];
|
||||
export const CLIMATE_PRESET_NONE = "none";
|
||||
|
||||
export type HvacAction =
|
||||
| "off"
|
||||
| "preheating"
|
||||
| "heating"
|
||||
| "cooling"
|
||||
| "defrosting"
|
||||
| "drying"
|
||||
| "fan"
|
||||
| "heating"
|
||||
| "idle"
|
||||
| "fan";
|
||||
| "off"
|
||||
| "preheating";
|
||||
|
||||
export type ClimateEntity = HassEntityBase & {
|
||||
attributes: HassEntityAttributeBase & {
|
||||
@ -89,12 +90,13 @@ export const compareClimateHvacModes = (mode1: HvacMode, mode2: HvacMode) =>
|
||||
|
||||
export const CLIMATE_HVAC_ACTION_TO_MODE: Record<HvacAction, HvacMode> = {
|
||||
cooling: "cool",
|
||||
defrosting: "heat",
|
||||
drying: "dry",
|
||||
fan: "fan_only",
|
||||
preheating: "heat",
|
||||
heating: "heat",
|
||||
idle: "off",
|
||||
off: "off",
|
||||
preheating: "heat",
|
||||
};
|
||||
|
||||
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",
|
||||
off: "mdi:power",
|
||||
preheating: "mdi:heat-wave",
|
||||
defrosting: "mdi:snowflake-melt",
|
||||
},
|
||||
},
|
||||
preset_mode: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user