Page 1 of 1

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

Posted: Thursday 04 November 2021 14:18
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?

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

Posted: Thursday 04 November 2021 14:35
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

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

Posted: Monday 15 November 2021 8:22
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.