Fix Ring detection

This commit is contained in:
iranl
2024-11-04 21:14:53 +01:00
parent 791c7e21fe
commit 7ea04e6366
8 changed files with 41 additions and 35 deletions

View File

@@ -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();