Help setting up Exec Binding & 433utils for a light switch

Can anyone explain how to implement sending 433mhz RF signals using the 433Utils and an Exec Binding in OH2?

In OH1.8 it was fairly simple using something like the following.

Switch-Light_GF_Living_Room_Table "Table Lamp" (Living_Room_Lights,All_Lights) { exec="OFF:sudo /usr/local/bin/433Utils/RPi_utils/codesend 8944270, ON:sudo /usr/local/bin/433Utils/RPi_utils/codesend 8944271" }

After reading the OH2 docs it’s not clear if you can have one off command and one on command script run when a switch is activated?

You can still use the 1.9 exec binding.

In my reading of the binding docs indeed the 2.0 binding does not support the ability to run different scripts when the switch is toggled OFF and ON. Only ON will trigger the run channel.

To make it work with the 2.0 binding I suspect you will need to use a Proxy Item and rule.