Use RF PIR device to power ON/OFF device with Sonoff T1

Using Kerui PIR sensor 433Mhz, Sonoff RF bridge 433 MHz (flashed with Tasmota) and Sonoff T1 (flashed with Tasmota)

I want it to turn on the light when movement is detected and turned it off after X minutes.

I could turn it on and also reset the PIR sensor but i have no clue how to send the off signal to switch afterwards.

automations.yaml

- alias: Turn off hall motion
  hide_entity: true
  trigger:
    platform: state
    entity_id: binary_sensor.hall_motion
    to: 'on'
    for:
      seconds: 60
  action:
    service: mqtt.publish
    data:
      topic: "tele/sonoffbr/RESULT"
      payload: "161F0Aoff"
      retain: "true"

- alias: Turn on
  hide_entity: true
  trigger:
    platform: state
    entity_id: binary_sensor.hall_motion
    to: 'on'
  action:
    service: switch.turn_on
    entity_id: switch.spalnica

configuration.yaml

  - platform: mqtt
    name: "Spalnica"
    state_topic: "stat/bed_room/POWER"
    command_topic: "cmnd/bed_room/POWER"
    availability_topic: "tele/bed_room/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

binary_sensor:

  - platform: mqtt
    name: Hall Motion
    payload_on: "161F0A"
    payload_off: "161F0Aoff"
    sensor_class: motion
    state_topic: "tele/sonoffbr/RESULT"
    value_template: '{{ value_json.RfReceived.Data }}'

Your code looks like it would turn the light off if the sensor was on for 60 seconds.

I think you need.

- alias: Turn off hall motion
  hide_entity: true
  trigger:
    platform: state
    entity_id: binary_sensor.hall_motion
    from: 'on'
    to: 'off'
    for:
      seconds: 60