Here is a basic example using CoRE. I’ve just showed the action. You can set any trigger you like in the ‘IF’ section:
I have placed an ‘@’ symbol at the start of the variable name so that it becomes a ‘global variable’. This means that other CoRE Pistons can see the variable and act upon the result as desired (send you SMS messages, flash lights, self destruct etc)
If you want the variable value to display in a device tile however, that’s a lot more complicated and requires a custom device handler.