1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-30 09:02:17 +01:00
This commit is contained in:
J. Nick Koston
2025-09-27 13:46:12 -05:00
parent 7e4cfe369d
commit f387e7690c

View File

@@ -149,13 +149,11 @@ void ESP32ImprovComponent::loop() {
}
case improv::STATE_AUTHORIZED: {
#ifdef USE_BINARY_SENSOR
if (this->authorizer_ != nullptr) {
if (now - this->authorized_start_ > this->authorized_duration_) {
if (this->authorizer_ != nullptr && now - this->authorized_start_ > this->authorized_duration_) {
ESP_LOGD(TAG, "Authorization timeout");
this->set_state_(improv::STATE_AWAITING_AUTHORIZATION);
return;
}
}
#endif
if (!this->check_identify_()) {
this->set_status_indicator_state_((now % 1000) < 500);