08-04-2024, 12:10 AM
Hello,
I am trying to use your librairy but seem to always have the same compilation error, using the exemple or my own code. Maybe you have an idea of what it can be please?
(of course I have a license for the product, hc868-a6, but almost sure it's not related)
Thank you very much
I am trying to use your librairy but seem to always have the same compilation error, using the exemple or my own code. Maybe you have an idea of what it can be please?
(of course I have a license for the product, hc868-a6, but almost sure it's not related)
Code:
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::subscribe_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.h:21,
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::string &data, const json_parse_t &f);
^~~~~~~~~~
Compiling .pioenvs/tuya-test/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
*** [.pioenvs/tuya-test/src/esphome/components/tuya_iot/tuya_iot_component.cpp.o] Error 1
========================= [FAILED] Took 55.72 seconds =========================
Thank you very much