mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 05:24:14 +00:00
[rtttl] Gate on_finished_playback callback storage behind define
Wrap the on_finished_playback CallbackManager storage, registration method and call site behind USE_RTTTL_FINISHED_PLAYBACK_CALLBACK so configs without an on_finished_playback automation pay zero RAM and zero flash for it. Keeps CallbackManager rather than switching to StaticCallbackManager because rtttl is MULTI_CONF — a per-class compile-time N would force every instance to reserve max(callbacks_per_instance) slots.
This commit is contained in:
@@ -29,3 +29,8 @@ output:
|
||||
|
||||
rtttl:
|
||||
output: rtttl_output
|
||||
on_finished_playback:
|
||||
- then:
|
||||
- logger.log: "Playback finished 1"
|
||||
- then:
|
||||
- logger.log: "Playback finished 2"
|
||||
|
||||
Reference in New Issue
Block a user