ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
climate_mode.cpp
Go to the documentation of this file.
1#include "climate_mode.h"
2
3namespace esphome::climate {
4
6 switch (mode) {
8 return LOG_STR("OFF");
10 return LOG_STR("HEAT_COOL");
12 return LOG_STR("AUTO");
14 return LOG_STR("COOL");
16 return LOG_STR("HEAT");
18 return LOG_STR("FAN_ONLY");
20 return LOG_STR("DRY");
21 default:
22 return LOG_STR("UNKNOWN");
23 }
24}
25const LogString *climate_action_to_string(ClimateAction action) {
26 switch (action) {
28 return LOG_STR("OFF");
30 return LOG_STR("COOLING");
32 return LOG_STR("HEATING");
34 return LOG_STR("IDLE");
36 return LOG_STR("DRYING");
38 return LOG_STR("FAN");
39 default:
40 return LOG_STR("UNKNOWN");
41 }
42}
43
45 switch (fan_mode) {
47 return LOG_STR("ON");
49 return LOG_STR("OFF");
51 return LOG_STR("AUTO");
53 return LOG_STR("LOW");
55 return LOG_STR("MEDIUM");
57 return LOG_STR("HIGH");
59 return LOG_STR("MIDDLE");
61 return LOG_STR("FOCUS");
63 return LOG_STR("DIFFUSE");
65 return LOG_STR("QUIET");
66 default:
67 return LOG_STR("UNKNOWN");
68 }
69}
70
72 switch (swing_mode) {
74 return LOG_STR("OFF");
76 return LOG_STR("BOTH");
78 return LOG_STR("VERTICAL");
80 return LOG_STR("HORIZONTAL");
81 default:
82 return LOG_STR("UNKNOWN");
83 }
84}
85
87 switch (preset) {
89 return LOG_STR("NONE");
91 return LOG_STR("HOME");
93 return LOG_STR("ECO");
95 return LOG_STR("AWAY");
97 return LOG_STR("BOOST");
99 return LOG_STR("COMFORT");
101 return LOG_STR("SLEEP");
103 return LOG_STR("ACTIVITY");
104 default:
105 return LOG_STR("UNKNOWN");
106 }
107}
108
109} // namespace esphome::climate
BedjetMode mode
BedJet operating mode.
ClimateSwingMode swing_mode
Definition climate.h:11
ClimateFanMode fan_mode
Definition climate.h:3
ClimatePreset preset
Definition climate.h:8
const LogString * climate_action_to_string(ClimateAction action)
Convert the given ClimateAction to a human-readable string.
const LogString * climate_swing_mode_to_string(ClimateSwingMode swing_mode)
Convert the given ClimateSwingMode to a human-readable string.
const LogString * climate_preset_to_string(ClimatePreset preset)
Convert the given PresetMode to a human-readable string.
ClimatePreset
Enum for all preset modes NOTE: If adding values, update ClimatePresetMask in climate_traits....
@ CLIMATE_PRESET_NONE
No preset is active.
@ CLIMATE_PRESET_COMFORT
Device is in comfort preset.
@ CLIMATE_PRESET_AWAY
Device is in away preset.
@ CLIMATE_PRESET_BOOST
Device is in boost preset.
@ CLIMATE_PRESET_ACTIVITY
Device is reacting to activity (e.g., movement sensors)
@ CLIMATE_PRESET_SLEEP
Device is prepared for sleep.
@ CLIMATE_PRESET_HOME
Device is in home preset.
@ CLIMATE_PRESET_ECO
Device is running an energy-saving preset.
const LogString * climate_fan_mode_to_string(ClimateFanMode fan_mode)
Convert the given ClimateFanMode to a human-readable string.
ClimateSwingMode
Enum for all modes a climate swing can be in NOTE: If adding values, update ClimateSwingModeMask in c...
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_HORIZONTAL
The fan mode is set to Horizontal.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
@ CLIMATE_SWING_BOTH
The fan mode is set to Both.
ClimateMode
Enum for all modes a climate device can be in.
@ CLIMATE_MODE_DRY
The climate device is set to dry/humidity mode.
@ CLIMATE_MODE_FAN_ONLY
The climate device only has the fan enabled, no heating or cooling is taking place.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
@ CLIMATE_MODE_HEAT_COOL
The climate device is set to heat/cool to reach the target temperature.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_MODE_AUTO
The climate device is adjusting the temperature dynamically.
const LogString * climate_mode_to_string(ClimateMode mode)
Convert the given ClimateMode to a human-readable string.
ClimateAction
Enum for the current action of the climate device. Values match those of ClimateMode.
@ CLIMATE_ACTION_OFF
The climate device is off (inactive or no power)
@ CLIMATE_ACTION_IDLE
The climate device is idle (monitoring climate but no action needed)
@ CLIMATE_ACTION_DRYING
The climate device is drying.
@ CLIMATE_ACTION_HEATING
The climate device is actively heating.
@ CLIMATE_ACTION_COOLING
The climate device is actively cooling.
@ CLIMATE_ACTION_FAN
The climate device is in fan only mode.
ClimateFanMode
NOTE: If adding values, update ClimateFanModeMask in climate_traits.h to use the new last value.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_DIFFUSE
The fan mode is set to Diffuse.
@ CLIMATE_FAN_ON
The fan mode is set to On.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
@ CLIMATE_FAN_FOCUS
The fan mode is set to Focus.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_MIDDLE
The fan mode is set to Middle.
@ CLIMATE_FAN_QUIET
The fan mode is set to Quiet.
@ CLIMATE_FAN_OFF
The fan mode is set to Off.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.