From f4adf70228c3f3de3927920dde7761d3e173ef7c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Jun 2025 08:17:17 +0100 Subject: [PATCH] preen --- esphome/components/api/api_pb2_service.cpp | 78 ---------------------- script/api_protobuf/api_protobuf.py | 2 - 2 files changed, 80 deletions(-) diff --git a/esphome/components/api/api_pb2_service.cpp b/esphome/components/api/api_pb2_service.cpp index 1eea8a9c9e..dacb23c12b 100644 --- a/esphome/components/api/api_pb2_service.cpp +++ b/esphome/components/api/api_pb2_service.cpp @@ -14,84 +14,6 @@ void APIServerConnectionBase::log_send_message_(const char *name, const std::str } #endif -#ifdef USE_COVER -#endif -#ifdef USE_FAN -#endif -#ifdef USE_LIGHT -#endif -#ifdef USE_SWITCH -#endif -#ifdef USE_API_NOISE -#endif -#ifdef USE_ESP32_CAMERA -#endif -#ifdef USE_CLIMATE -#endif -#ifdef USE_NUMBER -#endif -#ifdef USE_SELECT -#endif -#ifdef USE_SIREN -#endif -#ifdef USE_LOCK -#endif -#ifdef USE_BUTTON -#endif -#ifdef USE_MEDIA_PLAYER -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_BLUETOOTH_PROXY -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_VOICE_ASSISTANT -#endif -#ifdef USE_ALARM_CONTROL_PANEL -#endif -#ifdef USE_TEXT -#endif -#ifdef USE_DATETIME_DATE -#endif -#ifdef USE_DATETIME_TIME -#endif -#ifdef USE_VALVE -#endif -#ifdef USE_DATETIME_DATETIME -#endif -#ifdef USE_UPDATE -#endif bool APIServerConnectionBase::read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) { switch (msg_type) { case 1: { diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index f40ed7b80c..8ecac829ae 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -968,7 +968,6 @@ def build_service_message_type( # Only add ifdef when we're actually generating content if ifdef is not None: hout += f"#ifdef {ifdef}\n" - cout += f"#ifdef {ifdef}\n" # Generate receive func = f"on_{snake}" hout += f"virtual void {func}(const {mt.name} &value){{}};\n" @@ -990,7 +989,6 @@ def build_service_message_type( # Only close ifdef if we opened it if ifdef is not None: hout += "#endif\n" - cout += "#endif\n" return hout, cout