Node Red wait until J: expression help needed please

Hi all, can someone please look at this and tell me why it isn’t working correctly? My end goal is to have this node time out time out if the trash light is turned on. I will later change this to my outside air damper switch. As it sets it just goes to waiting and doesn’t time out when I turn the trash light on.

First when needing to post a screenshot then on windows you can hold windows and shift down and then press s.
You can then mark the area you want to grab.
The area can be inserted directly in a forum post by holding ctrl and pressing v.

Regarding your problem then the = might be the issue
= is normally a declaration
== is a comparison

My bad on the lack of appropriate screen shot. I have tried replacing the = with == but it doesn’t accept the == as an acceptable format.

Does that expression even return a number?

If the light is on set the timeout to 5 seconds if not disable the timeout.

$entities("...").state = "on" ? 5 : 0

1 Like