mirror of
https://github.com/esphome/esphome.git
synced 2025-02-22 04:48:21 +00:00
* Fix climate component over MQTT * Use climate_mode_to_string() in send_discovery() * remove superfluous mqtt binding
23 lines
427 B
C++
23 lines
427 B
C++
#include "climate_mode.h"
|
|
|
|
namespace esphome {
|
|
namespace climate {
|
|
|
|
const char *climate_mode_to_string(ClimateMode mode) {
|
|
switch (mode) {
|
|
case CLIMATE_MODE_OFF:
|
|
return "off";
|
|
case CLIMATE_MODE_AUTO:
|
|
return "auto";
|
|
case CLIMATE_MODE_COOL:
|
|
return "cool";
|
|
case CLIMATE_MODE_HEAT:
|
|
return "heat";
|
|
default:
|
|
return "UNKNOWN";
|
|
}
|
|
}
|
|
|
|
} // namespace climate
|
|
} // namespace esphome
|