Using '["userId"] for trigger. Is this right?

Hi there,

Can someone tell me if this is valid way to use the useId as it’s not working. I’m using this parameter in a condition in another automation and it works fine.

    trigger:
      - platform: event
        event_type: zwave_js_notification
        event_data:
          node_id: 18        
          parameters: '["userId"] == 9'

That definitely won’t work. You can try this, but I don’t know if it’ll work either.

    trigger:
      - platform: event
        event_type: zwave_js_notification
        event_data:
          node_id: 18        
          parameters:
            userId: 9

Thanks for your inspiration. You were right though, did not work. This does though.

    trigger:
      - platform: event
        event_type: zwave_js_notification
        event_data:
          #node_id: 18   
          event_label: "Keypad unlock operation"               
          parameters: {"userId": 1}

You changed a couple things at once it looks like. Did it not work because of the shape of parameters, or because it was the wrong node ID or wrong user ID?

This doesn’t work the same?

    trigger:
      - platform: event
        event_type: zwave_js_notification
        event_data:
          #node_id: 18   
          event_label: "Keypad unlock operation"               
          parameters:
            userId: 1
1 Like

My apologies. You are correct. I use the code detection to turn a scene for Guest Mode on. When I initially tried your code, Guest mode would activate then go off seconds later when the lock closed so I added the event_label without then trying your code again. The Guest Mode should only go off when one of the house owners unlocks the door and this appears to be working flawlessly now. Really appreciate your quick response and advice.

No worries, was just curious as to whether that format worked or not. In YAML, the two are equivalent, so I was expecting the trigger to work the same. Thanks for confirming.