Getting userId Parameter from zwave_js_notification

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
        }
}

Did you ever figure this out. I’m here now…

Here’s an excerpt from my automation. I set an input text based upon the user. I have another automation for event != 6.

- id: '9'
  alias: Front Door Lock User Updater
  trigger:
    - platform: event
      event_type: zwave_js_notification
      event_data:
        node_id: 4
        type: 6
        event: 6
        event_label: Keypad unlock operation
  action:
    - choose:
        - conditions:
            - condition: template
              value_template: "{{ trigger.event.data.parameters.userId | int == 1 }}"
          sequence:
            - service: input_text.set_value
              data:
                entity_id: input_text.front_door_lock_status
                value: 'Keypad unlock by user 1'
        - conditions:
            - condition: template
              value_template:  "{{ trigger.event.data.parameters.userId | int == 2 }}"
          sequence:
            - service: input_text.set_value
              data:
                entity_id: input_text.front_door_lock_status
                value: 'Keypad unlock by user 2'

Thank you, that’s very helpful.

I did, very sorry for not updating here, but this Post over HERE was extremely helpful and is what I ended up doing, make it nice and compact and I now have my lock (with a lot of tweaking) giving me useful info on my dashboards.
image