Skip to content

fix(levoit): build without the wifi component, for Ethernet boards - #86

Draft
benedikt-bartscher wants to merge 2 commits into
tuct:mainfrom
benedikt-bartscher:fix/build-without-wifi
Draft

benedikt-bartscher wants to merge 2 commits into
tuct:mainfrom
benedikt-bartscher:fix/build-without-wifi

Conversation

@benedikt-bartscher

@benedikt-bartscher benedikt-bartscher commented Nov 1, 2026 •

Copy link
Copy Markdown

What

The levoit component no longer needs the wifi component. Configs that use an external ESP32 with Ethernet instead of Wi-Fi now build.

Why

levoit.cpp included esphome/components/wifi/wifi_component.h and read wifi::global_wifi_component to drive the purifier's Wi-Fi LED. On a wired board there is no wifi component, so the build stopped with:

levoit.cpp:7:10: fatal error: esphome/components/wifi/wifi_component.h: No such file or directory

I hit this wiring an Olimex ESP32-POE2 (LAN8720, PoE) to a Vital 100S in place of the stock ESP32-C3, which is the "Install New ESP32" route from the device page, just with Ethernet.

network::is_connected() / network::is_disabled() answer the same question for Wi-Fi and Ethernet, and both components auto-load network. So the LED now follows the network state on either, and Wi-Fi behaviour is unchanged. The WiFi component not found warning branch had no remaining case and is removed.

Changes

  • levoit.cpp: network/util.h instead of wifi/wifi_component.h; LED status from network::is_connected() / is_disabled()
  • New compile test components/levoit/tests/test-ethernet.yaml (Ethernet, no wifi, ESP32-POE2 pins), added to CI for levoit only via a matrix include (Philips has no wired test config)
  • Tests README, CONTRIBUTING CI table, component change log and project CHANGELOG entries

Verified

  • esphome compile of test-ethernet.yaml and test-fan-only.yaml with ESPHome 2026.10.0 (esp-idf): both build
  • The same Ethernet setup fails on main with the error above

Tested on hardware: Olimex ESP32-POE2 (ESP32-WROVER-E, LAN8710A, Ethernet only, no wifi component) wired to a Vital 100S (Vital 100S-C_V1.3P1.4, MCU FW 1.0.5) in place of the stock ESP32-C3, which is held in reset. Built with ESPHome 2026.10.1 from this branch:

  • Ethernet comes up, DHCP lease, API and OTA over Ethernet work
  • MCU → ESP: status frames decode, all sensors populate
  • ESP → MCU: acks are accepted (no more resends) and a fan-on command gets a 0x12 response from the MCU

Not checked: how the purifier's Wi-Fi LED looks with Ethernet; by the code it follows network::is_connected() like on Wi-Fi. Wiring notes for this setup are in #87.

The Wi-Fi LED status read wifi::global_wifi_component and included
wifi/wifi_component.h unconditionally. A config that uses an external
ESP32 with Ethernet (e.g. an Olimex ESP32-POE2 wired to the MCU UART)
has no wifi component, so the build failed on that header.

network::is_connected() and network::is_disabled() answer the same
question for Wi-Fi and Ethernet, and both components auto-load network,
so the LED now shows the network state on either. Wi-Fi behaviour is
unchanged. The "WiFi component not found" branch had no remaining case
and is dropped.
test-ethernet.yaml has no wifi component, so code that depends on it
fails here instead of on a user's wired board. It runs for levoit only:
the workflow matrix crosses every component with every config, so the
config is added through include rather than to the shared list.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant