Try custome code
# Basic Config
esphome:
name: kc868-a6-test
friendly_name: KC868_A6_Test
external_components:
- source:
type: git
url:
https://github.com/hzkincony/esphome-tuya-iot
ref: v1.2.1
esp32:
board: esp32dev
framework:
type: arduino
src/esphome/components/tuya_iot/tuya_iot_component.cpp: In member function 'virtual void esphome::tuya_iot::TuyaIotComponent::update()':
src/esphome/components/tuya_iot/tuya_iot_component.cpp:292:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'username'
292 | mqtt_cfg_.username = username;
| ^~~~~~~~
In file included from src/esphome/core/component.h:8,
from src/esphome/core/application.h:7,
from src/esphome/components/api/api_frame_helper.h:12,
from src/esphome/components/api/api_connection.h:5,
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/tuya_iot/tuya_iot_component.cpp:293:49: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'username'
293 | ESP_LOGD(TAG, "username: %s", mqtt_cfg_.username);
| ^~~~~~~~
src/esphome/core/log.h:99:100: note: in definition of macro 'esph_log_d'
99 | ::esphome::esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
| ^~~~~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:293:9: note: in expansion of macro 'ESP_LOGD'
293 | ESP_LOGD(TAG, "username: %s", mqtt_cfg_.username);
| ^~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:297:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'password'
297 | mqtt_cfg_.password = password_str;
| ^~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:298:49: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'password'
298 | ESP_LOGD(TAG, "password: %s", mqtt_cfg_.password);
| ^~~~~~~~
src/esphome/core/log.h:99:100: note: in definition of macro 'esph_log_d'
99 | ::esphome::esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
| ^~~~~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:298:9: note: in expansion of macro 'ESP_LOGD'
298 | ESP_LOGD(TAG, "password: %s", mqtt_cfg_.password);
| ^~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:302:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'uri'
302 | mqtt_cfg_.uri = uri;
| ^~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:303:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'cert_pem'
303 | mqtt_cfg_.cert_pem = tuya_cacert_pem;
| ^~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:304:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'cert_len'
304 | mqtt_cfg_.cert_len = sizeof(tuya_cacert_pem);
| ^~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:305:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'skip_cert_common_name_check'
305 | mqtt_cfg_.skip_cert_common_name_check = true;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:306:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'use_global_ca_store'
306 | mqtt_cfg_.use_global_ca_store = false;
| ^~~~~~~~~~~~~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:308:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'protocol_ver'
308 | mqtt_cfg_.protocol_ver = MQTT_PROTOCOL_V_3_1_1;
| ^~~~~~~~~~~~
src/esphome/components/tuya_iot/tuya_iot_component.cpp:311:19: error: 'esp_mqtt_client_config_t' {aka 'struct esp_mqtt_client_config_t'} has no member named 'client_id'
311 | mqtt_cfg_.client_id = client_id;
| ^~~~~~~~~
Compiling .pioenvs/kc868-a6-test/src/esphome/components/web_server_base/web_server_base.cpp.o
*** [.pioenvs/kc868-a6-test/src/esphome/components/tuya_iot/tuya_iot_component.cpp.o] Error 1
========================= [FAILED] Took 403.43 seconds =========================