Custom Binary Sensor with Xiaomi Aqara Motion Sensor (RTCGQ11LM) + Zigbee2Tasmota

Can you give me a suggestion on how to create a custom binary sensor for Aqara Motion Sensor.

Tasmota2Zigbee sends this MQTT message when Aqara Motion Sensor has detected motion.

tele/tasmota_D1587E/SENSOR = {"ZbReceived":{"0x031F":{"Device":"0x031F","Illuminance":4,"Occupancy":1,"Endpoint":1,"LinkQuality":44}}}
binary_sensor:
     
  - platform: mqtt
    name: "Tasmota Occupancy"
    state_topic: "tele/tasmota_D1587E/SENSOR"
    value_template: "{{ value_json.ZbReceived['0x031F'].Occupancy }}"
    availability_topic: "tele/tasmota_D1587E/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    device_class: motion

Update.
I found the problem. Just add:

     payload_on: 1
     payload_off: 0

Now Home Assistant detects messages from Motion Sensor.

Thanks.