How to get the bad status (red) for Temperature Node

Moderator: leecollings

Post Reply
GiangiRed
Posts: 2
Joined: Saturday 09 May 2020 12:04
Target OS: Windows
Domoticz version:
Contact:

How to get the bad status (red) for Temperature Node

Post by GiangiRed »

Hi to all.
I need to act in case of my temperature node is not updating the value since time. Practically when the screen shows a "red line" on the upper left side, I need to get the bad status and provide an action. I searched on forum with no success. I tried to use ".lastUpdate.minutesAgo" but it seems not to be the right way.
May someone help me to finde the right parameter to check?
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: How to get the bad status (red) for Temperature Node

Post by erem »

.lastUpdate.minutesAgo should work for you

from the docs

Code: Select all

if (domoticz.devices('My PIR').lastUpdate.minutesAgo > 5) then
	domoticz.devices('Bathroom lights').switchOff()
end
Regards,

Rob
GiangiRed
Posts: 2
Joined: Saturday 09 May 2020 12:04
Target OS: Windows
Domoticz version:
Contact:

Re: How to get the bad status (red) for Temperature Node

Post by GiangiRed »

Thanks for the answer. The value of ".lastUpdate.minutesAgo" seems not to be the right solution because it continues to be increased in any case, regardless of the temperature value and the status of the "red" or normal indication.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests