Hi all! This question is going to show a bit of my ignorance around gathering data out of a notification event. What I’d like to do since the sensor doesn’t appear to be ready yet that supports the userId from my door locks is setup a custom sensor for it.
I can fire this event using the zwave_js_notification to replicate what it would be for the user 1 to unlock the door. I can also easily pickup the event in automation using the device_id and event = 6 as a test case to make sure I’ve got that figured out. But now what I’m trying to do is use the data in parameters to set a custom sensor value to the userId so I can configure automation around what user unlocked the door.
I’ve got custom sensors setup already for things like temperature and luminance sensors using the state_attr, but here I’m a bit unclear on how to pull out the state attribute of a notification event like this. Anyone have any thoughts?
{
"domain": "zwave_js",
"node_id": 2,
"home_id": 3507814391,
"device_id": "mySuperAwesomeEventID",
"command_class": 113,
"command_class_name": "Notification",
"label": "Access Control",
"type": 6,
"event": 6,
"event_label": "Keypad unlock operation",
"parameters": {
"userId": 1
}
}