fix republishh auto discovery on reconnect
This commit is contained in:
2
Config.h
2
Config.h
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define NUKI_HUB_VERSION "8.8-pre-2"
|
||||
#define NUKI_HUB_VERSION "8.8-pre-3"
|
||||
|
||||
#define MQTT_QOS_LEVEL 1
|
||||
#define MQTT_CLEAN_SESSIONS false
|
||||
@@ -162,7 +162,7 @@ void NukiOpenerWrapper::update()
|
||||
{
|
||||
_nextConfigUpdateTs = ts + _intervalConfig * 1000;
|
||||
updateConfig();
|
||||
if(_hassEnabled)
|
||||
if(_hassEnabled && !_hassSetupCompleted)
|
||||
{
|
||||
setupHASS();
|
||||
}
|
||||
@@ -619,7 +619,7 @@ void NukiOpenerWrapper::readAdvancedConfig()
|
||||
|
||||
void NukiOpenerWrapper::setupHASS()
|
||||
{
|
||||
if(!_nukiConfigValid || _hassSetupCompleted) return;
|
||||
if(!_nukiConfigValid) return;
|
||||
|
||||
String baseTopic = _preferences->getString(preference_mqtt_opener_path);
|
||||
char uidString[20];
|
||||
|
||||
@@ -163,7 +163,7 @@ void NukiWrapper::update()
|
||||
{
|
||||
_nextConfigUpdateTs = ts + _intervalConfig * 1000;
|
||||
updateConfig();
|
||||
if(_hassEnabled)
|
||||
if(_hassEnabled && !_hassSetupCompleted)
|
||||
{
|
||||
setupHASS();
|
||||
}
|
||||
@@ -642,7 +642,7 @@ void NukiWrapper::readAdvancedConfig()
|
||||
|
||||
void NukiWrapper::setupHASS()
|
||||
{
|
||||
if(!_nukiConfigValid || _hassSetupCompleted) return;
|
||||
if(!_nukiConfigValid) return;
|
||||
|
||||
String baseTopic = _preferences->getString(preference_mqtt_lock_path);
|
||||
char uidString[20];
|
||||
|
||||
Reference in New Issue
Block a user