mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
fix preset discovery config (#4451)
Co-authored-by: Michiel, Jeroen <jeroen.michiel@teledyneflir.com>
This commit is contained in:
parent
b5927322e6
commit
d10f891f51
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ void MQTTClimateComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryCo
|
||||||
// preset_mode_state_topic
|
// preset_mode_state_topic
|
||||||
root[MQTT_PRESET_MODE_STATE_TOPIC] = this->get_preset_state_topic();
|
root[MQTT_PRESET_MODE_STATE_TOPIC] = this->get_preset_state_topic();
|
||||||
// presets
|
// presets
|
||||||
JsonArray presets = root.createNestedArray("presets");
|
JsonArray presets = root.createNestedArray("preset_modes");
|
||||||
if (traits.supports_preset(CLIMATE_PRESET_HOME))
|
if (traits.supports_preset(CLIMATE_PRESET_HOME))
|
||||||
presets.add("home");
|
presets.add("home");
|
||||||
if (traits.supports_preset(CLIMATE_PRESET_AWAY)) {
|
if (traits.supports_preset(CLIMATE_PRESET_AWAY)) {
|
||||||
|
|
Loading…
Reference in a new issue