I am getting the following events from my https://www.zigbee2mqtt.io/devices/E1766.html
Message 3 received on zigbee2mqtt/0x588e81fffe2b659c at 9:46 PM:
{
"action": "close",
"battery": 87,
"linkquality": 207,
"update_available": false
}
QoS: 0 - Retain: false
Message 2 received on zigbee2mqtt/0x588e81fffe2b659c at 9:46 PM:
{
"action": "open",
"battery": 87,
"linkquality": 207,
"update_available": false
}
QoS: 0 - Retain: false
I created the following automation for it
- id: '1606163832212'
alias: OpenBlinds
description: ''
trigger:
- platform: mqtt
topic: zigbee2mqtt/0x588e81fffe2b659c
condition: []
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x680ae2fffefe7819/set
payload: '{ "position": 100 }'
mode: single
This works, and the blinds will open on any button press. Now I would like to only listen for a specific payload like "action": "open",
and "action": "close"
. Is that possible? I can’t hardcode the full payload because it contains linkquality/battery which changes after every press.
Is there a way to extract only the action field from the payload? I tried payload: '{ "action": "open" }'
but that doesn’t seem to work.
It seems that I might need to use a value template for it, but the docs are not really clear in that regard.
~