How to turn off Aeon Samrt Switch when moisture sensor is wet?

I recently purchased an Aeon Smart Switch (15 amp) that I would like to use to turn the power off to a dishwasher if there is a moisture leak under the dishwasher. This would be used if there is a leak in the dishwasher drain line so the dishwasher wouldn’t pump out the water to a leaking drain during a wash cycle.

I am already using moisture sensors to close a WaterCop valve that shuts down the main water supply if a leak is detected under the dishwasher (as well as sinks, toilets, etc using the “Dry the Wetspot” app created by Scottin Pollock - works very well!). I tried creating two of these apps, one for the valve (works fine) and one for the Aeon Switch (I was hoping it would just toggle the switch from its normally “On” state). However, the app will not cause the Aeon switch to shut off.

I’d like to learn some of the ST code for apps at some point but now I’m just a user. Any advice on an existing app that would work to shut off the Aeon switch when moisture is detected would be greatly appreciated.