mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 16:25:50 +00:00
[mqtt] Fix climate custom fan mode and preset compilation errors (#11692)
This commit is contained in:
@@ -357,8 +357,8 @@ bool MQTTClimateComponent::publish_state_() {
|
|||||||
payload = "unknown";
|
payload = "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->device_->custom_preset.has_value())
|
if (this->device_->has_custom_preset())
|
||||||
payload = this->device_->custom_preset.value();
|
payload = this->device_->get_custom_preset();
|
||||||
if (!this->publish(this->get_preset_state_topic(), payload))
|
if (!this->publish(this->get_preset_state_topic(), payload))
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
@@ -429,8 +429,8 @@ bool MQTTClimateComponent::publish_state_() {
|
|||||||
payload = "unknown";
|
payload = "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->device_->custom_fan_mode.has_value())
|
if (this->device_->has_custom_fan_mode())
|
||||||
payload = this->device_->custom_fan_mode.value();
|
payload = this->device_->get_custom_fan_mode();
|
||||||
if (!this->publish(this->get_fan_mode_state_topic(), payload))
|
if (!this->publish(this->get_fan_mode_state_topic(), payload))
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user