# Colorize text when no update is received

**URL:** <https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237>\
**Category:** Dashboard\
**Created:** [26 March 2021 16:11 UTC](https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237 "2021-03-26T16:11:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mortimer](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Mortimer](https://discourse.nodered.org/u/Mortimer)\
**Post date:** [26 March 2021 16:11 UTC](https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237/1 "2021-03-26T16:11:52Z")

</div>

Dear all,

I use MQTT to receive updates from my heating. For example, the heating will send an update every 1 minute on the humidity in my living room, which I use to present in the dashboard.

![MQTT_humidity](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e243990c936dba31a191725ca3e5c27cbe126771.png)

However, to exclude any issues in the MQTT communication, I would like to colorize the value, e.g. in red, when no update was received within 2 minutes over MQTT. How can I solve this in the most simple way?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 March 2021 16:26 UTC](https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237/2 "2021-03-26T16:26:31Z")

</div>

To know when no value is received for two minutes, feed it into a Trigger node set to Send Nothing then Wait 2 Minutes, Extend Delay if new messages arrive, then Send a message to do the colour setting. The result will be that it will send nothing while messages keep coming in and send the message 2 minutes after they stop.

**[Edit]** If the reason it stops is that the device is offline or inaccessible then also (or instead) use the MQTT LWT message to tell you it is offline.

---

<div class="post-metadata">

**Author:** ![Mortimer](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Mortimer](https://discourse.nodered.org/u/Mortimer)\
**Post date:** [30 March 2021 09:40 UTC](https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237/3 "2021-03-30T09:40:28Z")

</div>

Great @Colin ,

works like a charme.

There is also a nice description under [Trigger a flow if a message isn’t received after a defined time : Node-RED](https://cookbook.nodered.org/basic/trigger-timeout)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 April 2021 09:40 UTC](https://discourse.nodered.org/t/colorize-text-when-no-update-is-received/43237/4 "2021-04-13T09:40:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
