TekOnline

ESPHome StringRef Compile Error on the 4-Zone Wall Controller

Some customers using the TekOnline 4-Zone Wall Controller may see a compile error when flashing the newer hold-to-dim firmware in ESPHome.

The error looks similar to:

cannot convert 'esphome::StringRef' to 'const char*' in initialization

It may point to a line similar to:

const char *spill = id(spill_zone).current_option();

What caused it

This was an ESPHome version compatibility issue.

The firmware was originally tested locally with an older ESPHome version. That local environment accepted the YAML and compiled successfully.

Some customer ESPHome dashboards are now running newer versions, including ESPHome 2026.4.5. In those newer versions, current_option() returns an esphome::StringRef instead of a normal const char *.

That means the firmware can fail during compile before anything is flashed to the ESP32.

Was local flashing the problem?

No.

The difference was the ESPHome version doing the compile, not whether the board was flashed locally or through the ESPHome dashboard.

  • Older local ESPHome version: compiled successfully
  • ESPHome 2026.4.5: failed with the StringRef error
  • Fixed firmware on ESPHome 2026.4.5: compiles successfully

If the compile fails, no flashing method will work because no valid firmware binary is produced.

The fix

The firmware has been updated to use ESPHome's newer string handling correctly.

The old code used:

const char *spill = id(spill_zone).current_option();

The fixed firmware uses:

auto spill = id(spill_zone).current_option();

and then compares it directly:

if (spill == "Zone 1") {

This works with the newer ESPHome StringRef return type.

What to download

Use the current public firmware download from the latest firmware article:

https://www.tekonline.com.au/4-zone-wall-controller-firmware-v2026-05-17-relay-inversion-ota-version/

The current download includes the StringRef fix, per-zone relay inversion controls, OTA support, and a Home Assistant-visible TekOnline firmware version.

WordPress stores the file as .txt, so after downloading it, rename it from:

tekonline-4zone-wall-controller-v2026-05-17.txt

to:

tekonline-4zone-wall-controller-v2026-05-17.yml

Then add it to your ESPHome configuration folder and compile or install it from ESPHome.

The firmware version shown in Home Assistant is:

2026.05.17-v2-hold-dimmer-unique-spill-invert

If the board was wiped

If the ESP32 flash has been wiped, OTA flashing will not work yet.

OTA only works once ESPHome firmware is already running on the board and the device is reachable on your network.

If the board has been wiped, use USB flashing first:

  1. Connect the board to the computer running ESPHome.
  2. Open ESPHome Dashboard.
  3. Use Install.
  4. Choose the USB or serial option.
  5. Flash the fixed YAML.

After that first USB flash, future updates can usually be done over the network if the device is online.

Setup guide

The 4-zone setup guide is here:

https://www.tekonline.com.au/4-zone-wall-controller-setup/

Need help?

Contact TekOnline and include:

  • your ESPHome version
  • whether you are flashing by USB or OTA
  • a screenshot of the compile error
  • the firmware version shown in Home Assistant, if the device is still online
  • whether the board still appears on your network

Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *