fix preset discovery config (#4451)

Co-authored-by: Michiel, Jeroen <jeroen.michiel@teledyneflir.com>
This commit is contained in:
jmichiel 2023-02-19 14:33:52 +01:00 committed by GitHub
parent 37d55b55fc
commit c03b1fae68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,7 @@ void MQTTClimateComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryCo
// preset_mode_state_topic
root[MQTT_PRESET_MODE_STATE_TOPIC] = this->get_preset_state_topic();
// presets
JsonArray presets = root.createNestedArray("presets");
JsonArray presets = root.createNestedArray("preset_modes");
if (traits.supports_preset(CLIMATE_PRESET_HOME))
presets.add("home");
if (traits.supports_preset(CLIMATE_PRESET_AWAY)) {