Use stack buffers and C-strings to avoid heap allocations, and modernize token handling and ownership.
- Replace heap-allocated std::string temporaries in dlms_parser.cpp with stack buffers and pass const char* to callbacks/logs to reduce allocations and copying.
- Change DlmsDataCallback signature to accept const char* for obis and string values; update DlmsPushComponent to match.
- Switch DlmsParser ownership to std::unique_ptr in DlmsPushComponent and add <memory> include.
- Replace std::list with std::vector for DSL token parsing, update iteration/insertion logic accordingly.
- Remove unused <list> include and adjust related function signatures/whitespace.
These changes improve performance and memory usage; note the callback/API signature change may require updating any external callers.
Change DlmsParser::data_to_string_ and obis_to_string_ signatures to return void and write into the provided caller buffer instead of returning std::string (avoids allocations and clarifies ownership).
Also add #include "esphome/core/application.h" in dlms_push.cpp for required declarations.
Replace heavy std::string/iostream usage in the DLMS parser with stack-allocated char buffers and snprintf to avoid heap allocations and reduce runtime overhead. Introduce buffer-based helpers (data_to_string_, obis_to_string_) and switch hex formatting to format_hex_pretty_to; remove <sstream>/<iomanip> and include <cstdio>. Update header signatures accordingly. Also change DlmsPushComponent to use App.get_loop_component_start_time() instead of millis() when tracking last_rx_char_time_ for RX timeout handling.
Files changed: components/dlms_push/dlms_parser.cpp/.h (buffer-based string helpers, logging, include changes), components/dlms_push/dlms_push.cpp (use App loop time for timeout).
Note: The string helper APIs were converted to buffer-oriented versions — update any callers to provide an output buffer.
dlms_push is a complete rewrite of the component using common esphome structure. The new component no longer uses Gurux library so it is significantly smaller and easier to maintain.
Update README (EN/CZ) to document dlms_push, replace xt211 examples, and expose new config options (show_log, receive_timeout, custom_pattern).
Also update esphome-smartmeter.yaml accordingly.