Need Help Sonoff Bridge and PIR automation

I have configure my sonoff bridge with tasmota firmware and am using a sonoff PIR to trigger when there is motion by the Gate. the problem am experiencing is any PIR or door contact triggered the automation. see the conf below.

configuration.yaml

  - platform: mqtt
    state_topic: 'rfbridge01/tele/RESULT'
    value_template: '{{value_json.RfReceived.Data}}'
    name: "sonoff bridge 443"
    expire_after: 1

binary_sensor:
  - platform: template
    sensors:
      gate_pir:
        friendly_name: "Gate PIR"
        value_template: '{{ is_state("sensor.sonoff_bridge_443", "ED357E") }}'
        device_class: motion

automation.yaml

- id: '1573536619878'
  alias: Send notification when motion detected by the Gate
  description: ''
  trigger:
  - platform: mqtt
    topic: rfbridge01/tele/RESULT
  condition: []
  action:
  - data:
      message: Motion has been detect by the gate!
    service: telegram_bot.send_message
  - alias: ''
    data:
      data:
        type: tts
      message: Motion has been detect by the gate!
      target:
      - group.alexa
      - Living Room
      - media_player.alexa
      - G090U34584470SD8
    service: notify.alexa_media_alexa

This is because you use the mqtt topic as a trigger, so any time something is published on this topic, the automation gets triggered.

You already created a binary sensor for the motion at the gate, so use this as your trigger.
Something like this:

- id: '1573536619878'
  alias: Send notification when motion detected by the Gate
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.gate_pir
    from: "off"
    to: "on"
  condition: []
  action:
  - data:
      message: Motion has been detect by the gate!
    service: telegram_bot.send_message
  - alias: ''
    data:
      data:
        type: tts
      message: Motion has been detect by the gate!
      target:
      - group.alexa
      - Living Room
      - media_player.alexa
      - G090U34584470SD8
    service: notify.alexa_media_alexa

In addition, you might want to check out this topic ;

Thanks i will test when i get home.

When i remove mqtt and add binary sensor nothing happen

- id: '1573536619878'
  alias: Send notification when motion detected by the Gate
  description: ''
  trigger:
  - entity_id: binary_sensor.gate_pir
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: Motion has been detect by the gate!
    service: telegram_bot.send_message
  - alias: ''
    data:
      data:
        type: tts
      message: Motion has been detect by the gate!
      target:
      - group.alexa
      - Living Room
      - media_player.alexa
      - G090U34584470SD8
    service: notify.alexa_media_alexa

If you look in the logbook, do you see the binary_sensor changed state ?

Its changing [rfbridge_demultiplexer] has been triggered.

now i’m stuck with the automation part. i dont have this in automation.

  action:
  - service: python_script.rfbridge_demux
    data_template:
      payload: '{{trigger.payload_json.RfReceived.Data}}'