![]() |
|
DM4 ESPHome yaml for home assistant with tuya - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: Getting Started with ESPHome and Home Assistant (https://www.kincony.com/forum/forumdisplay.php?fid=54) +--- Thread: DM4 ESPHome yaml for home assistant with tuya (/showthread.php?tid=9373) |
DM4 ESPHome yaml for home assistant with tuya - pavel.hajn - 05-30-2026 Hello, is possible to use DM4 with ESPHome and Tuya ? B8M works fine, but DM4 has some trouble in tuya_wifi_mcu_light_output.cpp Here is the log: Reading CMake configuration... Dependency Graph |-- noise-c @ 0.1.11 |-- Tuya_WiFi_MCU_SDK @ 0.0.3+sha.66c750a Compiling .pioenvs/kin-dm4/src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp.o Compiling .pioenvs/kin-dm4/src/esphome/components/uart/uart_component_esp_idf.cpp.o Compiling .pioenvs/kin-dm4/src/esphome/components/uart/uart_debugger.cpp.o Compiling .pioenvs/kin-dm4/src/esphome/components/watchdog/watchdog.cpp.o Compiling .pioenvs/kin-dm4/src/esphome/components/web_server/list_entities.cpp.o src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp: In member function 'virtual void esphome::tuya_wifi_mcu::TuyaWifiMcuLightOutput: etup()':src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp:10:28: error: 'class esphome::light::LightState' has no member named 'add_new_remote_values_callback' 10 | this->bind_light_->add_new_remote_values_callback([this]() { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp: In lambda function: src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp:15:47: warning: 'float esphome::gamma_uncorrect(float, float)' is deprecated: Use LightState::gamma_uncorrect_lut() instead. Removed in 2026.9.0. [-Wdeprecated-declarations] 15 | this->tuya_bright_ = gamma_uncorrect(bright, this->bind_light_->get_gamma_correct()) * 100; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/esphome/components/i2c/i2c.h:5, from src/esphome/components/ads1115/ads1115.h:3, from src/esphome.h:3, from src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.h:3, from src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp:1: src/esphome/core/helpers.h:1597:7: note: declared here 1597 | float gamma_uncorrect(float value, float gamma); | ^~~~~~~~~~~~~~~ src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp: In member function 'virtual void esphome::tuya_wifi_mcu::TuyaWifiMcuLightOutput::process_dp_data(const unsigned char*, short unsigned int)': src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp:33:47: warning: 'float esphome::gamma_correct(float, float)' is deprecated: Use LightState::gamma_correct_lut() instead. Removed in 2026.9.0. [-Wdeprecated-declarations] 33 | this->output_->set_level(gamma_correct(bright, this->bind_light_->get_gamma_correct())); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/esphome/core/helpers.h:1593:7: note: declared here 1593 | float gamma_correct(float value, float gamma); | ^~~~~~~~~~~~~ src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp:35:47: warning: 'float esphome::gamma_correct(float, float)' is deprecated: Use LightState::gamma_correct_lut() instead. Removed in 2026.9.0. [-Wdeprecated-declarations] 35 | this->output_->set_level(gamma_correct(bright, 2.8)); | ~~~~~~~~~~~~~^~~~~~~~~~~~~ src/esphome/core/helpers.h:1593:7: note: declared here 1593 | float gamma_correct(float value, float gamma); | ^~~~~~~~~~~~~ Compiling .pioenvs/kin-dm4/src/esphome/components/web_server/web_server.cpp.o Compiling .pioenvs/kin-dm4/src/esphome/components/web_server_base/web_server_base.cpp.o *** [.pioenvs/kin-dm4/src/esphome/components/tuya_wifi_mcu/light/tuya_wifi_mcu_light_output.cpp.o] Error 1 ========================= [FAILED] Took 93.00 seconds ========================= Kind Regards Pavel Hajn RE: DM4 ESPHome yaml for home assistant with tuya - admin - 05-30-2026 we will test it , then feedback to you. maybe need update tuya component for dimmer board, now the tuya component only use for ON/OFF device. |