mirror of
https://github.com/esphome/esphome.git
synced 2025-09-30 17:12:20 +01:00
nesting
This commit is contained in:
@@ -149,13 +149,11 @@ void ESP32ImprovComponent::loop() {
|
|||||||
}
|
}
|
||||||
case improv::STATE_AUTHORIZED: {
|
case improv::STATE_AUTHORIZED: {
|
||||||
#ifdef USE_BINARY_SENSOR
|
#ifdef USE_BINARY_SENSOR
|
||||||
if (this->authorizer_ != nullptr) {
|
if (this->authorizer_ != nullptr && now - this->authorized_start_ > this->authorized_duration_) {
|
||||||
if (now - this->authorized_start_ > this->authorized_duration_) {
|
|
||||||
ESP_LOGD(TAG, "Authorization timeout");
|
ESP_LOGD(TAG, "Authorization timeout");
|
||||||
this->set_state_(improv::STATE_AWAITING_AUTHORIZATION);
|
this->set_state_(improv::STATE_AWAITING_AUTHORIZATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
if (!this->check_identify_()) {
|
if (!this->check_identify_()) {
|
||||||
this->set_status_indicator_state_((now % 1000) < 500);
|
this->set_status_indicator_state_((now % 1000) < 500);
|
||||||
|
Reference in New Issue
Block a user