ESPHome 2025.5.0
Loading...
Searching...
No Matches
climate_mode.cpp
Go to the documentation of this file.
1#include "climate_mode.h"
2
3namespace esphome {
4namespace climate {
5
7 switch (mode) {
9 return LOG_STR("OFF");
11 return LOG_STR("HEAT_COOL");
13 return LOG_STR("AUTO");
15 return LOG_STR("COOL");
17 return LOG_STR("HEAT");
19 return LOG_STR("FAN_ONLY");
21 return LOG_STR("DRY");
22 default:
23 return LOG_STR("UNKNOWN");
24 }
25}
26const LogString *climate_action_to_string(ClimateAction action) {
27 switch (action) {
29 return LOG_STR("OFF");
31 return LOG_STR("COOLING");
33 return LOG_STR("HEATING");
35 return LOG_STR("IDLE");
37 return LOG_STR("DRYING");
39 return LOG_STR("FAN");
40 default:
41 return LOG_STR("UNKNOWN");
42 }
43}
44
46 switch (fan_mode) {
48 return LOG_STR("ON");
50 return LOG_STR("OFF");
52 return LOG_STR("AUTO");
54 return LOG_STR("LOW");
56 return LOG_STR("MEDIUM");
58 return LOG_STR("HIGH");
60 return LOG_STR("MIDDLE");
62 return LOG_STR("FOCUS");
64 return LOG_STR("DIFFUSE");
66 return LOG_STR("QUIET");
67 default:
68 return LOG_STR("UNKNOWN");
69 }
70}
71
73 switch (swing_mode) {
75 return LOG_STR("OFF");
77 return LOG_STR("BOTH");
79 return LOG_STR("VERTICAL");
81 return LOG_STR("HORIZONTAL");
82 default:
83 return LOG_STR("UNKNOWN");
84 }
85}
86
88 switch (preset) {
90 return LOG_STR("NONE");
92 return LOG_STR("HOME");
94 return LOG_STR("ECO");
96 return LOG_STR("AWAY");
98 return LOG_STR("BOOST");
100 return LOG_STR("COMFORT");
102 return LOG_STR("SLEEP");
104 return LOG_STR("ACTIVITY");
105 default:
106 return LOG_STR("UNKNOWN");
107 }
108}
109
110} // namespace climate
111} // namespace esphome
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.
@ 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.
@ 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.
@ 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.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7