Fix Ring detection
This commit is contained in:
@@ -362,9 +362,9 @@ void NukiWrapper::update()
|
||||
if(_nukiOfficial->getStatusUpdated() || _statusUpdated || _nextLockStateUpdateTs == 0 || ts >= _nextLockStateUpdateTs || (queryCommands & QUERY_COMMAND_LOCKSTATE) > 0)
|
||||
{
|
||||
Log->println("Updating Lock state based on status, timer or query");
|
||||
updateKeyTurnerState();
|
||||
_statusUpdated = false;
|
||||
_nextLockStateUpdateTs = ts + _intervalLockstate * 1000;
|
||||
updateKeyTurnerState();
|
||||
_network->publishStatusUpdated(_statusUpdated);
|
||||
}
|
||||
if(_network->mqttConnectionState() == 2)
|
||||
@@ -4000,14 +4000,14 @@ void NukiWrapper::notify(Nuki::EventType eventType)
|
||||
{
|
||||
if(eventType == Nuki::EventType::KeyTurnerStatusReset)
|
||||
{
|
||||
_newSignal = false;
|
||||
_newSignal = 0;
|
||||
Log->println("KeyTurnerStatusReset");
|
||||
}
|
||||
else if(eventType == Nuki::EventType::KeyTurnerStatusUpdated)
|
||||
{
|
||||
if(!_statusUpdated && !_newSignal)
|
||||
if(!_statusUpdated && _newSignal < 5)
|
||||
{
|
||||
_newSignal = true;
|
||||
_newSignal++;
|
||||
Log->println("KeyTurnerStatusUpdated");
|
||||
_statusUpdated = true;
|
||||
_statusUpdatedTs = espMillis();
|
||||
|
||||
Reference in New Issue
Block a user