Add Alarm Control Panel (#4770)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Graham Brown
2023-06-15 02:34:39 +02:00
committed by GitHub
parent 0411d52420
commit 54474e5b33
37 changed files with 1860 additions and 6 deletions

View File

@@ -246,6 +246,21 @@ void ComponentIterator::advance() {
}
}
break;
#endif
#ifdef USE_ALARM_CONTROL_PANEL
case IteratorState::ALARM_CONTROL_PANEL:
if (this->at_ >= App.get_alarm_control_panels().size()) {
advance_platform = true;
} else {
auto *a_alarm_control_panel = App.get_alarm_control_panels()[this->at_];
if (a_alarm_control_panel->is_internal() && !this->include_internal_) {
success = true;
break;
} else {
success = this->on_alarm_control_panel(a_alarm_control_panel);
}
}
break;
#endif
case IteratorState::MAX:
if (this->on_end()) {