Update event.cpp

This commit is contained in:
Nick Kinnan 2024-10-15 22:37:32 -07:00 committed by GitHub
parent 1faf844e41
commit acc3b7a254
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,8 +13,8 @@ void Event::trigger(const std::string &event_type) {
ESP_LOGE(TAG, "'%s': invalid event type for trigger(): %s", this->get_name().c_str(), event_type.c_str()); ESP_LOGE(TAG, "'%s': invalid event type for trigger(): %s", this->get_name().c_str(), event_type.c_str());
return; return;
} }
state = &(*found); last_event_type_ = &(*found);
ESP_LOGD(TAG, "'%s' Triggered event '%s'", this->get_name().c_str(), state->c_str()); ESP_LOGD(TAG, "'%s' Triggered event '%s'", this->get_name().c_str(), last_event_type_->c_str());
this->event_callback_.call(event_type); this->event_callback_.call(event_type);
} }