If an event or trigger comes from Home Assistant, I try and manage the automation flow within Home Assistant to avoid introducing dependencies. But, when the logic becomes more complex and the chances of me remembering how the layers of folded GUI automation, or worse still YAML automations, work drops to near zero, I use Node-Red.
Posts tagged with Node-Red showcase how I use Home Assistant to trigger and respond to Node-Red as well as how I use Node-Red on its own, to add capabilities, logic, monitoring and even status dashboards.