Skip to content

Commit 8cfb2ea

Browse files
committed
fix: fix Arduino build with ESPHome 2025.10.0+
Fixes #42
1 parent 774c41b commit 8cfb2ea

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

components/nspanel_lovelace/nspanel_lovelace.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,7 @@ void NSPanelLovelace::exit_reparse_mode() {
218218
}
219219

220220
void NSPanelLovelace::set_baud_rate_(int baud_rate) {
221-
// hopefully on NSPanel it should always be an ESP32ArduinoUARTComponent instance
222-
#ifdef USE_ARDUINO
223-
auto *uart = reinterpret_cast<uart::ESP32ArduinoUARTComponent *>(this->parent_);
224-
#endif
225-
#ifdef USE_ESP_IDF
226221
auto *uart = reinterpret_cast<uart::IDFUARTComponent *>(this->parent_);
227-
#endif
228222
uart->set_baud_rate(baud_rate);
229223
uart->setup();
230224
}

components/nspanel_lovelace/nspanel_lovelace.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44

55
#include "esphome/components/mqtt/mqtt_client.h"
66
#include "esphome/components/uart/uart.h"
7+
#include "esphome/components/uart/uart_component_esp_idf.h"
78
#include "esphome/core/automation.h"
89
#include "esphome/core/component.h"
910
#include "esphome/core/defines.h"
1011

1112
#ifdef USE_ARDUINO
12-
#include "esphome/components/uart/uart_component_esp32_arduino.h"
1313
#include <HTTPClient.h>
1414
#endif
1515
#ifdef USE_ESP_IDF
16-
#include "esphome/components/uart/uart_component_esp_idf.h"
1716
#include <esp_http_client.h>
1817
#endif
1918

0 commit comments

Comments
 (0)