fix order of init topics initalization and publishing
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#define NUKI_HUB_VERSION "9.03"
|
||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||
#define NUKI_HUB_DATE "2024-11-24"
|
||||
#define NUKI_HUB_DATE "2024-11-25"
|
||||
|
||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||
|
||||
@@ -731,10 +731,6 @@ bool NukiNetwork::reconnect()
|
||||
}
|
||||
|
||||
publishString(_maintenancePathPrefix, mqtt_topic_network_device, _device->deviceName().c_str(), true);
|
||||
for(const auto& it : _initTopics)
|
||||
{
|
||||
publish(it.first.c_str(), it.second.c_str(), true);
|
||||
}
|
||||
|
||||
if(_preferences->getBool(preference_mqtt_hass_enabled, false))
|
||||
{
|
||||
@@ -753,6 +749,11 @@ bool NukiNetwork::reconnect()
|
||||
initTopic(_maintenancePathPrefix, mqtt_topic_webserver_action, "--");
|
||||
subscribe(_maintenancePathPrefix, mqtt_topic_webserver_action);
|
||||
initTopic(_maintenancePathPrefix, mqtt_topic_webserver_state, (_preferences->getBool(preference_webserver_enabled, true) || forceEnableWebServer ? "1" : "0"));
|
||||
|
||||
for(const auto& it : _initTopics)
|
||||
{
|
||||
publish(it.first.c_str(), it.second.c_str(), true);
|
||||
}
|
||||
}
|
||||
|
||||
for(const String& topic : _subscribedTopics)
|
||||
|
||||
Reference in New Issue
Block a user