Use ESPHOME_DEBUG_API guard instead of DEBUG

CI compile tests also define DEBUG, so a dedicated guard is needed.
Enable ESPHOME_DEBUG_API in integration tests via conftest.py.
This commit is contained in:
J. Nick Koston
2026-02-11 11:34:14 -06:00
parent e63308aa33
commit 242d152edc
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -197,6 +197,7 @@ async def yaml_config(request: pytest.FixtureRequest, unused_tcp_port: int) -> s
" platformio_options:\n"
" build_flags:\n"
' - "-DDEBUG" # Enable assert() statements\n'
' - "-DESPHOME_DEBUG_API" # Enable API protocol asserts\n'
' - "-g" # Add debug symbols',
)