mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +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;
|
CLIMATE_ACTION_FAN = 6;
|
||||||
}
|
}
|
||||||
enum ClimatePreset {
|
enum ClimatePreset {
|
||||||
CLIMATE_PRESET_HOME = 0;
|
CLIMATE_PRESET_NONE = 0;
|
||||||
CLIMATE_PRESET_AWAY = 1;
|
CLIMATE_PRESET_HOME = 1;
|
||||||
CLIMATE_PRESET_BOOST = 2;
|
CLIMATE_PRESET_AWAY = 2;
|
||||||
CLIMATE_PRESET_COMFORT = 3;
|
CLIMATE_PRESET_BOOST = 3;
|
||||||
CLIMATE_PRESET_ECO = 4;
|
CLIMATE_PRESET_COMFORT = 4;
|
||||||
CLIMATE_PRESET_SLEEP = 5;
|
CLIMATE_PRESET_ECO = 5;
|
||||||
CLIMATE_PRESET_ACTIVITY = 6;
|
CLIMATE_PRESET_SLEEP = 6;
|
||||||
|
CLIMATE_PRESET_ACTIVITY = 7;
|
||||||
}
|
}
|
||||||
message ListEntitiesClimateResponse {
|
message ListEntitiesClimateResponse {
|
||||||
option (id) = 46;
|
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) {
|
template<> const char *proto_enum_to_string<enums::ClimatePreset>(enums::ClimatePreset value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
case enums::CLIMATE_PRESET_NONE:
|
||||||
|
return "CLIMATE_PRESET_NONE";
|
||||||
case enums::CLIMATE_PRESET_HOME:
|
case enums::CLIMATE_PRESET_HOME:
|
||||||
return "CLIMATE_PRESET_HOME";
|
return "CLIMATE_PRESET_HOME";
|
||||||
case enums::CLIMATE_PRESET_AWAY:
|
case enums::CLIMATE_PRESET_AWAY:
|
||||||
|
|
|
@ -90,13 +90,14 @@ enum ClimateAction : uint32_t {
|
||||||
CLIMATE_ACTION_FAN = 6,
|
CLIMATE_ACTION_FAN = 6,
|
||||||
};
|
};
|
||||||
enum ClimatePreset : uint32_t {
|
enum ClimatePreset : uint32_t {
|
||||||
CLIMATE_PRESET_HOME = 0,
|
CLIMATE_PRESET_NONE = 0,
|
||||||
CLIMATE_PRESET_AWAY = 1,
|
CLIMATE_PRESET_HOME = 1,
|
||||||
CLIMATE_PRESET_BOOST = 2,
|
CLIMATE_PRESET_AWAY = 2,
|
||||||
CLIMATE_PRESET_COMFORT = 3,
|
CLIMATE_PRESET_BOOST = 3,
|
||||||
CLIMATE_PRESET_ECO = 4,
|
CLIMATE_PRESET_COMFORT = 4,
|
||||||
CLIMATE_PRESET_SLEEP = 5,
|
CLIMATE_PRESET_ECO = 5,
|
||||||
CLIMATE_PRESET_ACTIVITY = 6,
|
CLIMATE_PRESET_SLEEP = 6,
|
||||||
|
CLIMATE_PRESET_ACTIVITY = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace enums
|
} // namespace enums
|
||||||
|
|
|
@ -84,6 +84,8 @@ const char *climate_swing_mode_to_string(ClimateSwingMode swing_mode) {
|
||||||
|
|
||||||
const char *climate_preset_to_string(ClimatePreset preset) {
|
const char *climate_preset_to_string(ClimatePreset preset) {
|
||||||
switch (preset) {
|
switch (preset) {
|
||||||
|
case climate::CLIMATE_PRESET_NONE:
|
||||||
|
return "NONE";
|
||||||
case climate::CLIMATE_PRESET_HOME:
|
case climate::CLIMATE_PRESET_HOME:
|
||||||
return "HOME";
|
return "HOME";
|
||||||
case climate::CLIMATE_PRESET_ECO:
|
case climate::CLIMATE_PRESET_ECO:
|
||||||
|
|
|
@ -74,20 +74,22 @@ enum ClimateSwingMode : uint8_t {
|
||||||
|
|
||||||
/// Enum for all modes a climate swing can be in
|
/// Enum for all modes a climate swing can be in
|
||||||
enum ClimatePreset : uint8_t {
|
enum ClimatePreset : uint8_t {
|
||||||
/// Preset is set to HOME
|
/// No preset is active
|
||||||
CLIMATE_PRESET_HOME = 0,
|
CLIMATE_PRESET_NONE = 0,
|
||||||
/// Preset is set to AWAY
|
/// Device is in home preset
|
||||||
CLIMATE_PRESET_AWAY = 1,
|
CLIMATE_PRESET_HOME = 1,
|
||||||
/// Preset is set to BOOST
|
/// Device is in away preset
|
||||||
CLIMATE_PRESET_BOOST = 2,
|
CLIMATE_PRESET_AWAY = 2,
|
||||||
/// Preset is set to COMFORT
|
/// Device is in boost preset
|
||||||
CLIMATE_PRESET_COMFORT = 3,
|
CLIMATE_PRESET_BOOST = 3,
|
||||||
/// Preset is set to ECO
|
/// Device is in comfort preset
|
||||||
CLIMATE_PRESET_ECO = 4,
|
CLIMATE_PRESET_COMFORT = 4,
|
||||||
/// Preset is set to SLEEP
|
/// Device is running an energy-saving preset
|
||||||
CLIMATE_PRESET_SLEEP = 5,
|
CLIMATE_PRESET_ECO = 5,
|
||||||
/// Preset is set to ACTIVITY
|
/// Device is prepared for sleep
|
||||||
CLIMATE_PRESET_ACTIVITY = 6,
|
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.
|
/// Convert the given ClimateMode to a human-readable string.
|
||||||
|
|
Loading…
Reference in a new issue