1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 07:15:48 +00: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:
Guillermo Ruffino
2019-11-16 12:34:11 -03:00
committed by Otto Winter
parent 4f8f59f705
commit 1814e4a46b
21 changed files with 824 additions and 85 deletions

View File

@@ -30,6 +30,10 @@ void MQTTClimateComponent::send_discovery(JsonObject &root, mqtt::SendDiscoveryC
modes.add("cool");
if (traits.supports_mode(CLIMATE_MODE_HEAT))
modes.add("heat");
if (traits.supports_mode(CLIMATE_MODE_FAN_ONLY))
modes.add("fan_only");
if (traits.supports_mode(CLIMATE_MODE_DRY))
modes.add("dry");
if (traits.get_supports_two_point_target_temperature()) {
// temperature_low_command_topic
@@ -155,6 +159,12 @@ bool MQTTClimateComponent::publish_state_() {
case CLIMATE_MODE_HEAT:
mode_s = "heat";
break;
case CLIMATE_MODE_FAN_ONLY:
mode_s = "fan_only";
break;
case CLIMATE_MODE_DRY:
mode_s = "dry";
break;
}
bool success = true;
if (!this->publish(this->get_mode_state_topic(), mode_s))