fix republishh auto discovery on reconnect

This commit is contained in:
technyon
2023-02-10 23:25:58 +01:00
parent 8f3ae33de0
commit 707f7370cf
3 changed files with 5 additions and 5 deletions

View File

@@ -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];