Z-Wave Association for Aeotec Door/Window 7 to Inovelli Switch - Hubitat

Apologies as I’m relatively new to this. I have the Hubitat C-7 and have used the Z-wave Association Tool to set up numerous Red Series (gen 2) On/Off to control a number of Enbrighten smart outlets, which are all working great (and very fast). The Association tool is awesome.

I now have several closets where I want to set up association group 2 between the Aeotec Door/Window 7 sensor on the closet door to control a Red Series On/Off for the light in the closet. I’ve read through this forum and the Hubitat forum and have some questions.

  1. I think I need to alter the driver code for the Aeotec Sensor. I don’t actually see the driver code on Hubitat. I found this code on GIthub for the Sensor 6. [hubitat/zwave_door_window_sensor.groovy at master · adsavia/hubitat · GitHub] https://github.com/adsavia/hubitat/blob/master/zwave_door_window_sensor.groovy) Will that work for the sensor 7?

  2. I think I’m suppose to copy and paste the Association code that was written for smartthings [HOW-TO] Using the Z-Wave Association Tool in SmartThings - Sorting Category - Inovelli Community into the Hubitat driver, correct ?

  3. I notice that some of the Smartthings code appears to make specific references to Smartthings. Does any of the code need to be changed when importing this into Hubitat? Specifically, I see these references to smartthings;

def setDefaultAssociations() {
def smartThingsHubID = (zwaveHubNodeId.toString().format( ‘%02x’, zwaveHubNodeId )).toUpperCase()
state.defaultG1 = [smartThingsHubID]

Thanks!