Yos!
I’m currently trying make it such that when the solid widget receives a value of 0, it does this,
and when it receives a value of 1, it should change the fill color to red, but it doesn’t.
The purpose of this is to make it easily visible for users.
I’ve already tried metadata thingamabob {“metadata”: {“color”: { “fill”: “red”}}} this thing idk and other stuff. im lost help pls
ty!
-ran
Hey @smartxholding,
Your thought process is correct, we need to use the metadata to achieve this effect.
The only thing wrong is the structure. You don’t need to use the color object of the metadata as another object, instead, you use it like this:
Remember to change the “temperature” to the correct variable!
And you will achieve this:
Hope this was useful and let me know if you have any other questions,
Matt.
YEAH USEFUL!
Last question!
Is it possible to make it such that when I send a value of 1, the payload parser - decoder would send another payload to overwrite the value with a string and retain the color? Or even anything that would help people understand it easily like changing the alias name or variable name? If I could do that from the emulator itself like how you did it with the color thing that would be nice as well!
I’ve been doing this so far and I understand that the color is not changing because I’ve been trying to make my value a string and the widget isn’t processing the 1.
I’ve also tried this nonsense where I write my payload in the payload parser decoder thing.
And it’s definitely not working.
So I just want my outcome to be this
if value = 1, color = red, value or alias or something shows “Smoke Detected”.
OKAY THANKS BYE
Ran