Hi @Andrew2, welcome to SharpTools family and our community, and glad that you have enjoyed SharpTools.
You can create a TEXT
variable and a rule to update this variable’s content based on the relay’s on/off state. Add this variable to the dashboard and configure it to open hyperlink when tapped with the $.runRule()
syntax to trigger another rule to toggle the relay. (See screenshot below.) The downside of this is you will not be able to change the tile color based on the variable content.
The other approach is to create a custom device handler that reports the state as “SET”/“UNSET” as an additional custom attribute and use Hero Attribute tile to display this custom attribute’s value. And then customize the Hero Attribute tile to display the text attribute value while the active color is based on the On/Off status.