I’m trying to disable, or enable a given sensor via http calls. The idea is to create a virtual switch that will be visible to Alexa, which will send the appropriate call to the sensor depending on the state of the switch (and the sensor itself).
I imagine this is easy, but I did not want to assume anything before hacking away.
If you are trying to enable and disable activities, the best way is to use a virtual switch and include it in the logic as a gating condition (i.e. the switch has to be on or off as you choose for the group/groups to be true and run their activities).
You can enable and disable the entire RS, using device actions referred to in the documentation. I don’t recommend it. Disabling/enabling the RS erases its condition state history and other data, running the RS as if it has never run before — it does an implicit Restart — and that can have side-effects in the way some logic is structured.