1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-18 03:02:20 +01:00

Refactor API send_message from template to non-template implementation (#9561)

This commit is contained in:
J. Nick Koston
2025-07-17 12:28:14 -10:00
committed by GitHub
parent 91e5bcf787
commit f5afe1145e
10 changed files with 52 additions and 47 deletions

View File

@@ -18,11 +18,11 @@ class APIServerConnectionBase : public ProtoService {
public:
#endif
template<typename T> bool send_message(const T &msg) {
bool send_message(const ProtoMessage &msg, uint8_t message_type) {
#ifdef HAS_PROTO_MESSAGE_DUMP
this->log_send_message_(msg.message_name(), msg.dump());
#endif
return this->send_message_(msg, T::MESSAGE_TYPE);
return this->send_message_(msg, message_type);
}
virtual void on_hello_request(const HelloRequest &value){};