I am attempting to replace the functionality currently supported by my Crestron environment with Hubitat and ESP32 based processing. The Crestron processor was reading the water depth values in my well and rainwater collection tank, the latter is used for garden irrigation. I also built some logic to top-up the rainwater tank from my well should it not be full enough for irrigation purposes. The exact level at which top up would begin was configurable in a Crestron UI (say 20%) along with an on/off switch for the top-up functionality (ie sometimes I don't want it to top up no matter what the level in the tank).
My question is, is there a way of being able to do this in Hubitat without hard-coding the top-up level and the "TopUp Enabled/Disabled" toggle in a rule? I have searched but it seems there is no way to set a variable in a dashboard.....although I hope I am wrong.
I hope the above use-case makes sense, it really comes down to being able to set variables, which will be available to Rules Machine via a UI.
If you are asking if you can use hub variables on a dahsboard, yes you absolutely can.
I do this with a grill set up where I set the running target temperature, final meat target temperature, target temperature where I want to get alerted to do a flip, High and Low temps to alert me when the grill is too hot or too low from my set point. The logic is handled by rule machine.
You just tap the icon with the variable, and you can manually enter the string or number you want to enter.
You also have the option to create a variable connector from a variable, on the Hub variables screen. It creates a virtual device for that variable, and then you can use the device like any other device on the dashboard, or set and retrieve the variable value using the device commands like any other device.
It has its uses, but most people opt to just directly use variables since they can be accessed by dashboards and rules directly, like was recommend here.
Connectors are handy for replicating states... as you can pick what type of device capability attribute is used to store the value, or you can just use the default connector device attribute, which will just be "variable".
Connector devices can be added to a dashboard like any other device, and can use the variable templates on the dashboard.