ESPHOME-ITHO icon indicating copy to clipboard operation
ESPHOME-ITHO copied to clipboard

Support for ESPHOME 2025.2.0. Convert to external components.

Open sharsky68 opened this issue 10 months ago • 5 comments

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.

sharsky68 avatar Apr 25 '25 09:04 sharsky68

Works like a charm, thank you @sharsky68!

svanrossem avatar Apr 27 '25 08:04 svanrossem

Thanks @sharsky68 🚀 Some (minor) issues with this PR tho:

  1. WARNING Using switch.SWITCH_SCHEMA is deprecated and will be removed in ESPHome 2025.11.0. Please use switch.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

  2. Don't delete example HA_configuration.yaml

  3. Please keep: id: fanspeed id: fantimer id: lastid

    instead of: id: sensor_fanspeed id: sensor_fantimer id: sensor_lastid

    sensor_ prefix causes backwards compatibility issues with HA_configuration.yaml and other existing scripts. Adding these prefixes is also somewhat unnecessary as HA adds sensor. domain to the entities anyway.

dfsx1 avatar Jul 07 '25 22:07 dfsx1

Thanks for your comments @dfsx1. I have changed the code accordingly. Hope this is ok.

sharsky68 avatar Aug 30 '25 12:08 sharsky68

@dfsx1 Learning from your comments. Please let me know if anything else pops up.

sharsky68 avatar Sep 08 '25 21:09 sharsky68

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 ==========================```

jan-dewit avatar Oct 08 '25 13:10 jan-dewit

Convert to external components merged to master branch

jodur avatar Jan 09 '26 20:01 jodur