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