Double latch up-down?

Hi there,
I need some advice to implement a two state event system.
Right now I have a Latch to trigger when temperature is above a certain threshold and then creates an alert.
This is all working fine so I can see the red alerts in the left menu, but I also want to be notified when the condition goes back to normal with an info level.
This is important because I want to see how long did the critical condition occur.
So the question is what is the best way to implement this?
Should I create another Latch in parallel with a reverted condition or is there some clever settings in the node that can help?

Cheers.

There are several ways to accomplish what you’re asking here, but I think the most efficient way is to define a new payload value on the Latch node under “Path for result of Reset Expression”, and then use a Conditional node to check that value.

Here’s a link to a template that might be helpful. Here, we auto-resolve the event, but you can tweak it to log a new event to achieve your desired results:

https://app.losant.com/applications/recent/template-library/?templateId=5f909d5bc0779800540ef0e7

Makes sense going to use that approach.