Zwave_js_value_notificaiton - one script for multiple device pairs

I’ve created a simple automation for a ZOOZ ZEN32 Scene Controller whereby if you double tap the relay switch (a.k.a. Scene 005) it toggles the relay of the other ZEN32 on the other side of the room. I was going to simply copy the automation and create a second one for the 2nd ZEN32 to do the same thing but for the 1st ZEN32. In other words, If I double table the relay switch on the ZEN32 on the other side of the room it toggles the other ZEN32. I actually have this same set up in two other rooms for a total of six ZEN32 (each room there are two). I don’t really want to duplicate the one automation as six separate things and was hoping there is a way to create a single automation and use templating or something to create the pairs and then call the toggle on the appropriate device based on which node_id was double tapped.

Here is what I have right now:

- id: '1642283471913'
  alias: Floor 2 Bedroom Lamp Left S5X2
  description: ''
  trigger:
  - platform: event
    event_type: zwave_js_value_notification
    event_data:
      node_id: 3
      label: Scene 005
      value: KeyPressed2x
  condition: []
  action:
  - type: toggle
    device_id: bd7d8d8f23c42e1123f38d7133f34c6a
    entity_id: switch.floor_2_bedroom_right_lamp
    domain: switch
  mode: single

So if the double tap happens on node_id 3 I need to toggle entity_id: switch.floor_2_bedroom_right_lamp. And if the double tap happens on node_id 2 I need to toggle entity_id: switch.floor_2_bedroom_left_lamp. Then in this other two rooms it’s the same kind of thing where a double tap on one node_id need to toggle the other ZEN32 in the room via its entity_id. What I’m struggling to understand is if I can accomplish this in a single script.

Something to keep in mind is that I have other ZEN32 devices that are not paired up like this so it’s not all of the ZEN32 devices that need to be part of the automation, just six of them do.