mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-23 22:28:28 +02:00
Add climate dry fan (#845)
* add climate dry fan * clang-format * updates, add swing mode, add back compat with old ha * revert client-config add swing * sort const.py * fix missing retur
This commit is contained in:
committed by
Otto Winter
parent
4f8f59f705
commit
1814e4a46b
@@ -13,6 +13,10 @@ const char *climate_mode_to_string(ClimateMode mode) {
|
||||
return "COOL";
|
||||
case CLIMATE_MODE_HEAT:
|
||||
return "HEAT";
|
||||
case CLIMATE_MODE_FAN_ONLY:
|
||||
return "FAN_ONLY";
|
||||
case CLIMATE_MODE_DRY:
|
||||
return "DRY";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
@@ -30,5 +34,45 @@ const char *climate_action_to_string(ClimateAction action) {
|
||||
}
|
||||
}
|
||||
|
||||
const char *climate_fan_mode_to_string(ClimateFanMode fan_mode) {
|
||||
switch (fan_mode) {
|
||||
case climate::CLIMATE_FAN_ON:
|
||||
return "ON";
|
||||
case climate::CLIMATE_FAN_OFF:
|
||||
return "OFF";
|
||||
case climate::CLIMATE_FAN_AUTO:
|
||||
return "AUTO";
|
||||
case climate::CLIMATE_FAN_LOW:
|
||||
return "LOW";
|
||||
case climate::CLIMATE_FAN_MEDIUM:
|
||||
return "MEDIUM";
|
||||
case climate::CLIMATE_FAN_HIGH:
|
||||
return "HIGH";
|
||||
case climate::CLIMATE_FAN_MIDDLE:
|
||||
return "MIDDLE";
|
||||
case climate::CLIMATE_FAN_FOCUS:
|
||||
return "FOCUS";
|
||||
case climate::CLIMATE_FAN_DIFFUSE:
|
||||
return "DIFFUSE";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
const char *climate_swing_mode_to_string(ClimateSwingMode swing_mode) {
|
||||
switch (swing_mode) {
|
||||
case climate::CLIMATE_SWING_OFF:
|
||||
return "OFF";
|
||||
case climate::CLIMATE_SWING_BOTH:
|
||||
return "BOTH";
|
||||
case climate::CLIMATE_SWING_VERTICAL:
|
||||
return "VERTICAL";
|
||||
case climate::CLIMATE_SWING_HORIZONTAL:
|
||||
return "HORIZONTAL";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace climate
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user