This commit is contained in:
J. Nick Koston
2025-11-28 16:42:03 -06:00
parent 4ab1911d82
commit 913581e7ee
2 changed files with 2 additions and 12 deletions
@@ -60,16 +60,6 @@ class AlarmControlPanel : public EntityBase {
*/
void add_on_ready_callback(std::function<void()> &&callback);
/** Notify chime event listeners
*
*/
void notify_chime() { this->chime_callback_.call(); }
/** Notify ready state change listeners
*
*/
void notify_ready() { this->ready_callback_.call(); }
/** A numeric representation of the supported features as per HomeAssistant
*
*/
@@ -133,7 +133,7 @@ void TemplateAlarmControlPanel::loop() {
if ((!this->sensor_data_[info.store_index].last_chime_state) && (sensor->state)) {
// Must be disarmed to chime
if (this->current_state_ == ACP_STATE_DISARMED) {
this->notify_chime();
this->chime_callback_.call();
}
}
// Record the sensor state change
@@ -182,7 +182,7 @@ void TemplateAlarmControlPanel::loop() {
// Call the ready state change callback if there was a change
if (this->sensors_ready_ != sensors_ready) {
this->sensors_ready_ = sensors_ready;
this->notify_ready();
this->ready_callback_.call();
}
#endif