Fix undefined availability

This commit is contained in:
iranl
2025-01-23 22:07:12 +01:00
parent 7ca760ecc0
commit 1b668f8e71
5 changed files with 21 additions and 4 deletions

View File

@@ -476,6 +476,7 @@ bool NukiOpenerWrapper::updateKeyTurnerState()
Log->println("ms");
_nextLockStateUpdateTs = espMillis() + _retryDelay;
}
_network->publishKeyTurnerState(_keyTurnerState, _lastKeyTurnerState);
return false;
}
_retryLockstateCount = 0;
@@ -513,6 +514,14 @@ bool NukiOpenerWrapper::updateKeyTurnerState()
updateAuthData(false);
Log->println(("Done publishing auth data"));
}
if(_keyTurnerState.lockState == NukiOpener::LockState::Undefined)
{
if (_nextLockStateUpdateTs > espMillis() + 60000)
{
_nextLockStateUpdateTs = espMillis() + 60000;
}
}
updateGpioOutputs();
_network->publishKeyTurnerState(_keyTurnerState, _lastKeyTurnerState);