In a supertile, is there any method to hide a THING VALUE if certain criteria are not met? In my case charging is done, so hide the line of text indicated… if time=0 don’t show. I can’t find anything and somehow I doubt it can be done. But I thought I might ask just in case.
What about using a rule to copy the value to a variable… and if the value is 0, set the variable to be blank?
There’s also a feature request for the ability to style individual parts of a Super Tile which has picked up some interest lately if you want to cast a vote on that:
Thanks Josh. This sounds like a good solution, but this wouldn’t effect the text part. Right now I have “charging mins left” as a custom unit so it would be beside the minutes number reguardless of it’s length. Padding a variable wouldn’t hide the text?
I was thinking you could embed the ‘units’ directly into the variable text that way you would have the option of setting the variable completely blank when desired.
Would your method apply to numeric variables as this attribute is numerical only. So I can’t set it to nothing… it’s unfortunatly only expecting a number.
In this case, I was suggesting just using a text variable to store the value.
Here’s an example rule using the energy attribute of one of my smart plugs as an example, but any attribute / value could be used here.
Any time the value changes, this rule runs. I used an expression because it simplifies the number of clicks needed, but you could use a regular IF Condition if you want as well. The main thing is we are using the Event Value context variable ($context.event.value) for the condition and concatenating into the string.
The Set Variable action doesn’t allow a completely empty field, so you would need to copy in a blank character or use an expression with nothing in it.