First of all I have to confess, I'm a noob I get things working most of the time but if it comes to coding it's over for me
What I'm trying to do is a "watchdog" for my Zigbee Sensors (Aqara Door/Window Sensors). I thought about a Timer which activates every 10 minutes the phoscon get node for the specific sensor. The node provides then the timestamp-value for "last updated".
As a next step I thought about a function node which compares the "last updated" timestamp with the current time, and if the time difference is higher than one or two hours it notifies me via my Telegram node or sth.
BTW: Do I need to do some timezone corrections? It seems to me that the timezone is not as I initially adjusted it in my HomeAssistant / NodeRed confguration.
Does this approach make sense to you and if so, can you help me with the function node?
Thank you in Advance