Understanding mqtt 2023

i am new to home assistant. i made window and door sensor. i am using esp-01 black. i cant figure out how to get mqtt to see my device.
also am having trouble with the code for the mqtt in home assistant.

You won’t get any response if you don’t provide more information.

  • How did you program the ESP? Provide the code
  • What did you try in HA? Provide the code

if you program the device properly and have home assistant set for MQTT autodetect you don’t have to do anything in home assistant. What are you doing? is the code available somewhere? I have written firmware for several devices that auto add themselves to home assistant through the autodetect interface.