ESP to MQTT public broker

Hi,

i’d like to send data from an ESP32 to a public mqtt broker. In my case to flexpi.
On the flexpi panel I can see that I’m connected with the ESP, but no values of the sensor appears in the flexpi panel. Have I set up anything else in my config that tells the sensor to talk to the mqtt broker? I read something about mqtt publish??? Sorry for my stupid questions…

Perhaps soemane can give me an example?

Thank you

My configuration:

esphome:
  name: brunnen
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: "xxx"
  password: "xxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Brunnen Fallback Hotspot"
    password: "xxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
#api:

mqtt:
  broker: mqtt.flespi.io
  username: mypersonaltoken

ota:

sensor:
  - platform: ultrasonic
    trigger_pin: GPIO18
    echo_pin: GPIO19
    name: "Abstandssensor"
    update_interval: 2000ms
    id: abstandssensor