Thanks for the idea, I haven't dived yet into writing my own z-wave driver or 'companion'.
Most likely I'll find inspiration from your driver
The way I understand the Zen17 is it will change zwave packets it sends depending on the zwave parameters. I wonder if it woudn't be simpler to just create a Child Device that implements all zwave capabilities. In a way, a relay can act as Lock, Switch, Contact Sensor, etc... it can be all those things, whatever you can power on/off.