mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 00:05:43 +00:00
climate: add support for quiet fan mode (#3609)
This commit is contained in:
@@ -102,6 +102,8 @@ void MQTTClimateComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryCo
|
||||
fan_modes.add("focus");
|
||||
if (traits.supports_fan_mode(CLIMATE_FAN_DIFFUSE))
|
||||
fan_modes.add("diffuse");
|
||||
if (traits.supports_fan_mode(CLIMATE_FAN_QUIET))
|
||||
fan_modes.add("quiet");
|
||||
for (const auto &fan_mode : traits.get_supported_custom_fan_modes())
|
||||
fan_modes.add(fan_mode);
|
||||
}
|
||||
@@ -328,6 +330,9 @@ bool MQTTClimateComponent::publish_state_() {
|
||||
case CLIMATE_FAN_DIFFUSE:
|
||||
payload = "diffuse";
|
||||
break;
|
||||
case CLIMATE_FAN_QUIET:
|
||||
payload = "quiet";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (this->device_->custom_fan_mode.has_value())
|
||||
|
||||
Reference in New Issue
Block a user