Condition on nested mqtt message from Sonoff SNZB-01 switc througn Sonoff Tasmota bridge

Hi everyone, I’ve got a question.
I have a Sonoff SNZB-01 switch paired with a Sonoff bridge with the Tasmota firmware.
In HA/Mosquita I can see these messages coming in when I press the button of the switch:

{
“ZbReceived”: {
“0x237C”: {
“Device”: “0x237C”,
“Name”: " Deurbel",
“0006!02”: “”,
“Power”: 2,
“Endpoint”: 1,
“LinkQuality”: 92
}
}
}

I want to create an automation that filters the single press of the button. There will be more buttons with different automations. .In configuration.yaml I have this:
mqtt:
#Deurbel
sensor:
name: “Deurbel”
state_topic: “tele/zigbee-bridge/SENSOR”
value_template: “{{ value_json.ZbReceived[0].0x237C.Name “Deurbel” }}”

In my automation I have this:
alias: Deurbel
description: “”
trigger:

  • platform: mqtt
    topic: tele/zigbee-bridge/SENSOR
    condition:
  • condition: template
    value_template: "{{ value_json.ZbReceived[0].0x237C.Name }} "
    action:
  • service: notify.paul_s_devices
    data:
    message: “1”
    mode: single

I don’t understand how to set a condition on a nested MQTT message. Can someone explain this to me or point me in the right direction. It would be a big help to me.
Thanks!

I just got the same device and connected to the Sonoff bridge.
Homeassistant needs to see this device as a trigger. Some explanation of the setup is here

You need have access to the console of the Zigbee Sonoff bridge and some mechanism to run a python script.

I wrote a separate script to config the trigger in home assistant… Basic idea is to publish a message to the config topic of homeassistant… something that looks like :
homeassistant/device_automation/buttonnode/config with the payload to configure the device you want HA to see.

Next in the console of the Sonoff Bridge setup a rule to map the SENSORmessage from your message to the topic in the payload you put in the python script.
Something like :
Rule1 on zbreceived#0x237C#0006!02 do publish zigbee2tasm/0x237C1/action %value^ endon Rule1 1
Once all this works, a device shows up in HA. You can write automations etc using the configured device.

This topic is fairly old but leaving this comment for someone else looking to setup the same thing.
Hope this helps.