Open MadOtis opened 11 months ago
There was a change in the display structure that breaks all external display components; the fix needs to be done in the external component. See https://github.com/landonr/lilygo-tdisplays3-esphome/pull/46 for an example of the needed changes to have this compile again.
Probably the PR you are using has not been updated yet
Awesome! Removing the external_components:
object did indeed resolve it! Thank you!
I guess this can either be marked as a won't fix or closed.
# Example config.yaml
display:
- id: disp1
platform: nextion
exit_reparse_on_start: true
Although you will not face this need (and the need for #2956) until you try to connect again to a display in advanced reparse mode (like a brand new device from Sonoff).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
A previously working Sonoff NSPanel device now fails to build/update after upgrading ESPHome. This build error is the result:
INFO ESPHome 2023.12.1 INFO Reading configuration /config/esphome/nspanel.yaml... INFO Generating C++ source... Traceback (most recent call last): File "/usr/local/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/__main__.py", line 1041, in main return run_esphome(sys.argv) ^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/__main__.py", line 1028, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/__main__.py", line 458, in command_run exit_code = write_cpp(config) ^^^^^^^^^^^^^^^^^ File "/esphome/esphome/__main__.py", line 192, in write_cpp generate_cpp_contents(config) File "/esphome/esphome/__main__.py", line 204, in generate_cpp_contents CORE.flush_tasks() File "/esphome/esphome/core/__init__.py", line 679, in flush_tasks self.event_loop.flush_tasks() File "/esphome/esphome/coroutine.py", line 246, in flush_tasks next(task.iterator) File "/esphome/esphome/__main__.py", line 184, in wrapped await coro(conf) File "/data/external_components/b5254113/esphome/components/nextion/display.py", line 92, in to_code await display.register_display(var, config) File "/esphome/esphome/components/display/__init__.py", line 119, in register_display await cg.register_component(var, config) File "/esphome/esphome/cpp_helpers.py", line 56, in register_component raise ValueError( ValueError: Component ID disp1 was not declared to inherit from Component, or was registered twice. Please create a bug report with your configuration.
Which version of ESPHome has the issue?
2023.12.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.12.3
What platform are you using?
ESP32
Board
Sonoff NSPanel (US version)
Component causing the issue
Possibly Nextion or Display
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
This device was working without issue for several previous releases of ESPHome and without modification. Suddenly, after the upgrade to 2023.12.1, it started failing to build.