Closed sirronb closed 3 years ago
Thanks for letting me know. I'll update my ESPHome instance shortly and try to take a look at this for you.
Hi @sirronb. I just took a look at this and ESPHome simply changed the lighting traits syntax. I just committed the updated code and it should be all set. Please give it a try and let me know if it works for you as well.
Hi @JeffResc. Still getting an error.
In file included from src/main.cpp:25:0: src/sonoff_l1.h: In member function 'virtual esphome::light::LightTraits SonoffL1::get_traits()': src/sonoff_l1.h:29:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_brightness' traits.set_supports_brightness(true); ^ src/sonoff_l1.h:30:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_rgb' traits.set_supports_rgb(true); ^ src/sonoff_l1.h:31:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_rgb_white_value' traits.set_supports_rgb_white_value(false); ^ src/sonoff_l1.h:32:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_color_temperature' traits.set_supports_color_temperature(false); ^ Compiling /data/led_strip_1/.pioenvs/led_strip_1/lib189/ESPAsyncTCP-esphome/tcp_axtls.c.o Compiling /data/led_strip_1/.pioenvs/led_strip_1/lib6f5/Hash/Hash.cpp.o *** [/data/led_strip_1/.pioenvs/led_strip_1/src/main.cpp.o] Error 1 ========================= [FAILED] Took 11.70 seconds =========================
Hi again,
From the looks of the error, it seems like you might have the wrong file? Can you double-check that this is the current header file that you are using?
Thanks :)
Hi Jeff, Yes the exact same one. The file is located in two places config/esphome/d1_dimmer/src/d1_dimmer_no_rf.h and config/esphome/d1_dimmer_no_rf.h
I've updated both as per your post and still have the same errors. Not sure if I need to restart HA. Thx for the quick replies too. Sirronb.
Hey Jeff, I must apologize with egg in my face. So So sorry. I was updating the Sonoff_L1 file. It's working perfectly. Thank you so much. Again sorry for the run around. Still I appreciate you for your time and input.
All the best. Sirronb.
Ah, no problem at all! Glad you got it working. Take care!
Hi Jeff, As of ESPHome Current version 2021.8.0 of today, the following errors are being reported when attempting to update devices with this version of ESPHome:
In file included from src/main.cpp:19:0: src/d1_dimmer_no_rf.h: In member function 'virtual esphome::light::LightTraits Sonoff_D1_Dimmer::get_traits()': src/d1_dimmer_no_rf.h:54:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_brightness' traits.set_supports_brightness(true); ^ src/d1_dimmer_no_rf.h:55:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_rgb' traits.set_supports_rgb(false); ^ src/d1_dimmer_no_rf.h:56:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_rgb_white_value' traits.set_supports_rgb_white_value(false); ^ src/d1_dimmer_no_rf.h:57:12: error: 'class esphome::light::LightTraits' has no member named 'set_supports_color_temperature' traits.set_supports_color_temperature(false); ^ Compiling /data/d1_dimmer/.pioenvs/d1_dimmer/lib4d9/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o *** [/data/d1_dimmer/.pioenvs/d1_dimmer/src/main.cpp.o] Error 1 ========================= [FAILED] Took 54.85 seconds =========================
This website shows what the issue could be ...
https://esphome.io/api/classesphome_1_1light_1_1_light_traits.html
Will appreciate you looking into this when your time permits. Many thanks. Keep well and be safe. Rgds sirronb