-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESPHome compile failed on stock yaml file with new components #3
Comments
Here is the YAML file: `substitutions: name: erikas-desk-bulb # **** CHANGE DEVICE NAME TO SOMETHING UNIQUE PER DEVICE. RENAME YAML FILE TO SAME NAME. **** friendly_name: Erikas Desk Bulb # **** CHANGE FRIENDLY NAME TO SOMETHING UNIQUE PER DEVICE **** esp8266: # https://esphome.io/components/esp8266.html framework: # provides updated PWM logic per esp8266/Arduino#7231 external_components:
esphome: name: $name project: on_boot:
button:
wifi: **** ENTER WI-FI CREDENTIALS HERE, USING SECRETS.YAML RECOMMENDED ****ssid: !secret wifi_ssid
manual_ip:static_ip: !secret kauf_bulb_rgb_ip_addressgateway: !secret wifi_gatewaysubnet: !secret wifi_subnetdns1: !secret wifi_dns1use_address allows wireless programming through dashboard.Set to the bulb's IP Address. Remove after programming.use_address: 192.168.86.244default is 20, 17 is recommended.output_power: 17 using fast_connect as default since it is required for hidden networks.feel free to change or override.fast_connect: true logger: # Enable logging baud_rate: 0 # Disable UART logging since TX pad not easily availableapi: # Enable Home Assistant API password: !secret api_password # optional password field for Home Assistant API.ota: password: !secret ota_password # optional password for OTA updates.debug: # outputs additional debug info when logs start web_server: # web server allows access to device with a web browser auth: # optional login details for web interfaceusername: adminpassword: !secret web_server_passwordPWM outputs for each LED channeloutput:
light: Additive RGB light for Warm White
Additive RGB light for Cold White
Main RGBWW light
select: default light state on boot
sensor:
Send IP Address to HA. Disabled by default, not as important now that Home Assistant provides link.text_sensor:
script:
|
What version of ESPHome are you running? This looks like you need to upgrade to the latest version 2022.1.1. BTW, I'm in the process of updating documentation and recommendations to use automatic importing of devices into the dashboard. Here is what the yaml file would look like for that. You can copy and paste this over your existing yaml and change names etc. This will cause any updates on our end to be automatically incorporated.
|
Excellent - I will upgrade and retry - love the new YAML file and the automatic inclusions with the packages line. Is there a way to have it error out if ESPHome is not a certain version? |
I was just thinking about how to error out if version number is wrong. It should be possible. I will try to figure it out. |
I added an error if you aren't on the right version of ESPHome. Looks like this:
|
Just tried to flash a bulb using the stock YAML file and got this error:
In file included from src/esphome/components/restart/button/restart_button.h:3, from src/esphome/components/restart/button/restart_button.cpp:1: src/esphome/components/restart/button/restart_button.cpp: In member function 'virtual void esphome::restart::RestartButton::dump_config()': src/esphome/components/button/button.h:11:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 11 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/restart/button/restart_button.cpp:17:37: note: in expansion of macro 'LOG_BUTTON' 17 | void RestartButton::dump_config() { LOG_BUTTON("", "Restart Button", this); } | ^~~~~~~~~~ In file included from src/esphome/components/template/select/template_select.h:3, from src/esphome/components/template/select/template_select.cpp:1: src/esphome/components/template/select/template_select.cpp: In member function 'virtual void esphome::template_::TemplateSelect::dump_config()': src/esphome/components/select/select.h:13:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 13 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/template/select/template_select.cpp:64:3: note: in expansion of macro 'LOG_SELECT' 64 | LOG_SELECT("", "Template Select", this); | ^~~~~~~~~~ Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/web_server/web_server.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/web_server_base/web_server_base.cpp.o In file included from src/esphome/components/uptime/uptime_sensor.h:4, from src/esphome/components/uptime/uptime_sensor.cpp:1: src/esphome/components/uptime/uptime_sensor.cpp: In member function 'virtual void esphome::uptime::UptimeSensor::dump_config()': src/esphome/components/sensor/sensor.h:13:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 13 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/uptime/uptime_sensor.cpp:31:36: note: in expansion of macro 'LOG_SENSOR' 31 | void UptimeSensor::dump_config() { LOG_SENSOR("", "Uptime Sensor", this); } | ^~~~~~~~~~ Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/wifi/wifi_component.cpp.o src/esphome/components/light/light_json_schema.cpp: In static member function 'static void esphome::light::LightJSONSchema::dump_json(esphome::light::LightState&, ArduinoJson::JsonObject)': src/esphome/components/light/light_json_schema.cpp:55:53: error: use of deleted function 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' 55 | JsonObject color = root.createNestedObject("color"); | ^ In file included from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.hpp:9, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.h:9, from src/esphome/components/json/json_util.h:8, from src/esphome/components/light/light_json_schema.h:7, from src/esphome/components/light/light_json_schema.cpp:1: .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonObject.hpp:40:7: note: 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' is implicitly deleted because the default definition would be ill-formed: 40 | class JsonObject : public Internals::JsonPrintable<JsonObject>, | ^~~~~~~~~~ .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonObject.hpp:40:7: error: 'ArduinoJson::Internals::NonCopyable::NonCopyable(const ArduinoJson::Internals::NonCopyable&)' is private within this context In file included from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonBuffer.hpp:11, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/JsonParser.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonBufferBase.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/DynamicJsonBuffer.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.h:9, from src/esphome/components/json/json_util.h:8, from src/esphome/components/light/light_json_schema.h:7, from src/esphome/components/light/light_json_schema.cpp:1: .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../Data/NonCopyable.hpp:17:3: note: declared private here 17 | NonCopyable(const NonCopyable&); | ^~~~~~~~~~~ src/esphome/components/light/light_json_schema.cpp: In static member function 'static void esphome::light::LightJSONSchema::parse_color_json(esphome::light::LightState&, esphome::light::LightCall&, ArduinoJson::JsonObject)': src/esphome/components/light/light_json_schema.cpp:98:36: error: use of deleted function 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' 98 | JsonObject color = root["color"]; | ^ In file included from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonVariantBase.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonVariant.hpp:13, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonBuffer.hpp:12, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/JsonParser.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonBufferBase.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/DynamicJsonBuffer.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.h:9, from src/esphome/components/json/json_util.h:8, from src/esphome/components/light/light_json_schema.h:7, from src/esphome/components/light/light_json_schema.cpp:1: .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonVariantCasts.hpp:44:16: note: after user-defined conversion: 'ArduinoJson::Internals::JsonVariantCasts<TImpl>::operator ArduinoJson::JsonObject&() const [with TImpl = ArduinoJson::Internals::JsonObjectSubscript<const char*>]' 44 | FORCE_INLINE operator JsonObject &() const { Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o | ^~~~~~~~ src/esphome/components/light/light_json_schema.cpp: In static member function 'static void esphome::light::LightJSONSchema::parse_json(esphome::light::LightState&, esphome::light::LightCall&, ArduinoJson::JsonObject)': src/esphome/components/light/light_json_schema.cpp:144:54: error: use of deleted function 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' 144 | LightJSONSchema::parse_color_json(state, call, root); | ^ src/esphome/components/light/light_json_schema.cpp:75:87: note: initializing argument 3 of 'static void esphome::light::LightJSONSchema::parse_color_json(esphome::light::LightState&, esphome::light::LightCall&, ArduinoJson::JsonObject)' 75 | void LightJSONSchema::parse_color_json(LightState &state, LightCall &call, JsonObject root) { | ~~~~~~~~~~~^~~~ Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/wifi/wifi_component_esp8266.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/components/wifi_info/wifi_info_text_sensor.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/application.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/color.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/component.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/controller.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/entity_base.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/helpers.cpp.o Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/log.cpp.o *** [.pioenvs/erikas-desk-bulb/src/esphome/components/light/light_json_schema.cpp.o] Error 1 Compiling .pioenvs/erikas-desk-bulb/src/esphome/core/scheduler.cpp.o In file included from src/esphome/components/wifi_info/wifi_info_text_sensor.h:4, from src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:1: src/esphome/components/wifi_info/wifi_info_text_sensor.cpp: In member function 'virtual void esphome::wifi_info::IPAddressWiFiInfo::dump_config()': src/esphome/components/text_sensor/text_sensor.h:12:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 12 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:9:41: note: in expansion of macro 'LOG_TEXT_SENSOR' 9 | void IPAddressWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); } | ^~~~~~~~~~~~~~~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp: In member function 'virtual void esphome::wifi_info::ScanResultsWiFiInfo::dump_config()': src/esphome/components/text_sensor/text_sensor.h:12:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 12 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:10:43: note: in expansion of macro 'LOG_TEXT_SENSOR' 10 | void ScanResultsWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo Scan Results", this); } | ^~~~~~~~~~~~~~~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp: In member function 'virtual void esphome::wifi_info::SSIDWiFiInfo::dump_config()': src/esphome/components/text_sensor/text_sensor.h:12:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 12 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:11:36: note: in expansion of macro 'LOG_TEXT_SENSOR' 11 | void SSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); } | ^~~~~~~~~~~~~~~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp: In member function 'virtual void esphome::wifi_info::BSSIDWiFiInfo::dump_config()': src/esphome/components/text_sensor/text_sensor.h:12:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 12 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:12:37: note: in expansion of macro 'LOG_TEXT_SENSOR' 12 | void BSSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); } | ^~~~~~~~~~~~~~~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp: In member function 'virtual void esphome::wifi_info::MacAddressWifiInfo::dump_config()': src/esphome/components/text_sensor/text_sensor.h:12:3: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare] 12 | if ((obj) != nullptr) { \ | ^~ src/esphome/components/wifi_info/wifi_info_text_sensor.cpp:13:42: note: in expansion of macro 'LOG_TEXT_SENSOR' 13 | void MacAddressWifiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo Mac Address", this); } | ^~~~~~~~~~~~~~~ src/esphome/components/web_server/web_server.cpp: In member function 'std::string esphome::web_server::WebServer::sensor_json(esphome::sensor::Sensor*, float)': src/esphome/components/web_server/web_server.cpp:351:4: error: no matching function for call to 'build_json(esphome::web_server::WebServer::sensor_json(esphome::sensor::Sensor*, float)::<lambda(ArduinoJson::JsonObject)>)' 351 | }); | ^ In file included from src/esphome/components/web_server/web_server.cpp:8: src/esphome/components/json/json_util.h:20:13: note: candidate: 'const char* esphome::json::build_json(const json_build_t&, size_t*)' 20 | const char *build_json(const json_build_t &f, size_t *length); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:20:13: note: candidate expects 2 arguments, 1 provided src/esphome/components/json/json_util.h:22:13: note: candidate: 'std::string esphome::json::build_json(const json_build_t&)' 22 | std::string build_json(const json_build_t &f); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:22:44: note: no known conversion for argument 1 from 'esphome::web_server::WebServer::sensor_json(esphome::sensor::Sensor*, float)::<lambda(ArduinoJson::JsonObject)>' to 'const json_build_t&' {aka 'const std::function<void(ArduinoJson::JsonObject&)>&'} 22 | std::string build_json(const json_build_t &f); | ~~~~~~~~~~~~~~~~~~~~^ src/esphome/components/web_server/web_server.cpp: In member function 'std::string esphome::web_server::WebServer::text_sensor_json(esphome::text_sensor::TextSensor*, const string&)': src/esphome/components/web_server/web_server.cpp:374:4: error: no matching function for call to 'build_json(esphome::web_server::WebServer::text_sensor_json(esphome::text_sensor::TextSensor*, const string&)::<lambda(ArduinoJson::JsonObject)>)' 374 | }); | ^ In file included from src/esphome/components/web_server/web_server.cpp:8: src/esphome/components/json/json_util.h:20:13: note: candidate: 'const char* esphome::json::build_json(const json_build_t&, size_t*)' 20 | const char *build_json(const json_build_t &f, size_t *length); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:20:13: note: candidate expects 2 arguments, 1 provided src/esphome/components/json/json_util.h:22:13: note: candidate: 'std::string esphome::json::build_json(const json_build_t&)' 22 | std::string build_json(const json_build_t &f); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:22:44: note: no known conversion for argument 1 from 'esphome::web_server::WebServer::text_sensor_json(esphome::text_sensor::TextSensor*, const string&)::<lambda(ArduinoJson::JsonObject)>' to 'const json_build_t&' {aka 'const std::function<void(ArduinoJson::JsonObject&)>&'} 22 | std::string build_json(const json_build_t &f); | ~~~~~~~~~~~~~~~~~~~~^ src/esphome/components/web_server/web_server.cpp: In lambda function: src/esphome/components/web_server/web_server.cpp:611:49: error: use of deleted function 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' 611 | light::LightJSONSchema::dump_json(*obj, root); | ^ In file included from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.hpp:9, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.h:9, from src/esphome/components/json/json_util.h:8, from src/esphome/components/web_server/web_server.cpp:8: .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonObject.hpp:40:7: note: 'ArduinoJson::JsonObject::JsonObject(const ArduinoJson::JsonObject&)' is implicitly deleted because the default definition would be ill-formed: 40 | class JsonObject : public Internals::JsonPrintable<JsonObject>, | ^~~~~~~~~~ .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonObject.hpp:40:7: error: 'ArduinoJson::Internals::NonCopyable::NonCopyable(const ArduinoJson::Internals::NonCopyable&)' is private within this context In file included from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../JsonBuffer.hpp:11, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/JsonParser.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/JsonBufferBase.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/DynamicJsonBuffer.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.hpp:7, from .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson.h:9, from src/esphome/components/json/json_util.h:8, from src/esphome/components/web_server/web_server.cpp:8: .piolibdeps/erikas-desk-bulb/ArduinoJson-esphomelib/src/ArduinoJson/Deserialization/../Data/NonCopyable.hpp:17:3: note: declared private here 17 | NonCopyable(const NonCopyable&); | ^~~~~~~~~~~ In file included from src/esphome/components/web_server/web_server.cpp:16: src/esphome/components/light/light_json_schema.h:17:55: note: initializing argument 2 of 'static void esphome::light::LightJSONSchema::dump_json(esphome::light::LightState&, ArduinoJson::JsonObject)' 17 | static void dump_json(LightState &state, JsonObject root); | ~~~~~~~~~~~^~~~ src/esphome/components/web_server/web_server.cpp: In member function 'std::string esphome::web_server::WebServer::light_json(esphome::light::LightState*)': src/esphome/components/web_server/web_server.cpp:612:4: error: no matching function for call to 'build_json(esphome::web_server::WebServer::light_json(esphome::light::LightState*)::<lambda(ArduinoJson::JsonObject)>)' 612 | }); | ^ In file included from src/esphome/components/web_server/web_server.cpp:8: src/esphome/components/json/json_util.h:20:13: note: candidate: 'const char* esphome::json::build_json(const json_build_t&, size_t*)' 20 | const char *build_json(const json_build_t &f, size_t *length); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:20:13: note: candidate expects 2 arguments, 1 provided src/esphome/components/json/json_util.h:22:13: note: candidate: 'std::string esphome::json::build_json(const json_build_t&)' 22 | std::string build_json(const json_build_t &f); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:22:44: note: no known conversion for argument 1 from 'esphome::web_server::WebServer::light_json(esphome::light::LightState*)::<lambda(ArduinoJson::JsonObject)>' to 'const json_build_t&' {aka 'const std::function<void(ArduinoJson::JsonObject&)>&'} 22 | std::string build_json(const json_build_t &f); | ~~~~~~~~~~~~~~~~~~~~^ src/esphome/components/web_server/web_server.cpp: In member function 'std::string esphome::web_server::WebServer::select_json(esphome::select::Select*, const string&)': src/esphome/components/web_server/web_server.cpp:755:4: error: no matching function for call to 'build_json(esphome::web_server::WebServer::select_json(esphome::select::Select*, const string&)::<lambda(ArduinoJson::JsonObject)>)' 755 | }); | ^ In file included from src/esphome/components/web_server/web_server.cpp:8: src/esphome/components/json/json_util.h:20:13: note: candidate: 'const char* esphome::json::build_json(const json_build_t&, size_t*)' 20 | const char *build_json(const json_build_t &f, size_t *length); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:20:13: note: candidate expects 2 arguments, 1 provided src/esphome/components/json/json_util.h:22:13: note: candidate: 'std::string esphome::json::build_json(const json_build_t&)' 22 | std::string build_json(const json_build_t &f); | ^~~~~~~~~~ src/esphome/components/json/json_util.h:22:44: note: no known conversion for argument 1 from 'esphome::web_server::WebServer::select_json(esphome::select::Select*, const string&)::<lambda(ArduinoJson::JsonObject)>' to 'const json_build_t&' {aka 'const std::function<void(ArduinoJson::JsonObject&)>&'} 22 | std::string build_json(const json_build_t &f); | ~~~~~~~~~~~~~~~~~~~~^ *** [.pioenvs/erikas-desk-bulb/src/esphome/components/web_server/web_server.cpp.o] Error 1 ========================= [FAILED] Took 52.18 seconds =========================
The text was updated successfully, but these errors were encountered: