Button New Capability Condition

Hello All,

In RM4 how do I add a button press capability for a condition, I don't see it listed.

Thanks All

I'd recommend backing up a bit to look at the big picture: what are you trying to accomplish? You can't directly use a "button" as a condition for a couple reasons, but there are ways to work around that with a custom attribute if that is truly what you're looking for. However, it's far more likely you're looking for a button event as a trigger, not a condition.

Button pushes, holds, and releases are momentary events and, as such, are almost always used as triggers. For example, with a trigger of something like "button 1 pushed," you could run some action (toggling a light, for example). For multi-button devices (or even single ones that support multiple types of button events), choosing the "Button Controller" device type as a trigger instead of plain "Button" makes it a lot easier to set up specific events for each button number and type of button event (pushed, released, held). This is effectively a slightly more powerful version of what you'd get with the standalone Button Controller app.

If you're truly looking for something button-related as a condition, I'd again evaluate why, but the closest you can do is evaluate the button number that was last pushed, held, or released. All three (if the button device supports all three) are stored as attributes on the device and, as such, could be tested with the "Custom attribute" capability in a conditional--but again, not very likely something you'd need to do.