Automations

Home Assistant’s native automation support has improved significantly in recent years. If I were starting with home automation today, I’d likely consider using it. However, when I first set up Home Assistant in 2019, Node-RED was the go-to solution, and the examples below are based on that context.
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.
Sample Automations
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:
- Trigger: Time of day event determined by subtracting 90 minutes from the day’s calculated sunset time (uses the Sun integration)
- Condition: Someone is home (using presence detection)
- Actions: Turn on the ceiling and entertainment center lights in the family room
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.
- Triggers: When the solar azimuth is in range, the solar elevation is in range, the outside temperature is <=55 or it is >=80
- Conditions: Someone is home (using presence detection)
- Action: Turn on the ceiling and entertainment center lights in the family room
In Node-RED:
