Building an Evening Mode in Home Assistant

A smart home should not only react to individual events but also adapt to routines throughout the day. One of the most useful automations I have built in Home Assistant is what I call Evening Mode.

Advertisements

Instead of managing lights, locks, cameras, and sensors separately, Evening Mode creates a coordinated transition from daytime activity to a secure and energy-efficient nighttime state.

This automation prepares the house for the evening by turning on outdoor lighting at sunset, locking the front door at a defined time, enabling outdoor surveillance, and increasing monitoring of door and window sensors during the night.

In this post, I will explain the components involved, show how the automation works, and provide YAML examples you can adapt for your own setup.

What Is Evening Mode?

Evening Mode is essentially a state-based automation routine that changes your home’s behavior as the day transitions into night.

Rather than creating multiple disconnected automations, the idea is to define a predictable sequence:

  • Outdoor lights turn on automatically at sunset
  • Exterior doors are locked at a specific time
  • Outdoor cameras switch to active monitoring
  • Door and window sensors become more sensitive
  • Indoor temperatures can be adjusted for overnight efficiency

The result is a home that quietly prepares itself for the night without requiring manual interaction.

Why Use Evening Mode?

There are several practical benefits.

Improved Security

It is easy to forget small tasks such as locking the front door or activating outdoor cameras.

By automating these actions, the house secures itself every evening.

Better Energy Efficiency

Heating and lighting can be adjusted automatically.

For example:

  • Reduce indoor heating from 22 °C to 19 °C
  • Disable unnecessary lighting
  • Reduce standby power usage

Over time, this can reduce energy consumption measured in kWh.

Simpler Daily Routine

The fewer repetitive tasks you need to remember, the more useful home automation becomes.

Evening Mode removes those small manual steps.

Advertisements

Components Used

My setup relies on several devices integrated into Home Assistant.

Smart Lock

I use an ID Lock 150 integrated through Z-Wave.

This allows Home Assistant to:

  • Check lock status
  • Lock the door automatically
  • Confirm successful locking

This is ideal for scheduled evening security checks.

Outdoor Lighting

Any smart outdoor light or relay-controlled lighting can be used.

The automation is triggered relative to sunset, making it adaptive throughout the year.

Surveillance Cameras

Outdoor cameras can be enabled automatically.

Depending on your setup, this might involve:

  • Activating motion detection
  • Enabling recording
  • Increasing notification sensitivity

Door and Window Sensors

These become especially useful at night.

If a door or window opens after Evening Mode is active, Home Assistant can send an immediate alert.

Temperature Control

If you use smart thermostats, Evening Mode can reduce heating slightly overnight.

For example:

  • Daytime: 21 °C
  • Evening: 20 °C
  • Night: 18 °C

Even a small adjustment can reduce overnight energy usage.

Creating a House Mode Helper

To make automations easier to manage, I recommend creating a central house mode helper.

This provides a clear state for your automations.

input_select:
  house_mode:
    name: House Mode
    options:
      - Day
      - Evening
      - Night
      - Away
    initial: Day

This allows all related automations to react to a shared state.

For example:

  • Sunset → switch to Evening
  • Bedtime → switch to Night
  • Leaving home → switch to Away

This approach keeps your automations clean and scalable.

Useful Evening Mode Automation Example

Here is an example automation that transitions the home into Evening Mode.

It performs multiple coordinated actions:

  • Changes the house mode
  • Turns on outdoor lights
  • Locks the front door
  • Enables camera monitoring
  • Lowers heating
automation:
  - alias: Activate Evening Mode
    trigger:
      - platform: sun
        event: sunset
        offset: "-00:15:00"

    condition:
      - condition: state
        entity_id: input_select.house_mode
        state: "Day"

    action:
      - service: input_select.select_option
        target:
          entity_id: input_select.house_mode
        data:
          option: "Evening"

      - service: light.turn_on
        target:
          entity_id: light.outdoor_lights

      - service: lock.lock
        target:
          entity_id: lock.front_door

      - service: switch.turn_on
        target:
          entity_id: switch.outdoor_camera_monitoring

      - service: climate.set_temperature
        target:
          entity_id: climate.living_room
        data:
          temperature: 20

This automation starts 15 minutes before sunset, allowing the house to transition naturally into evening.

Monitoring Doors and Windows at Night

One particularly useful extension is stricter sensor monitoring.

If a door or window opens after Evening Mode is active, Home Assistant can send an alert.

Example:

automation:
  - alias: Night Window Alert
    trigger:
      - platform: state
        entity_id:
          - binary_sensor.front_window
          - binary_sensor.back_door
        to: "on"

    condition:
      - condition: state
        entity_id: input_select.house_mode
        state: "Evening"

    action:
      - service: notify.mobile_app
        data:
          message: "A door or window was opened during Evening Mode."

This adds an extra layer of awareness without requiring a full alarm system.

Making It Smarter

You can further refine Evening Mode by adding conditions.

Examples:

Presence Detection

Only activate full security features if everyone is home.

Weather Awareness

Keep some outdoor lights off if daylight conditions are already bright enough.

Seasonal Adjustments

Heating targets can vary depending on outside temperature.

For example:

  • Winter: 20 °C
  • Spring/Autumn: 19 °C
  • Summer: disable heating adjustment

This creates a more intelligent and efficient system.

Final Thoughts

Evening Mode is a great example of how Home Assistant can move beyond simple device control and create coordinated routines.

By combining lighting, locks, cameras, sensors, and heating, your home can automatically prepare itself for the night.

The best part is that it scales easily.

You can start with something simple like outdoor lights at sunset and gradually expand to include security, monitoring, and energy-saving features.

For me, this has become one of the most useful automations in my smart home because it quietly handles the transition to nighttime every single day.

Once you build it, you will probably wonder why you did not automate it sooner.


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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.