I’m trying to do something that I would normally consider very basic - retrieve the current state of an object (i.e., piston). I have figured out how to set the piston state, but I can’t figure out how to retrieve it in an “IF” condition.
The use case if straightforward: I have a piston that is either Armed, Unarmed, or Overridden. It is Armed if all doors are closed during specified modes and the related virtual override switch in SmartThings is off. Then, if the state is Armed and one of the doors (contact sensors) opens, trigger an action (e.g., siren).
This is all within the context of a single piston because I couldn’t find a way to make a separate call like “If PistonName.State = Armed, Then sound alarm)”. I’m not sure if WebCore lacks a full object model for setting and getting properties or if I just haven’t figured out how to do it. In any event, please let me know how to access the current piston state when the piston executes (i.e., the current piston state prior to a new event occuring).