Files
esphome/esphome/components/api/api_server.cpp
J. Nick Koston 9420fb8452 [api] Pass std::function by rvalue reference in state subscriptions
All subscribe_home_assistant_state, get_home_assistant_state, and
add_state_subscription_ methods were taking std::function by value
despite every caller passing a temporary or std::move()'d value.
Change to rvalue reference to eliminate unnecessary move+destroy
overhead at each forwarding layer.
2026-02-24 13:53:19 -06:00

24 KiB