App getting number dynamically

I would like to allow a user to change a numeric parameter in my App. If it was a static number of rarely changed number, I could just set it in preferences. However, I would like user's to be able to change it via a dashboard or via rules. Is there some way to get access to a Rule Machine variable in an App?

Dashboards only show devices. Consider how thermostats or AVRs work in HE where they may have an app that creates a child device. You could follow suit and have your app create a child device and via dashboard allow change that your app listens to. Just thinking out loud here. :thinking:

2 Likes

You could also try using a Global Variable Connector (although a child device might be simpler, if you’re writing a custom app anyway.)

RM can always change it if you have an appropriate command defined.

I am new to writing Hubitat Apps (although I have done plenty of programming in other contexts). I have been learning primarily from the SmartThings tutorials because I have found very little tutorial-style references for Hubitat. Connectors for Rule Machine variables are not covered in the SmartThings tutorials (I don't know if they even have a comparable concept). Where can I find documentation about how my App can access a connector?

This is the only documentation that I am aware of