Add default object_id_generator for mqtt (#3389)

This commit is contained in:
Jesse Hills authored and GitHub committed 2022-04-14 11:25:31 +12:00
1 parent b4a86ce6cf
commit 047c18eac0
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -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()) {
+1
View File
@@ -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_;