publish network device name via mqtt

This commit is contained in:
technyon
2023-03-23 19:01:22 +01:00
parent fb8bd9a5b3
commit 847cb2b6cc
2 changed files with 3 additions and 1 deletions

View File

@@ -403,6 +403,7 @@ bool Network::reconnect()
if(_firstConnect)
{
_firstConnect = false;
publishString(_maintenancePathPrefix, mqtt_topic_network_device, _device->deviceName().c_str());
for(const auto& it : _initTopics)
{
_device->mqttPublish(it.first.c_str(), MQTT_QOS_LEVEL, true, it.second.c_str());