Configuration pir yaml (tasmota nodemcu)[sloved]

hello everyone in the home assistant I can not see the status of my PIR has always been absent as a state
I followed this guide

we are talking about a nodemcu with tasmota on board from the tasmota console the PIR works well
while from home assistant no
here is my configuration
  • platform: mqtt
    name: PIR1
    state_topic: “stat/sonoff/PIR1”
    qos: 1
    device_class: motion

in my rule I copied the same without changing it based on my topic

Rule1 on switch1#state=1 do publish stat/%topic%/PIR1 ON endon on switch1#state=0 do publish stat/%topic%/PIR1 OFF endon

my rule modified

Rule1 on switch1#state=1 do publish stat/**sonoff**/PIR1 ON endon on switch1#state=0 do publish stat/**sonoff**/PIR1 OFF endon

excuse me
I would like to create a notification sensor in Home Assistant with these components, ESP8266 wifi, AM312 pir, and to program an ESP-01.
I use tasmotizer for the firmware, I tried to load the firmware but nothing happens, someone kindly can explain me the correct procedure, thank you very much