diff --git a/homeassistant/components/verisure/lock.py b/homeassistant/components/verisure/lock.py index 96e40c5c36f0beb04041f6541aee944e60d6adbb..28efb64c71e6308e36e075157d3167844a708fec 100644 --- a/homeassistant/components/verisure/lock.py +++ b/homeassistant/components/verisure/lock.py @@ -126,9 +126,14 @@ class VerisureDoorlock(LockEntity): )["doorLockStateChangeTransactionId"] _LOGGER.debug("Verisure doorlock %s", state) transaction = {} + attempts = 0 while "result" not in transaction: - sleep(0.5) transaction = hub.session.get_lock_state_transaction(transaction_id) + attempts += 1 + if attempts == 30: + break + if attempts > 1: + sleep(0.5) if transaction["result"] == "OK": self._state = state self._change_timestamp = monotonic()