Switch Stops Flow After Second Rule Applies

I set up a switch with 2 conditional outputs. There's instances where both outputs would fire and so that this wouldn't happen I set the switch to stop after the first rule applies. What the switch does now is it just checks the 2nd rule and after that applies it skips the first which is weird to me because I would expect it to check the first rule which is on top of the other first. And I don't want to change their order because it would be inconsistent with how I imagine how my flows should be visually represented for better understandibility. Do you have some suggestions for fixes?

Hi @ars4l4n

Can you share/export the portion of your flow that demonstrates this?

[{"id":"83e9e9a.f33ea18","type":"api-call-service","z":"a5fc1698.8bc088","name":"Unlikely? Notify me: "Perhaps Do Laundry Today"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ "message": "Wasch heute Wäsche, wenn viel schmutzig ist!" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":750,"y":360,"wires":[]},{"id":"85c8798.05dee88","type":"debug","z":"a5fc1698.8bc088","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":340,"wires":},{"id":"d4afa5a9.c6c978","type":"inject","z":"a5fc1698.8bc088","name":"10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 10 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":60,"y":300,"wires":[["30b23686.444b9a"]],"info":"muss man über inject node (täglich) statt timecheck node machen, wenn es sich um den 1. Node handelt"},{"id":"6bed856e.d1a4ac","type":"http request","z":"a5fc1698.8bc088","name":"Impossible? Check The Next 12hs' Weather","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/174687?apikey=XXXXXXXX&details=true&metric=true","tls":"","persist":false,"proxy":"","authType":"","x":730,"y":240,"wires":[["1ffe6542.58360b","cdc45cb2.12391"]],"info":"### Notiz: Rç�ckgabe: Parsed JSON Objekt, weil UTF8-Zeichenfolge unübersichtlich ist, nichtmal komplett ins Debugfenster passt und Binärer Buffer unverstà����ndliche Zahlenfolgen ausgibt..\n\nübrigens gibt nur die 12h abfrage die luftfeuchtigkeit aus, die 1d abfrage aber nicht"},{"id":"1ffe6542.58360b","type":"switch","z":"a5fc1698.8bc088","name":"Humidity <55%? *","property":"payload[0].RelativeHumidity","propertyType":"msg","rules":[{"t":"lte","v":"55","vt":"num"},{"t":"gt","v":"55","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":1010,"y":240,"wires":[["8ad58dfe.01da2"],["bfcc2df1.fbf1d"]],"info":"da Sommer 2022 nie "Wasch heute Wäsche" getriggert wurde, scheint es, als würde die 2. Kondition ">55%" vor der 1. abgefragt werden. Deswegen verstelle ich deren position, aber es gefällt mir nicht."},{"id":"8ad58dfe.01da2","type":"api-call-service","z":"a5fc1698.8bc088","name":"yes? Notify Me: "Do Laundry Today!"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ "message": "Wasch heute Wäsche!" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":1270,"y":220,"wires":[],"info":"die Aussage "unmöglich" ist glaub ich streng genommen meteorologisch unkorrekt"},{"id":"cdc45cb2.12391","type":"debug","z":"a5fc1698.8bc088","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":280,"wires":},{"id":"bfcc2df1.fbf1d","type":"api-call-service","z":"a5fc1698.8bc088","name":"no? Notify Me: "Perhaps Do Laundry Today"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ "message": "Wasch heute Wäsche, wenn viel schmutzig ist!" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":1290,"y":260,"wires":[]},{"id":"30b23686.444b9a","type":"http request","z":"a5fc1698.8bc088","name":"Check Todays' Weather","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://dataservice.accuweather.com/forecasts/v1/daily/1day/174687?apikey=XXXXXXX&details=true&metric=true","tls":"","persist":false,"proxy":"","authType":"","x":270,"y":300,"wires":[["8929ca0d.2603c8","85c8798.05dee88"]],"info":"### Notiz: Rç�ckgabe: Parsed JSON Objekt, weil UTF8-Zeichenfolge unübersichtlich ist, nichtmal komplett ins Debugfenster passt und Binärer Buffer unverständliche Zahlenfolgen ausgibt.."},{"id":"8929ca0d.2603c8","type":"switch","z":"a5fc1698.8bc088","name":"Rain?","property":"payload.DailyForecasts[0].Day.PrecipitationProbability","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"btwn","v":"1","vt":"num","v2":"25","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":450,"y":300,"wires":[["6bed856e.d1a4ac"],["83e9e9a.f33ea18"]]},{"id":"9322cd47.1111","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Hi @ars4l4n - for some reason thats not parsing, please use backticks to format the code.

```
JSON here
```

does it work now?

[{"id":"f0e69e30.04bbc","type":"http request","z":"63204229.c0e1fc","name":"Check Todays' Weather","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://dataservice.accuweather.com/forecasts/v1/daily/1day/174687?apikey=XXXXXXXXX&details=true&metric=true","tls":"","persist":false,"proxy":"","authType":"","x":270,"y":180,"wires":[["a0202068.2d4b5","eb1d0669.80e228"]],"info":"### **Notiz:** `Rç�ckgabe: Parsed JSON Objekt`, weil `UTF8-Zeichenfolge` unübersichtlich ist, nichtmal komplett ins Debugfenster passt und `Binärer Buffer` unverständliche Zahlenfolgen ausgibt.."},{"id":"a0202068.2d4b5","type":"switch","z":"63204229.c0e1fc","name":"Gonna Rain?","property":"payload.DailyForecasts[0].Day.PrecipitationProbability","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"btwn","v":"1","vt":"num","v2":"25","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":470,"y":180,"wires":[["8111d9a4.ed1e08"],["30bbdcde.379d94"]]},{"id":"eb1d0669.80e228","type":"debug","z":"63204229.c0e1fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":220,"wires":[]},{"id":"cb7fd4c0.08de18","type":"inject","z":"63204229.c0e1fc","name":"10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 10 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":60,"y":180,"wires":[["f0e69e30.04bbc"]],"info":"muss man über inject node (täglich) statt timecheck node machen, wenn es sich um den 1. Node handelt"},{"id":"30bbdcde.379d94","type":"api-call-service","z":"63204229.c0e1fc","name":"Unlikely? Notify Me: \"Perhaps Do Laundry Today\"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ \"message\": \"Wasch heute Wäsche, wenn viel schmutzig ist!\" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":220,"wires":[[]]},{"id":"8111d9a4.ed1e08","type":"http request","z":"63204229.c0e1fc","name":"Impossible? Check Weather For The Next 12h","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/174687?apikey=XXXXXXX&details=true&metric=true","tls":"","persist":false,"proxy":"","authType":"","x":740,"y":140,"wires":[["c616beef.b3b","8fdf6de4.3c0c1"]],"info":"### **Notiz:** `Rç�ckgabe: Parsed JSON Objekt`, weil `UTF8-Zeichenfolge` unübersichtlich ist, nichtmal komplett ins Debugfenster passt und `Binärer Buffer` unverstà����ndliche Zahlenfolgen ausgibt..\n\nübrigens gibt nur die 12h abfrage die luftfeuchtigkeit aus, die 1d abfrage aber nicht"},{"id":"c616beef.b3b","type":"switch","z":"63204229.c0e1fc","name":"Humidity <55%? *","property":"payload[0].RelativeHumidity","propertyType":"msg","rules":[{"t":"lte","v":"55","vt":"num"},{"t":"gt","v":"55","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":1030,"y":120,"wires":[["b82c19fe.9e8de8"],["92eedb4a.a87a38"]],"info":"da Sommer 2022 nie \"Wasch heute Wäsche\" getriggert wurde, scheint es, als würde die 2. Kondition \">55%\" vor der 1. abgefragt werden. Deswegen verstelle ich deren position, aber es gefällt mir nicht."},{"id":"b82c19fe.9e8de8","type":"api-call-service","z":"63204229.c0e1fc","name":"yes? -> Notify Me: \"Do Laundry Today!\"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ \"message\": \"Wasch heute Wäsche!\" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":100,"wires":[[]],"info":"die Aussage \"unmöglich\" ist glaub ich streng genommen meteorologisch unkorrekt"},{"id":"8fdf6de4.3c0c1","type":"debug","z":"63204229.c0e1fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":180,"wires":[]},{"id":"92eedb4a.a87a38","type":"api-call-service","z":"63204229.c0e1fc","name":"no? Notify Me: \"Perhaps Do Laundry Today\"","server":"9322cd47.1111","version":3,"debugenabled":false,"service_domain":"notify","service":"alle_relevanten_gerate","entityId":"","data":"{ \"message\": \"Wasch heute Wäsche, wenn viel schmutzig ist!\" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1330,"y":140,"wires":[[]]},{"id":"9322cd47.1111","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

It did,

and It's acting exactly as I thought it would.

Jan-28-2023 13-38-59

So are you saying only the last rule is being triggered? - as I don't see that, I can only suggest checking the values again?

You posted your actual API key. I've edited the post to remove them.

2 Likes

I don't know what has been going on. I noticed this issue during summer. I've doublechecked again with some different values and it seems to be working. I'll have to check it out during summer when it becomes relevant again. Sorry for taking your time.

@TotallyInformation ty

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