fix bug in ring detection

This commit is contained in:
technyon
2022-09-03 09:34:44 +02:00
parent 3099fc5827
commit 2c0eba4e0e
3 changed files with 3 additions and 3 deletions

View File

@@ -90,9 +90,9 @@ void NukiOpenerWrapper::update()
if(_statusUpdated || _nextLockStateUpdateTs == 0 || ts >= _nextLockStateUpdateTs)
{
_statusUpdated = false;
_nextLockStateUpdateTs = ts + _intervalLockstate * 1000;
updateKeyTurnerState();
_statusUpdated = false;
}
if(_nextBatteryReportTs == 0 || ts > _nextBatteryReportTs)
{
@@ -148,7 +148,7 @@ void NukiOpenerWrapper::updateKeyTurnerState()
{
_nukiOpener.requestOpenerState(&_keyTurnerState);
if(_keyTurnerState.lockState == NukiOpener::LockState::Locked && _lastKeyTurnerState.lockState == NukiOpener::LockState::Locked)
if(_statusUpdated && _keyTurnerState.lockState == NukiOpener::LockState::Locked && _lastKeyTurnerState.lockState == NukiOpener::LockState::Locked)
{
Serial.println(F("Nuki opener: Ring detected"));
_network->publishRing();

View File

@@ -1,3 +1,3 @@
#pragma once
#define nuki_hub_version "5.13"
#define nuki_hub_version "5.14"

Binary file not shown.