Repository navigation
fix(levoit): build without the wifi component, for Ethernet boards - #86
Draft
benedikt-bartscher wants to merge 2 commits into
Draft
benedikt-bartscher wants to merge 2 commits into
benedikt-bartscher wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The levoit component no longer needs the
wificomponent. Configs that use an external ESP32 with Ethernet instead of Wi-Fi now build.Why
levoit.cppincludedesphome/components/wifi/wifi_component.hand readwifi::global_wifi_componentto drive the purifier's Wi-Fi LED. On a wired board there is nowificomponent, so the build stopped with: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-loadnetwork. So the LED now follows the network state on either, and Wi-Fi behaviour is unchanged. TheWiFi component not foundwarning branch had no remaining case and is removed.Changes
levoit.cpp:network/util.hinstead ofwifi/wifi_component.h; LED status fromnetwork::is_connected()/is_disabled()components/levoit/tests/test-ethernet.yaml(Ethernet, nowifi, ESP32-POE2 pins), added to CI for levoit only via a matrixinclude(Philips has no wired test config)Verified
esphome compileoftest-ethernet.yamlandtest-fan-only.yamlwith ESPHome 2026.10.0 (esp-idf): both buildmainwith the error aboveTested on hardware: Olimex ESP32-POE2 (ESP32-WROVER-E, LAN8710A, Ethernet only, no
wificomponent) 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:0x12response from the MCUNot 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.