mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Add climate preset NONE again (#1951)
This commit is contained in:
parent
61ebc629f6
commit
d0859a7d33
5 changed files with 36 additions and 28 deletions
|
@ -710,13 +710,14 @@ enum ClimateAction {
|
|||
CLIMATE_ACTION_FAN = 6;
|
||||
}
|
||||
enum ClimatePreset {
|
||||
CLIMATE_PRESET_HOME = 0;
|
||||
CLIMATE_PRESET_AWAY = 1;
|
||||
CLIMATE_PRESET_BOOST = 2;
|
||||
CLIMATE_PRESET_COMFORT = 3;
|
||||
CLIMATE_PRESET_ECO = 4;
|
||||
CLIMATE_PRESET_SLEEP = 5;
|
||||
CLIMATE_PRESET_ACTIVITY = 6;
|
||||
CLIMATE_PRESET_NONE = 0;
|
||||
CLIMATE_PRESET_HOME = 1;
|
||||
CLIMATE_PRESET_AWAY = 2;
|
||||
CLIMATE_PRESET_BOOST = 3;
|
||||
CLIMATE_PRESET_COMFORT = 4;
|
||||
CLIMATE_PRESET_ECO = 5;
|
||||
CLIMATE_PRESET_SLEEP = 6;
|
||||
CLIMATE_PRESET_ACTIVITY = 7;
|
||||
}
|
||||
message ListEntitiesClimateResponse {
|
||||
option (id) = 46;
|
||||
|
|
|
@ -192,6 +192,8 @@ template<> const char *proto_enum_to_string<enums::ClimateAction>(enums::Climate
|
|||
}
|
||||
template<> const char *proto_enum_to_string<enums::ClimatePreset>(enums::ClimatePreset value) {
|
||||
switch (value) {
|
||||
case enums::CLIMATE_PRESET_NONE:
|
||||
return "CLIMATE_PRESET_NONE";
|
||||
case enums::CLIMATE_PRESET_HOME:
|
||||
return "CLIMATE_PRESET_HOME";
|
||||
case enums::CLIMATE_PRESET_AWAY:
|
||||
|
|
|
@ -90,13 +90,14 @@ enum ClimateAction : uint32_t {
|
|||
CLIMATE_ACTION_FAN = 6,
|
||||
};
|
||||
enum ClimatePreset : uint32_t {
|
||||
CLIMATE_PRESET_HOME = 0,
|
||||
CLIMATE_PRESET_AWAY = 1,
|
||||
CLIMATE_PRESET_BOOST = 2,
|
||||
CLIMATE_PRESET_COMFORT = 3,
|
||||
CLIMATE_PRESET_ECO = 4,
|
||||
CLIMATE_PRESET_SLEEP = 5,
|
||||
CLIMATE_PRESET_ACTIVITY = 6,
|
||||
CLIMATE_PRESET_NONE = 0,
|
||||
CLIMATE_PRESET_HOME = 1,
|
||||
CLIMATE_PRESET_AWAY = 2,
|
||||
CLIMATE_PRESET_BOOST = 3,
|
||||
CLIMATE_PRESET_COMFORT = 4,
|
||||
CLIMATE_PRESET_ECO = 5,
|
||||
CLIMATE_PRESET_SLEEP = 6,
|
||||
CLIMATE_PRESET_ACTIVITY = 7,
|
||||
};
|
||||
|
||||
} // namespace enums
|
||||
|
|
|
@ -84,6 +84,8 @@ const char *climate_swing_mode_to_string(ClimateSwingMode swing_mode) {
|
|||
|
||||
const char *climate_preset_to_string(ClimatePreset preset) {
|
||||
switch (preset) {
|
||||
case climate::CLIMATE_PRESET_NONE:
|
||||
return "NONE";
|
||||
case climate::CLIMATE_PRESET_HOME:
|
||||
return "HOME";
|
||||
case climate::CLIMATE_PRESET_ECO:
|
||||
|
|
|
@ -74,20 +74,22 @@ enum ClimateSwingMode : uint8_t {
|
|||
|
||||
/// Enum for all modes a climate swing can be in
|
||||
enum ClimatePreset : uint8_t {
|
||||
/// Preset is set to HOME
|
||||
CLIMATE_PRESET_HOME = 0,
|
||||
/// Preset is set to AWAY
|
||||
CLIMATE_PRESET_AWAY = 1,
|
||||
/// Preset is set to BOOST
|
||||
CLIMATE_PRESET_BOOST = 2,
|
||||
/// Preset is set to COMFORT
|
||||
CLIMATE_PRESET_COMFORT = 3,
|
||||
/// Preset is set to ECO
|
||||
CLIMATE_PRESET_ECO = 4,
|
||||
/// Preset is set to SLEEP
|
||||
CLIMATE_PRESET_SLEEP = 5,
|
||||
/// Preset is set to ACTIVITY
|
||||
CLIMATE_PRESET_ACTIVITY = 6,
|
||||
/// No preset is active
|
||||
CLIMATE_PRESET_NONE = 0,
|
||||
/// Device is in home preset
|
||||
CLIMATE_PRESET_HOME = 1,
|
||||
/// Device is in away preset
|
||||
CLIMATE_PRESET_AWAY = 2,
|
||||
/// Device is in boost preset
|
||||
CLIMATE_PRESET_BOOST = 3,
|
||||
/// Device is in comfort preset
|
||||
CLIMATE_PRESET_COMFORT = 4,
|
||||
/// Device is running an energy-saving preset
|
||||
CLIMATE_PRESET_ECO = 5,
|
||||
/// Device is prepared for sleep
|
||||
CLIMATE_PRESET_SLEEP = 6,
|
||||
/// Device is reacting to activity (e.g., movement sensors)
|
||||
CLIMATE_PRESET_ACTIVITY = 7,
|
||||
};
|
||||
|
||||
/// Convert the given ClimateMode to a human-readable string.
|
||||
|
|
Loading…
Reference in a new issue