mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 11:26:39 +00:00
[event] Use register_apply_action for event.trigger (#19508)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
This commit is contained in:
co-authored by
Jonathan Swoboda
parent
281c54bcb8
commit
c1d82168d8
@@ -18,3 +18,15 @@ event:
|
||||
// Log using %.*s format for StringRef
|
||||
ESP_LOGD("test", "Event type: %.*s", (int) event_type.size(), event_type.c_str());
|
||||
}
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Trigger Event
|
||||
on_press:
|
||||
- event.trigger:
|
||||
id: some_event
|
||||
event_type: template_event_type1
|
||||
- event.trigger:
|
||||
id: some_event
|
||||
event_type: !lambda |-
|
||||
return id(some_event).has_event() ? "template_event_type2" : "template_event_type1";
|
||||
|
||||
Reference in New Issue
Block a user