mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
Add default object_id_generator for mqtt (#3389)
This commit is contained in:
parent
b4a86ce6cf
commit
047c18eac0
@ -556,7 +556,12 @@ void MQTTClientComponent::disable_last_will() { this->last_will_.topic = ""; }
|
||||
|
||||
void MQTTClientComponent::disable_discovery() {
|
||||
this->discovery_info_ = MQTTDiscoveryInfo{
|
||||
.prefix = "", .retain = false, .clean = false, .unique_id_generator = MQTT_LEGACY_UNIQUE_ID_GENERATOR};
|
||||
.prefix = "",
|
||||
.retain = false,
|
||||
.clean = false,
|
||||
.unique_id_generator = MQTT_LEGACY_UNIQUE_ID_GENERATOR,
|
||||
.object_id_generator = MQTT_NONE_OBJECT_ID_GENERATOR,
|
||||
};
|
||||
}
|
||||
void MQTTClientComponent::on_shutdown() {
|
||||
if (!this->shutdown_message_.topic.empty()) {
|
||||
|
@ -277,6 +277,7 @@ class MQTTClientComponent : public Component {
|
||||
.retain = true,
|
||||
.clean = false,
|
||||
.unique_id_generator = MQTT_LEGACY_UNIQUE_ID_GENERATOR,
|
||||
.object_id_generator = MQTT_NONE_OBJECT_ID_GENERATOR,
|
||||
};
|
||||
std::string topic_prefix_{};
|
||||
MQTTMessage log_message_;
|
||||
|
Loading…
Reference in New Issue
Block a user