Hello,
Im currently trying to intergrate tuya to my KC868-A16, Im following the tutorial video "let ANY ESP32 relay board use Tuya app by ESPHome without ANY coding" and I'm getting an error message when I try to install the yaml file.
INFO ESPHome 2025.4.1
INFO Reading configuration /config/esphome/kc868-a16.yaml...
INFO Detected timezone 'America/Toronto'
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See
https://esphome.io/guides/faq.html#why-a...pping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing kc868-a16 (board: esp32dev; framework: arduino; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.3.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.6
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- cryptosuite2 @ 0.2.7
Compiling .pioenvs/kc868-a16/src/esphome/components/tuya_iot/tuya_iot_component.cpp.o
Compiling .pioenvs/kc868-a16/src/main.cpp.o
Archiving .pioenvs/kc868-a16/lib01c/libFS.a
Archiving .pioenvs/kc868-a16/libbc6/libUpdate.a
Compiling .pioenvs/kc868-a16/libdb6/ESPAsyncWebServer-esphome/AsyncWebSocket.cpp.o
Compiling .pioenvs/kc868-a16/libdb6/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o
src/esphome/components/tuya_iot/tuya_iot_component.cpp: In lambda function:
src/esphome/components/tuya_iot/tuya_iot_component.cpp:167:96: error: invalid initialization of reference of type 'const json_parse_t&' {aka 'const std::function<bool(ArduinoJson6185_D1::ObjectRef)>&'} from expression of type 'esphome::tuya_iot::TuyaIotComponent:

ubscribe_json(const string&, const mqtt_json_callback_t&, uint8_t)::<lambda(const string&, const string&)>::<lambda(ArduinoJson::JsonObject)>'
json::parse_json(payload, [topic, callback](JsonObject root) { callback(topic, root); });
^
In file included from src/esphome/core/string_ref.h:10,
from src/esphome/core/entity_base.h:5,
from src/esphome/components/binary_sensor/binary_sensor.h:4,
from src/esphome/core/controller.h:5,
from src/esphome/components/api/api_server.h:11,
from src/esphome/components/api/api_connection.h:8,
from src/esphome.h:3,
from src/esphome/components/tuya_iot/tuya_iot_component.h:3,
from src/esphome/components/tuya_iot/tuya_iot_component.cpp:1:
src/esphome/components/json/json_util.h:26:6: note: in passing argument 2 of 'bool esphome::json::parse_json(const string&, const json_parse_t&)'
bool parse_json(const std:

tring &data, const json_parse_t &f);
^~~~~~~~~~
*** [.pioenvs/kc868-a16/src/esphome/components/tuya_iot/tuya_iot_component.cpp.o] Error 1
========================== [FAILED] Took 8.88 seconds ==========================