1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-16 14:55:50 +00:00

Add arm night to alarm control panel (#5186)

This commit is contained in:
Francesco Ciocchetti
2023-08-08 01:57:40 +02:00
committed by GitHub
parent ffd2cb9814
commit a6b89e4e8a
8 changed files with 84 additions and 1 deletions

View File

@@ -85,6 +85,11 @@ void AlarmControlPanelCall::validate_() {
this->state_.reset();
return;
}
if (state == ACP_STATE_ARMED_NIGHT && (this->parent_->get_supported_features() & ACP_FEAT_ARM_NIGHT) == 0) {
ESP_LOGW(TAG, "Cannot arm night when not supported");
this->state_.reset();
return;
}
}
}