# My first "complex" flow..why is the flow still running when a binary condition is off in Home assistant?

**URL:** <https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [31 May 2022 16:03 UTC](https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307 "2022-05-31T16:03:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeltak](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@Zeltak](https://discourse.nodered.org/u/Zeltak)\
**Post date:** [31 May 2022 16:03 UTC](https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307/1 "2022-05-31T16:03:16Z")

</div>

hi all!

a neweb loving playing in recent days with node-red and even more the fantastic community here!

so I have my first "complex" flow (a simple presence faker) I have created and it works very well apart from the trigger part

I have specified a state node to check if `vacation mode` is on or off in Home assistant and only if on launch the rest of the nodes.  
but for some reason turning the state in Home assistant on and off won't have any effect and the whole sequence runs with both the `vacation mode` on and off

here is an how it looks

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f200399872bec3e322e1ed9d8790bb80949d591a.jpeg)

and here is the json linked (dont have attaching rights yet in the forums sorry):

> **[\[{"id":"967867dff605c38c","type":"tab","label":"vacation...](https://pastebin.com/2JARh66w)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

any Clue what im missing?

I did check the state in Home assistant of course to see when it both goes on and off and deployed each time after that

best

Z

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [31 May 2022 23:10 UTC](https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307/2 "2022-05-31T23:10:23Z")

</div>

Most of the users here will not have the HA nodes (webhooks) installed - as such they will not be able to replicate your flow.

However i think that you actually want to trigger on the change of state (as this should be picked up by the webhook polling) rather than the actual State

You would be best off checking this in the NR 3rd party integrations in the HA forum

Let me have a quick look as i use HA as well and come back

Craig

---

<div class="post-metadata">

**Author:** ![Zeltak](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@Zeltak](https://discourse.nodered.org/u/Zeltak)\
**Post date:** [1 June 2022 09:02 UTC](https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307/3 "2022-06-01T09:02:35Z")

</div>

thx so much @craigcurtin

even tried with a poll state to see if the `vacation mode` is off (which I verified in the entity state) but it still launches the presence faker node

 ![CleanShot 2022-06-01 at 12.02.15](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4badcb22397bff5ee55766bcda4f0e9595f09ec6.jpeg)

strange im probably doing something very wrong 😃

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 July 2022 09:03 UTC](https://discourse.nodered.org/t/my-first-complex-flow-why-is-the-flow-still-running-when-a-binary-condition-is-off-in-home-assistant/63307/4 "2022-07-31T09:03:19Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
