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

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

View File

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

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