Hello,
This seems like it should be easy but I’m hitting a wall here trying to extract the userId from the event triggered from a door lock event from zwavejs2mqtt.
Here is the full event
{
"event_type": "zwave_js_notification",
"data": {
"domain": "zwave_js",
"node_id": 16,
"home_id": 3382297610,
"device_id": "179578cbc6f595855fbc705f310e774a",
"command_class": 113,
"command_class_name": "Notification",
"label": "Access Control",
"type": 6,
"event": 6,
"event_label": "Keypad unlock operation",
"parameters": {
"userId": 1
}
},
"origin": "LOCAL",
"time_fired": "2021-05-29T19:35:25.001029+00:00",
"context": {
"id": "8ef6eb046939bf28cacf3983622a3172",
"parent_id": null,
"user_id": null
}
}
I can extract the parameters field with
trigger.event.data.parameters
which returns
{'userId': 1}
I thought I could use
trigger.event.data.parameters.userId
to return 1, but this returns nothing.
I’ve tried everything else I can think of at this point. Can anyone point me in the right direction?
Thank you