8000
Skip to content

[nextion] Fix clang-tidy error on Zephyr for HTTPClient - #12538

Merged
swoboda1337 merged 1 commit into
esphome:devfrom
swoboda1337:fix-nextion-zephyr-clang-tidy
Dec 17, 2025
Merged

[nextion] Fix clang-tidy error on Zephyr for HTTPClient#12538
swoboda1337 merged 1 commit into
esphome:devfrom
swoboda1337:fix-nextion-zephyr-clang-tidy

Conversation

@swoboda1337
Copy link
Copy Markdown
Member

What does this implement/fix?

Fixes clang-tidy error on Zephyr caused by #9429. The PR changed the preprocessor guard from #ifdef USE_ARDUINO ... #elif defined(USE_ESP_IDF) to #ifdef USE_ESP32 ... #else, but the #else branch catches Zephyr where HTTPClient doesn't exist.

This changes #else to #elif defined(USE_ARDUINO) to match the include guards at the top of the file which correctly use #elif defined(USE_ESP8266).

Error:

esphome/components/nextion/nextion.h:1437:25: error: unknown type name 'HTTPClient' [clang-diagnostic-error]

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Developer breaking change (an API change that could break external components)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

Pull request in esphome-docs with documentation (if applicable):

  • N/A

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx
  • nRF52840

Example entry for config.yaml:

# N/A - clang-tidy fix only

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file:

external_components:
  - source: github://pr#12538
    components: [nextion]
    refresh: 1h

(Added by the PR bot)

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi there! This PR modifies 1 file(s) with codeowners.

@edwardtfn, @SenexCrenshaw - As codeowner(s) of the affected files, your review would be appreciated! 🙏

Note: Automatic review request may have failed, but you're still welcome to review.

@codecov-commenter
codecov-commenter commented Dec 17, 2025
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.66%. Comparing base (0e71fa9) to head (ac9750f).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #12538   +/-   ##
=======================================
  Coverage   72.66%   72.66%           
=======================================
  Files          53       53           
  Lines       11193    11193           
  Branches     1517     1517           
=======================================
  Hits         8133     8133           
  Misses       2667     2667           
  Partials      393      393           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

Memory Impact Analysis

Components: nextion
Platform: esp8266-ard

Metric Target Branch This PR Change
RAM 31,688 bytes 31,688 bytes ➡️ +0 bytes (0.00%)
Flash 367,483 bytes 367,483 bytes ➡️ +0 bytes (0.00%)

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

@swoboda1337
Copy link
Copy Markdown
Member Author

Thanks

@swoboda1337
swoboda1337 merged commit d7b04a3 into esphome:dev Dec 17, 2025
36 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0