# How to check if a temp. sensor is still 'alive'

**URL:** <https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147>\
**Category:** Flows\
**Created:** [March 20, 2025, 9:43pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147 "2025-03-20T21:43:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 20, 2025, 9:43pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/1 "2025-03-20T21:43:18Z")

</div>

I have a flow that regulates by heating with a heatpump. For this I need the outside temperature.  
At this moment i use the temperature from Homey’s Weather (add them up and divide by two) and from the KNMI App, but they sumtmes differ from the actual outside temperature.

My plan is to put 2 Sonoff temp sensors somewher outdoor and take the average of these.

But with a failing/stuck Aqara sensor still fresh in mind : How can I test if the sensors are giving valid values ?

- Test if they are still reachable
- Test if (I think) the value has changed in the last 12 hours ? Even in summer night and day should differ.
- Any other way ?

If the test(s) fail I’ll have the flow revert the heating to thermostat (I have the flow for that already in place).

btw if the sensors go below -9 I’ll also revert to thermostat since the sensors can’t measure below -10..

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [March 20, 2025, 10:14pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/2 "2025-03-20T22:14:20Z")

</div>

A very common way is the 2 out of 3 test. You use 3 sensors and at least 2 shall have the same value.

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [March 21, 2025, 6:28am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/3 "2025-03-21T06:28:53Z")

</div>

I use Device capabilities to check if the sensor has reported the last x hours.  
Use the card “Retrive insight value from” and set the time to 0. This will give you the last time the sensor reported.

You could also restart a timer everytime the sensor reports. When the timer finishes the sensor has not reported.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 21, 2025, 11:27am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/4 "2025-03-21T11:27:53Z")

</div>

But I intend to put them at different locations, so I doubt if that will be the case..

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 21, 2025, 11:29am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/5 "2025-03-21T11:29:49Z")

</div>

Spounds good, I’m not to familiar with the extended options of Device Capabilities though, only the regular ‘create virtual device’…

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [March 21, 2025, 11:44am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/6 "2025-03-21T11:44:28Z")

</div>

> [@JohanP](#):
>
> How can I test if the sensors are giving valid values ?

This was an answer to your question “ How can I test if the sensors are giving valid values ?”.  
As it is difficult/impossible to make one sensor 100% reliable, as a sensor cannot send a message that it cannot reach Homey 😉, etc.  
Using this principle, for measuring the temperature at two location, you need 6 devices !

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 21, 2025, 11:54am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/7 "2025-03-21T11:54:00Z")

</div>

But maybe Homey can give a notification if the sensor doesn’t give a value ?

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [March 21, 2025, 12:05pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/8 "2025-03-21T12:05:25Z")

</div>

It is a card in the “Then” section of the app.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 21, 2025, 12:06pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/9 "2025-03-21T12:06:45Z")

</div>

Ah, I think I did something like that with the aqara sensor that was not working wel…

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [March 21, 2025, 2:42pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/10 "2025-03-21T14:42:15Z")

</div>

> [@JohanP](#):
>
> Any other way ?

> [@A script to check sensor last update](https://community.homey.app/t/a-script-to-check-sensor-last-update/63142/25):
>
> Updated script I posted above - added counter of non responding devices - eg, in case you would like to initiate some action based on number of not-responding devices - please note this is the version I’m using, so feel free to change relevant variables below the section // Filter devices to check Changelog : 0.1 - update - converting notReportingCount to a number - if you used previous version of script, delete tag by await tag(‘notReportingCount’, null);\* 0.2 - added filtering based on dev…

> [@A script to check sensor last update](https://community.homey.app/t/a-script-to-check-sensor-last-update/63142/39):
>
> As there is for some time options to see Lastseen timestamp for Zigbee devices, here is the script for Zigbee devices only, which might be more accurate for Zigbee devices. Thanks @Caseda for your overview script wink Version 0.3 - updated for HomeyScript v. 3.5.1 Version 0.3b - fixed for THEN card (returning TEXT value), primary use-better use is for AND card though Version 0.4 - added option to filter out routers and/or end devices Version 0.5 - added option to exclude ZONES, moved varia…

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 21, 2025, 8:30pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/11 "2025-03-21T20:30:26Z")

</div>

Need to look in to that. Could be a solution but I’m not familiar with scripts, never used them…

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 22, 2025, 10:49am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/12 "2025-03-22T10:49:22Z")

</div>

Ok, I did this :

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/2/025fe4377d24d29df6b29e1c6b56880d87c5b070.png)

But not sure what to select here :

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/6/f6bb2dd6596b9a58cb5471e268f11315f0d584d0.png)

It gives me :

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/6/b66ab7089cdf3bb5167fa374db49c18d98f64e07.png)

Aangepast UT Tick : 1742640105765

or

Duur tot nu : 801

Edit: got it… Duration is last upate since in milliseconds, right ?

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [March 22, 2025, 5:08pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/13 "2025-03-22T17:08:14Z")

</div>

Exactly

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 23, 2025, 7:59pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/14 "2025-03-23T19:59:15Z")

</div>

![Screenshot_20250323_205631_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/7/375db760313a112eeb666b9580dff1c68a98458d.jpeg)  
Still not getting something to work with.  
Updates seem to refresh at random…

---

<div class="post-metadata">

**Author:** ![Francois\_Amichaud](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/francois_amichaud/32/17227_2.png) [@Francois\_Amichaud](https://community.homey.app/u/Francois_Amichaud)\
**Post date:** [March 24, 2025, 4:44pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/15 "2025-03-24T16:44:43Z")

</div>

Hello, I have made an advances flow to do as you said. Every time the temperature changé it restart a 24h timer. And every day at 20h00 the flow is checking every timers are still running. If no an alert is raised for the concerned sensor.

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [March 24, 2025, 7:36pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/16 "2025-03-24T19:36:21Z")

</div>

Or you could just send an alert when the timer finishes. No need to check whether it is running or not.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 24, 2025, 9:06pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/17 "2025-03-24T21:06:35Z")

</div>

That could work, but 24 is a bit long for a temp sensor for heating not working.

But to short and you might miss a temp change ? Not sure yet…

---

<div class="post-metadata">

**Author:** ![Francois\_Amichaud](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/francois_amichaud/32/17227_2.png) [@Francois\_Amichaud](https://community.homey.app/u/Francois_Amichaud)\
**Post date:** [March 25, 2025, 9:45am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/18 "2025-03-25T09:45:33Z")

</div>

Yes 24h can be a bit long… You can choose 12h for example. It is true that the timer cannot be too short because temp can be stable in a room. However, my Aqara sensors measure temp, humidity and pressure. It seems that humidity changes more often than temp. So putting a timer on humidity change is perhaps more usefull to track an issue with the sensor.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 25, 2025, 5:34pm UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/19 "2025-03-25T17:34:55Z")

</div>

This is for outdoor…

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [March 28, 2025, 8:57am UTC](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147/20 "2025-03-28T08:57:32Z")

</div>

Insights for the sensor will show you how frequent it updates.

[Next page](https://community.homey.app/t/how-to-check-if-a-temp-sensor-is-still-alive/133147.md?page=2)
