Implement MQTT discovery object_id generator (#3114)

This commit is contained in:
Andrej Komelj
2022-02-08 10:58:38 +01:00
committed by GitHub
parent c66d0550e8
commit 9826726a72
6 changed files with 41 additions and 7 deletions
+3 -1
View File
@@ -538,9 +538,11 @@ void MQTTClientComponent::set_birth_message(MQTTMessage &&message) {
void MQTTClientComponent::set_shutdown_message(MQTTMessage &&message) { this->shutdown_message_ = std::move(message); }
void MQTTClientComponent::set_discovery_info(std::string &&prefix, MQTTDiscoveryUniqueIdGenerator unique_id_generator,
bool retain, bool clean) {
MQTTDiscoveryObjectIdGenerator object_id_generator, bool retain,
bool clean) {
this->discovery_info_.prefix = std::move(prefix);
this->discovery_info_.unique_id_generator = unique_id_generator;
this->discovery_info_.object_id_generator = object_id_generator;
this->discovery_info_.retain = retain;
this->discovery_info_.clean = clean;
}