buzzer13 / esphome-components

Custom ESPHome component repository
GNU General Public License v3.0
4 stars 8 forks source link

Currently does not work for esphome >= 2023.12.0 #3

Closed wonderslug closed 5 months ago

wonderslug commented 6 months ago

Looks like there are changes in Esphome >= 2023.12.0 that effected displays. It says for touchscreens, but it looks like it effected PollingComponent in the newer versions.

Getting the following on compile


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/56960910/components/tm1650/display.py", line 36, 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 disp_tm1650 was not declared to inherit from Component, or was registered twice. Please create a bug report with your configuration.```

but that looks like just the component regisration in the display.py changed

Found a link for a change in the lilygo tdisplay s3 display and it looks like they pull the PollingComponent from the class.

https://github.com/landonr/lilygo-tdisplays3-esphome/pull/46/files

Tried similar but failed compiling.
buzzer13 commented 6 months ago

Thank you for reporting this issue. Please try the latest version of this component (5f5119e04f2802c806b0be9655d9a07ee0fae569) to confirm that it resolves the problem.

buzzer13 commented 5 months ago

Component still compiles fine with version 2024.2.0, so I'm closing this issue.