If then for button

Hello,

Can't figure this one out. I have a button which can be pushed, held or double pushed. How do i create an if/then scenario for those 3 functions? I looked at Conditional actions but don't see button as an option to select for my if/then.

Have you tried the Button Controller App? Gives lots of options when pressing buttons!

2 Likes

Perfect! Thanks so much for the quick response!

If using RM, select 'Button Device' instead of 'Button' as the capability and you'll be able to set IF...Then conditionals.

2 Likes

I'd recommend starting with the app, some advice I should take myself to be honest, I have gravitated to RM but should use the apps like Button Controller more.

If you want to solve it in RM, you first need to look at including those options, i.e. button pressed, held, etc, in your triggers, and in your conditions you've pricked my interested in cracking how you need to detect these.

EDIT: I should finish my sentences....And my internet should not cut off my response.... :slight_smile: The simpler option I was wanting to mention was that you can have an individual rules triggered my different options with your button, i.e. a press could trigger one rule with certain actions, another rule triggered by a release or hold, etc. I think I did type that more context would help guide you on how best to construct these, but sounds like you are back on track for now, so will leave you to explore for yourself.

I guess i was confused by the wording in RM where it says "Any will trigger". But yes i guess i am interested to see how it would be handled in rule machine as well. Will probably play around with it when i have time but the App was a super quick fix.

Edit: I see bjcowles response about using button device. That may be the ticket for RM.

Ok yep bjcowles response was correct. That allows me to set the conditionals for the button and provides more actions than the app. Thanks all!

2 Likes

I'd suggest using rule machine, as you can log actions & events, so when it doesn't work, it's easier to figure out what went wrong. Turn on logging , so you can see what failed where. Pictures help alot with rules, for me anyway, so here goes a button rule

2 Likes