Create Virtual Switch For IR Controlled Device

I’m using an RM Pro to toggle the power on/off on my air purifier that is plugged into a power monitoring plug to give HA feedback. I want a switch on the front end that turns it on/off via the RM Pro using the power monitoring to determine whether it’s on or not. I made a Binary Sensor based on the wattage of the plug in an attempt to do this but not sure if I’m on the right track. I’m sure this involves some sort of templating. What is the easiest way to do this?