CAN Bus component basic YAML help. ESP32 to a MCP2515

I have connected an ESP32 to a MCP2515 and now I want to write some YAML using the ESPHome CAN bus compoent. I would first like to just output to log every can_id received. But I am struggling as there is no wildcard for the on frame trigger. Is there a way I can do this?

This is my basic yaml. It does not do anything yet but it parses ok and it is a start.

spi:
  id: spi_bus
  clk_pin: GPIO18
  miso_pin: GPIO19
  mosi_pin: GPIO23
  
canbus:
  - platform: mcp2515
    cs_pin: GPIO5
    spi_id: spi_bus
    can_id: 0x7FF
    on_frame:
    - can_id: 0x7FF  
      then:
      - lambda: |-
          ESP_LOGD("can_id", "Received CAN message with ID: %x", can_id);

Try to use can_id 0 to listen to all messages. I found an old ESPHome project called “Can listener”. But do not remember where I got it :slight_smile:

    - can_id:      0  # listen to all messages
      can_id_mask: 0
      use_extended_id: true
      then:

Thanks. I also finally figured that out.

    on_frame:
    - can_id: 0
      use_extended_id: True
      can_id_mask: 0  
      then:
      - lambda: |- 
          ESP_LOGD("can_id", "Received CAN message with ID: %x", can_id);
.......