# Device online or offline?

**URL:** <https://community.homey.app/t/device-online-or-offline/1387>\
**Category:** Questions & Help\
**Created:** [September 8, 2018, 6:14pm UTC](https://community.homey.app/t/device-online-or-offline/1387 "2018-09-08T18:14:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seraphim](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/seraphim/32/8879_2.png) [@Seraphim](https://community.homey.app/u/Seraphim)\
**Post date:** [September 8, 2018, 6:14pm UTC](https://community.homey.app/t/device-online-or-offline/1387/1 "2018-09-08T18:14:29Z")

</div>

Hello Community,

is there a way to find out if a device is on- or offline?

I have several rooms equipped with two temperature sensors (e.g. Hue motion sensor with temperature and NetAtmo) To the control my heating I use the average of both of them to feed a virtual thermostat. This works fine so far, but I had some problems with the heating when one of the two devices went offline. Due to the calculation of the average to control the heating, my thermostat receives a wrong temperature information.

Is it possible to check if a device is offline before using it for a calculation?

Regards  
Andreas

---

<div class="post-metadata">

**Author:** ![Marc\_Konings](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc_konings/32/5358_2.png) [@Marc\_Konings](https://community.homey.app/u/Marc_Konings)\
**Post date:** [February 1, 2019, 5:53pm UTC](https://community.homey.app/t/device-online-or-offline/1387/2 "2019-02-01T17:53:41Z")

</div>

Just started 2 days ago with Homey, so I don’t know all ins and outs. But couldn’t you just create two variables (one for each temperature) and use a flow to update them every X minutes, but only when a temparature is actually available for the device? I assume when the device is offline, that flow would abort (leaving you with the last known temperature) or return a null/0 value (on which you can act). Either way you would always have two temperatures to calculate the average.
