Use a wait_until when checking the value.