mirror of
https://github.com/esphome/esphome.git
synced 2026-10-01 08:50:22 +00:00
more
This commit is contained in:
@@ -19,7 +19,7 @@ void log_button(const char *tag, const char *prefix, const char *type, Button *o
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Button::press() {
|
void Button::press() {
|
||||||
ESP_LOGD(TAG, "'%s' Pressed.", this->get_name().c_str());
|
ESP_LOGD(TAG, "'%s' >> Pressed", this->get_name().c_str());
|
||||||
this->press_action();
|
this->press_action();
|
||||||
this->press_callback_.call();
|
this->press_callback_.call();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ void Event::trigger(const std::string &event_type) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->last_event_type_ = found;
|
this->last_event_type_ = found;
|
||||||
ESP_LOGD(TAG, "'%s' Triggered event '%s'", this->get_name().c_str(), this->last_event_type_);
|
ESP_LOGD(TAG, "'%s' >> '%s'", this->get_name().c_str(), this->last_event_type_);
|
||||||
this->event_callback_.call(event_type);
|
this->event_callback_.call(event_type);
|
||||||
#if defined(USE_EVENT) && defined(USE_CONTROLLER_REGISTRY)
|
#if defined(USE_EVENT) && defined(USE_CONTROLLER_REGISTRY)
|
||||||
ControllerRegistry::notify_event(this);
|
ControllerRegistry::notify_event(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user