Home Assistant’s built in automation support has come a long way in the last few years. If I were just starting out now with home automation I would probably consider using it, but as it was in 2019 when I first setup Home Assistant, Node-RED was the go to solution and I still like it, so I’ll keep using it for now.
If you are just getting started with automations in Home Assistant have a look at some of their pre-packed blueprint automations here: blueprint community forum
Simple light turn-on event => Turn ON the family room & entertainment center lights 90 minutes before sunset if someone is home
Breaking it down for Home Assistant:
Here’s how that would look using Node-RED:
Second example (more moving parts, same basic structure) => Close the skylight blind when both the sun elevation and azimuth are in range, or if the outside temperature is <=55 degrees Fahrenheit and the sun is below the horizon, or if the outside temperature is >= 80 degrees Fahrenheit.
In Node-RED: