Change Color of <stat> element via payload


#1

How can I change the display color of a element regarding the payload of a topic?


#2

Hello Ulli,

Could you provide an example of what you are trying to accomplish?


#5

I want to change the color a feed element from a remote power switching tool.
I have made my example public, so you can see how it looks in priciple.
Here is a link:
https://node02.myqtthub.com/panel/show/43C1B725B3CC5643D1340615ABB252980E970431


#6

Hello Ulli,

There was some bug introduced recently that was causing your case to not work. Having that fixed, these are the steps we follow to reproduce what you are trying:

  1. With your public panel loaded (remember to close it if that’s what you want), you have:

    https://node02.myqtthub.com/panel/show/43C1B725B3CC5643D1340615ABB252980E970431

    NOTE: remember to paste images it just Control-C with the image selected and Control-V on your message editor.

  2. Now, go to your “Topics used” tab or a MQTT client to publish a message “{‘status’ : ‘1’}” to topic “beluga/H0”:

    With MQTT-Spy:

    With the “Topics used” is just the same, just doulble click on the last value publish and publish a new value:

    …then send new value:

  3. After that you should see changes reflected on your panel. Remember that the first time the panel receives updates after some time of inactivity it takes some seconds to rerefresh. Next updates you send to your panel will refresh quicker:

Let us know if it works for you and your progress!


#7

Thanks a lot. That solved my problem.