I have tried your code which looks promising but I get errors.
The errors refer to mydisplay now tied to component or declared twice.
Any ideas.
`esphome:
name: esphome-web-0cf0eb
friendly_name: Matrix-2
rp2040:
board: rpipicow
framework:
# Required until platformio/platform-raspberrypi#36 is merged
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
external_components:
- source: github://AaronJackson/interstate75-esphome@main
components: [ hub75display ]
refresh: 0s
Enable logging
logger:
Enable Home Assistant API
api:
encryption:
key: "*******"
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Esphome-Web-0Cf0Eb"
password: "******"
font:
- file: "gfonts://Roboto"
id: roboto12
size: 12
display:
-
platform: hub75display
id: mydisplay
update_interval: 1s
lambda: |-
Color red = Color(255, 0, 0);
Color green = Color(0, 255, 0);
Color blue = Color(0, 0, 255);
Color white = Color(255, 255, 255);
it.draw_pixel_at(0, 0, red);
it.draw_pixel_at(63, 0, green);
it.draw_pixel_at(63, 63, blue);
it.draw_pixel_at(0, 63, white);
it.draw_pixel_at(31, 31, white);
it.circle(31, 31, 16, white);
it.rectangle(3, 3, 16, 16, white);
`
Errors
INFO ESPHome 2023.12.9 INFO Reading configuration /config/esphome/esphome-web-0cf0eb.yaml... INFO Updating https://github.com/AaronJackson/interstate75-esphome.git@main hub75display 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/ceb8783b/components/hub75display/display.py", line 31, 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 mydisplay was not declared to inherit from Component, or was registered twice. Please create a bug report with your configuration.
Hope you can help