I’ve set up manual error flows for errors I suspect might pop up. However, I’d like to be able to set a default flow-card for all error-outs of all flow cards.
As a user I want to be able to set a default error flow card, so that any card that has an error-out, but I haven’t attached anything to, automatically uses the default.
Conversely, any sort of default error handling in flows would be useful. I’ve had some weird errors pop up in the past, and I could only see what the error was, because I realized a flow wasn’t working, then testing it manually and seeing where it failed.
You can also use sub flows. This is especially useful when you have several triggers and one Action process behind.
You can put all actions and conditions into one flow. Then make another flow with all triggers. Then start the flow with the logic card “start flow with number argument” if you want to pass a trigger value into the second flow.
This way you only need to use the error output of the “start flow” card to catch all errors that can occour inside the second flow.
I don’t want to start the mood “Night” unless all relevant windows and doors are closed. So I have my Night flow:
When flow starts → Then Start flow “night-test” → Then set mood Night
The idea is that Start flow would fail, since night-test now has a HomeyScript that’s simply: throw new Error("Can't set Night mood");
It generates an error. But on the outside, that error isn’t seen on the “Start flow” card. The idea here was that when conditions weren’t right, I’d throw an error to disrupt the flow from the “Start ‘night-test’ Flow” card, so it didn’t actually set the mood. Figured I’d check that I had the idea right.
What I’m trying to achieve is to have a “And Flow returns true”, so I can break down this Night flow into smaller parts, where I don’t continue the main flow unless the checks are right.