- Part 1 - Design
- Part 2 - Where to start
- Part 3 - "Smart" Appliances
- Part 4 - Ceiling Fans
- Part 5 - Bin Day
- Part 6 - Lighting
- Part 7 - Motorised Gate
- Part 8 - Motorised Blinds
- Part 9 - Door Locks
- Part 10 - Debugging!
- Part 11 - House sitter mode
- Part 12 - Backups
- Part 13 - Wall Mounted Dashboards
- Part 14 - Motion, Occupancy, and Presence
- Part 15 - Generative AI and Notifications
- Part 16 - Seasonal Automation's (this post)
In the 2024.4 release of Home Assistant, the Labels feature was introduced. This feature allows you to add labels to entities, areas, and automations. This is a great feature for organisation as you can apply as many as you want and then perform actions based on those labels.
Previously, I’d tackled this style of organisation (and the organisation that Categories introduced) by putting keywords into the names of my automations, and while this worked, it wasn’t as clean as I would have liked.
One of the things I setup with this is adding season labels, Spring, Summer, Autumn, and Winter, and putting them on automations that are only relevant for that season. While this helps with the visual organisation, there’s also the benefit of automating automations based on the season. For example, we have motorised blinds in our house, and in summer, if the temperature of the room exceeds the desired threshold, we’ll automatically close them, but in winter, we’ll leave them open as a) it’s unlikely they’ll exceed the threshold and b) we want the sun to help heat the room.
Automating Based on Season
Firstly, we need to know what season it is, and we can do that using the Seasons integration. This integration will create a sensor that will tell you what season it is based on the date. With the integration setup, we can access sensor.season
and trigger automations based on value change.
|
|
I’m going to use the choose
action to determine what season it is and then trigger the relevant steps:
|
|
In the sequence
block, we’re going to run automation.turn_off
and automation.turn_on
actions to turn on and off the relevant automations.
|
|
Notice that we pass in the label_id
of the labels we want to turn off and on. This is a list, so you can pass in as many as you want, and it means that we can have automations that are relevant for multiple seasons.
Repeat this for all four seasons then with our automations labeled appropriately, we can have the house adapt to the season automatically.
Conclusion
This is a crazy simply solution to something that I was previously doing manually, either by having a whole heap of conditions within automations to handle the concept of seasonality, or by manually turning on and off automations (which of course I’d forget to do). This is a great example of how a simple feature can have a big impact on the usability of Home Assistant.
The automation.turn_off
and automation.turn_on
actions with labels as the target is a powerful feature that I use for other use-cases, such as disabling certain automations overnight (mostly motion sensors) or toggling automations for when we have house sitters (which you can read more about in Part 11 of this series).
If you haven’t tried Labels yet, I highly recommend you do, as it’s a great way to organise your Home Assistant setup, and a nifty way to automate your automations.