The first Sunday of Advent has arrived. Somewhere in Scandinavia, someone has already unpacked 47 metres of outdoor lighting, three smart plugs, and a suspiciously large box labelled “Christmas – definitely tested last year”. The rest of us are just trying to find the advent star.
Advent is a wonderful time of year. The days are short, the weather is doing its best impression of a wet sock, and suddenly every window in the neighbourhood glows with warm, welcoming light.
It is also the perfect opportunity to give your Home Assistant installation a seasonal upgrade.
No, we are not talking about an AI-powered elf that monitors your biscuit consumption. We are talking about something much more useful: an advent lighting setup that turns on when it gets dark, follows a sensible schedule, and does not require you to become a full-time Christmas light operator.
The best part? You can build it with the lights and smart plugs you probably already own.
And if you are reading this while your Christmas decorations are still in the attic, relax. Advent is a season, not a competitive sport.
First, let’s agree on what Advent mode actually means
For this article, Advent mode is a simple collection of lighting rules designed for the weeks leading up to Christmas.
Think of it as a seasonal profile for your home.
During the day, your advent star might remain switched off. When the sun sets, the window lights turn on automatically. Later in the evening, everything switches off to save energy and avoid illuminating the neighbourhood long after everyone has gone to bed.
You could achieve this with a handful of separate automations. However, putting the logic into one automation makes it easier to understand and maintain.
Our example will use:
- A smart plug controlling an advent star or window decoration.
- A smart plug controlling additional seasonal lighting.
- Home Assistant’s sun integration to determine when the sun sets.
- A time-based shut-off to prevent lights from running all night.
- A manual override for those evenings when you want the house to look particularly cosy.
The entity IDs below are examples. Replace them with the actual entities in your Home Assistant installation.
We will also assume that the smart plugs can be controlled locally. Cloud-connected plugs can work too, but local control means fewer things can go wrong when your internet connection decides to take an unscheduled Christmas break.
1. Give your advent lights a proper home
Before writing any YAML, identify the devices you want to include.
For example:
| Decoration | Example entity | Purpose |
|---|---|---|
| Advent star | switch.advent_star | Main window decoration |
| Window lights | switch.window_lights | Additional seasonal lighting |
| Advent mode | input_boolean.advent_mode | Master on/off control |
You can create the helper through Settings → Devices & services → Helpers in Home Assistant.
Choose a toggle helper and name it Advent mode. Its entity ID will typically be input_boolean.advent_mode, although you should verify the ID created by your installation.
This helper is important because it separates the seasonal schedule from the actual devices.
When Advent mode is enabled, the automation may control the lights according to its schedule. When it is disabled, the automation should leave them alone.
That is useful in January, when you have finally located the box labelled “Christmas decorations” and are trying to persuade everything to return to normal.
2. Turn on the lights when the sun goes down
Let’s start with the main automation.
We want the advent lights to switch on at sunset, but only when Advent mode is enabled.
Here is a complete example:
alias: "Advent - Turn on seasonal lights"
description: "Turn on advent decorations at sunset"
triggers:
- trigger: sun
event: sunset
conditions:
- condition: state
entity_id: input_boolean.advent_mode
state: "on"
actions:
- action: switch.turn_on
target:
entity_id:
- switch.advent_star
- switch.window_lights
mode: single
This automation uses Home Assistant’s built-in sun trigger. It does not need a fixed sunset time, and it automatically adapts as the days become shorter or longer.
The condition ensures that the lights are switched on only when Advent mode is active.
There is one detail worth understanding: the automation evaluates the helper when sunset occurs. If you enable Advent mode later that evening, the sunset trigger will not fire again. We will address that with a manual control and a sensible daily schedule.
You can read more about the sun integration in the official Home Assistant documentation.
3. Make sure the lights do not stay on all night
An advent star glowing in the window at 02:47 might be atmospheric, but it is not necessarily useful.
Let’s add a second automation that switches the decorations off at a fixed time.
For this example, we will use 23:00. Adjust it to suit your household.
alias: "Advent - Turn off seasonal lights"
description: "Switch off advent decorations at night"
triggers:
- trigger: time
at: "23:00:00"
conditions: []
actions:
- action: switch.turn_off
target:
entity_id:
- switch.advent_star
- switch.window_lights
mode: single
Notice that this automation does not check whether Advent mode is enabled.
That is deliberate. If the decorations are on at 23:00, we want them switched off regardless of how they were activated.
This is also a good example of a small automation that does one thing and does it reliably.
4. What if you want the lights on earlier?
Sunset is a convenient trigger, but it is not always the best fit for every decoration.
Perhaps you work from home and want the advent star on during a dark afternoon. Or perhaps you prefer to switch on the lights before guests arrive.
You can always operate the switches manually through a dashboard, but we can also create a more flexible daily routine.
For example, you could add a morning shut-off at 08:30:
alias: "Advent - Morning shut-off"
description: "Switch off advent lights in the morning"
triggers:
- trigger: time
at: "08:30:00"
conditions: []
actions:
- action: switch.turn_off
target:
entity_id:
- switch.advent_star
- switch.window_lights
mode: single
This prevents the decorations from remaining on after daylight arrives.
If you have different schedules for weekdays and weekends, you can add a weekday condition or create a separate schedule helper. I would start with the simplest possible setup and only add complexity when you discover that you actually need it.
Home automation has a habit of turning a five-minute project into a three-hour discussion about the philosophical meaning of a Boolean helper.
5. Add a little advent magic with scenes
So far, we have only switched devices on and off. That is useful, but Advent is also about atmosphere.
If you have dimmable lights, RGB bulbs, or WLED devices, you can create an advent scene with warm, gentle lighting in your living room.
For example, a scene might:
- Set the living room lights to a warm white.
- Dim the main lighting.
- Switch on the advent star.
- Activate a restrained WLED effect in the window.
- Leave task lighting in the kitchen unchanged.
Create the scene through Settings → Automations & scenes → Scenes, using the entities available in your home.
Then you can activate it with a small automation:
alias: "Advent - Evening ambience"
description: "Activate the advent lighting scene"
triggers:
- trigger: sun
event: sunset
conditions:
- condition: state
entity_id: input_boolean.advent_mode
state: "on"
actions:
- action: scene.turn_on
target:
entity_id: scene.advent_evening
mode: single
Replace scene.advent_evening with the entity ID of your own scene.
If the scene already controls the advent star and window lights, you do not need the separate sunset automation from section two. Choose one approach rather than running both unnecessarily.
The goal is a coherent lighting experience, not a small electrical orchestra in which every device has its own conductor.
6. Build a tiny Advent dashboard
A seasonal dashboard does not need to be complicated.
You could add a simple tile for the helper and the two switches:
type: vertical-stack
cards:
- type: tile
entity: input_boolean.advent_mode
name: Advent mode
icon: mdi:calendar-star
- type: tile
entity: switch.advent_star
name: Advent star
icon: mdi:star-four-points
- type: tile
entity: switch.window_lights
name: Window lights
icon: mdi:string-lights
Add this to a dashboard using the manual YAML card editor, or build the equivalent cards through the visual editor.
Now you have a single place to enable or disable Advent mode and control the decorations individually.
You can also add a button to activate your evening scene.
The important detail is that manual control remains available. An automation should make life easier, not force you to negotiate with your own house when you want to switch off a light.
7. What about energy consumption?
LED advent stars and window decorations are generally inexpensive to run, but it is still interesting to measure what they actually consume.
A smart plug with energy monitoring can show the power draw in watts and accumulate consumption in kilowatt-hours (kWh).
For example, suppose your decorations consume a combined 12 W and run for six hours each day.
The daily energy consumption is:
12 W × 6 hours ÷ 1,000 = 0.072 kWh per day.
Over 24 days, that is approximately 1.73 kWh.
At an illustrative electricity cost of 1.50 NOK/kWh, the energy cost would be about 2.59 NOK, excluding any fixed charges or other tariff components not included in that price.
In other words, the advent star is probably not responsible for your household’s financial difficulties.
Of course, a large collection of outdoor lights, inflatable decorations, and other seasonal equipment can consume considerably more. Measuring actual consumption is more useful than guessing based on the number of decorations.
If you already use Home Assistant’s energy dashboard or a compatible energy-monitoring integration, you can incorporate the measured consumption into your existing setup.
8. A few things worth checking before December gets busy
Before enabling your Advent automations, take a moment to check the basics.
Test every smart plug. A decoration that worked last December may not reconnect correctly after months in storage.
Check the default state after a power cut. Some smart plugs restore their previous state, while others may remain off. Behaviour depends on the device and its configuration.
Keep electrical safety boring. Outdoor equipment must be rated for outdoor use, and plugs, cables and extensions should be suitable for their environment. Do not overload sockets or daisy-chain extension leads beyond their ratings.
Avoid unnecessary cloud dependencies. If your advent lights use locally controlled Zigbee or Z-Wave plugs, the basic schedule can continue working during an internet outage as long as Home Assistant, the coordinator and the local network remain operational.
Remember the manual switch. If Home Assistant restarts or an automation fails, you should still have a straightforward way to control your lights.
And finally, document the setup. A short note explaining which helper enables the seasonal automations can save you from wondering what you built when you unpack the decorations next year.
Final thoughts: Let the house do the remembering
The best Advent automation is not the most complicated one. It is the one that quietly turns on the right lights, switches them off at a sensible time, and lets you enjoy the season without thinking about it.
Start with one advent star and a smart plug. Add a sunset trigger, a shut-off schedule, and a simple dashboard control. If that works well, expand the setup to more decorations or a seasonal lighting scene.
You can always add more sophistication later.
And if you have not unpacked a single decoration yet, that is perfectly fine too. Your Home Assistant installation will not judge you.
At least, not until you start creating 27 automations for a single advent star.
Happy Advent!
Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.
