mirror of
https://github.com/esphome/esphome.git
synced 2026-09-26 14:30:23 +00:00
[serial_proxy] New component (#13944)
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
co-authored by
J. Nick Koston
pre-commit-ci-lite[bot]
J. Nick Koston
parent
2c705810cd
commit
0c4a44566f
@@ -789,6 +789,22 @@ template<> const char *proto_enum_to_string<enums::SerialProxyRequestType>(enums
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
template<> const char *proto_enum_to_string<enums::SerialProxyStatus>(enums::SerialProxyStatus value) {
|
||||
switch (value) {
|
||||
case enums::SERIAL_PROXY_STATUS_OK:
|
||||
return "SERIAL_PROXY_STATUS_OK";
|
||||
case enums::SERIAL_PROXY_STATUS_ASSUMED_SUCCESS:
|
||||
return "SERIAL_PROXY_STATUS_ASSUMED_SUCCESS";
|
||||
case enums::SERIAL_PROXY_STATUS_ERROR:
|
||||
return "SERIAL_PROXY_STATUS_ERROR";
|
||||
case enums::SERIAL_PROXY_STATUS_TIMEOUT:
|
||||
return "SERIAL_PROXY_STATUS_TIMEOUT";
|
||||
case enums::SERIAL_PROXY_STATUS_NOT_SUPPORTED:
|
||||
return "SERIAL_PROXY_STATUS_NOT_SUPPORTED";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *HelloRequest::dump_to(DumpBuffer &out) const {
|
||||
@@ -2609,6 +2625,14 @@ const char *SerialProxyRequest::dump_to(DumpBuffer &out) const {
|
||||
dump_field(out, "type", static_cast<enums::SerialProxyRequestType>(this->type));
|
||||
return out.c_str();
|
||||
}
|
||||
const char *SerialProxyRequestResponse::dump_to(DumpBuffer &out) const {
|
||||
MessageDumpHelper helper(out, "SerialProxyRequestResponse");
|
||||
dump_field(out, "instance", this->instance);
|
||||
dump_field(out, "type", static_cast<enums::SerialProxyRequestType>(this->type));
|
||||
dump_field(out, "status", static_cast<enums::SerialProxyStatus>(this->status));
|
||||
dump_field(out, "error_message", this->error_message);
|
||||
return out.c_str();
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_BLUETOOTH_PROXY
|
||||
const char *BluetoothSetConnectionParamsRequest::dump_to(DumpBuffer &out) const {
|
||||
|
||||
Reference in New Issue
Block a user