Support for ESPHOME 2025.2.0. Convert to external components.
Get it working on ESPHOME 2025.2.0 and later, which no longer supports custom components. Had to rearrange the code quite a bit to create external components. I'm new to ESPHOME development, but at least in my homeassistant setup, everything is working.
Works like a charm, thank you @sharsky68!
Thanks @sharsky68 🚀 Some (minor) issues with this PR tho:
-
WARNING Using
switch.SWITCH_SCHEMAis deprecated and will be removed in ESPHome 2025.11.0. Please useswitch.switch_schema(...)instead. If you are seeing this, report an issue to the external_component author and ask them to update it. https://developers.esphome.io/blog/2025/05/14/_schema-deprecations/. Component using this schema: itho -
Don't delete example
HA_configuration.yaml -
Please keep:
id: fanspeedid: fantimerid: lastidinstead of:
id: sensor_fanspeedid: sensor_fantimerid: sensor_lastidsensor_prefix causes backwards compatibility issues withHA_configuration.yamland other existing scripts. Adding these prefixes is also somewhat unnecessary as HA addssensor.domain to the entities anyway.
Thanks for your comments @dfsx1. I have changed the code accordingly. Hope this is ok.
@dfsx1 Learning from your comments. Please let me know if anything else pops up.
I tried compiling the project in esphome 2025.9.3, but it fails and I can't pinpoint the issue here. Any guess what's going wrong here?
INFO Reading configuration /config/esphome/itho.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing itho3 (board: nodemcuv2; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESPAsyncTCP @ 2.0.0
|-- SPI @ 1.0
|-- ITHO-Lib @ 0.0.0+20251008152223.sha.1a5486f
|-- ESP8266WiFi @ 1.0
|-- ESPAsyncWebServer @ 3.7.10
|-- DNSServer @ 1.1.1
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.10
|-- ArduinoJson @ 7.4.2
Linking .pioenvs/itho3/firmware.elf
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/itho3/src/main.cpp.o:(.text.setup+0x1c0): undefined reference to `_ZN7esphome4itho7FanRecvC1Ev'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/itho3/src/main.cpp.o:(.text.setup+0x1c4): undefined reference to `_ZN7esphome4itho7FanRecv12set_fanspeedEPNS_11text_sensor10TextSensorE'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/itho3/src/main.cpp.o:(.text.setup+0x1c8): undefined reference to `_ZN7esphome4itho7FanRecv12set_fantimerEPNS_11text_sensor10TextSensorE'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/itho3/src/main.cpp.o:(.text.setup+0x1cc): undefined reference to `_ZN7esphome4itho7FanRecv10set_lastidEPNS_11text_sensor10TextSensorE'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/itho3/src/main.cpp.o: in function `setup':
main.cpp:(.text.setup+0xbec): undefined reference to `_ZN7esphome4itho7FanRecvC1Ev'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: main.cpp:(.text.setup+0xc0f): undefined reference to `_ZN7esphome4itho7FanRecv12set_fanspeedEPNS_11text_sensor10TextSensorE'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: main.cpp:(.text.setup+0xc19): undefined reference to `_ZN7esphome4itho7FanRecv12set_fantimerEPNS_11text_sensor10TextSensorE'
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: main.cpp:(.text.setup+0xc23): undefined reference to `_ZN7esphome4itho7FanRecv10set_lastidEPNS_11text_sensor10TextSensorE'
collect2: error: ld returned 1 exit status
*** [.pioenvs/itho3/firmware.elf] Error 1
========================== [FAILED] Took 3.39 seconds ==========================```
Convert to external components merged to master branch