MQTT Binary Sensor - help reading JSON please

I have some motion sensors which publish JSON which is received by a 433 bridge but I have not been able to set up binary_sensors to read it correctly and detect motion.

The JSON is;

{"RfReceived":{"Sync":12320,"Low":400,"High":1190,"Data":"D83446","RfKey":"None"}}

Two of the many binary sensors I have tried are:

binary_sensor:
  - platform: mqtt
    name: "PIR 01"
    state_topic: "tele/sonoff_rf01/RESULT"
    value_template: "{{ payload_json.RfReceived.Data }}"
    payload_on: D83446 
    device_class: motion

  - platform: mqtt
    name: "PIR 01"
    state_topic: "tele/sonoff_rf01/RESULT"
    value_template: "{{ RfReceived.Data }}"
    payload_on: D83446
    device_class: motion

Iā€™d be grateful for some help. Thanks.

According to the documentation, it should be value_json.

binary_sensor:
  - platform: mqtt
    name: "PIR 01"
    state_topic: "tele/sonoff_rf01/RESULT"
    value_template: "{{value_json.RfReceived.Data }}"
    payload_on: D83446 
    device_class: motion
1 Like

Thank you!
Sometimes I think it is possible to spend too long looking at the same thing preventing you from seeing the wood from the trees.
Exacerbated in this case by my copying and pasting from another part of my config which was similar but not quite the same!

if you want to reset sensor by adding off_delay: xx { xx in seconds }

1 Like

Yeah I got that, thanks.
Now to write some useful automations!