Presence Simulation While on Vacation with the Senvolon Presence Sensor KL MZ and Home Assistant

Presence Simulation While on Vacation with the Senvolon Presence Sensor KL MZ and Home Assistant

Three weeks of vacation, and the house gives it away to anyone who drives by twice: no light in the evening, no movement behind the windows, the same picture every day. Burglars look for exactly that. The vacation months have been among the periods with an elevated burglary risk for years, and a permanently dark house is one of the clearest signals of absence.

The classic answer is a timer switch from the hardware store. Its problem: it is predictable. A light that comes on at exactly 7:00 PM every evening does not look like an occupied house, it looks like a timer. Add to that the changing length of days. In August especially, sunset shifts earlier by about two minutes per day. A timer that was set correctly on departure day is off by about 40 minutes after three weeks. The house then sits dark for a long stretch every evening before the light comes on at the exact same minute as always. Anyone watching a property over several days spots the pattern immediately.

A believable simulation has to react to actual brightness instead of the clock, and it must never repeat exactly. Both are possible with the presence sensor KL MZ and Home Assistant. The sensor takes on a dual role here: its brightness sensor provides a realistic start time for the evening lights, while its radar stays armed as part of the alarm system. If you already set up the alarm system from our first how-to, both systems mesh directly. The simulation also works without an alarm system, though.

Requirements

  • Presence sensor KL MZ, connected to Home Assistant via MQTT. Our quick start guide Integrating the presence sensor into Home Assistant shows the MQTT broker and sensor setup step by step.
  • Home Assistant (version 2024.10 or newer).
  • At least two switchable lights in different rooms, for example living room and bedroom. Dimming capability helps but is not required.
  • A notification service for the alarm case (only with an alarm system). These instructions use Signal (notify.signal); with the Home Assistant Companion App, notify.mobile_app_[device_name] works instead.
  • Optional: the alarm system from the first how-to, using the Manual Alarm Control Panel (alarm_control_panel.alarmanlage).

Note: These instructions use the entity IDs that MQTT Discovery creates for the sensor (multi_zone_presence_sensor_...). Check your actual IDs under Developer Tools → States and adjust the examples if needed.

Which Path Fits You?

The simulation needs a switch that starts and stops it. Depending on whether you run an alarm system, there are three paths for this. Pick yours, and you will know which steps apply to you.

Without an alarm system: the switch is a helper named Urlaubsmodus. Work through step 1, skip step 2, and continue with step 3. Step 6 is also skipped.

With an alarm system, controlled through the helper: the helper stays the switch and also arms the alarm system. Work through all steps from 1 to 7 in order. This is the path the main part of these instructions describes.

With an alarm system, controlled via the built-in vacation mode: the Alarm Control Panel comes with its own vacation arming mode that replaces the helper. A single tap arms the system and starts the simulation at the same time. Skip steps 1 and 2, build steps 3 through 7, and then make the adjustments from the section "Variant: Controlling the Simulation via the Built-in Vacation Mode".

Step 1: Create the Urlaubsmodus Helper

Urlaubsmodus is the central switch that all the following automations hang on. Created as a helper, it can be toggled from the dashboard, by voice assistant, or from the app while you are away.

Go to Settings → Devices & Services → Helpers → Create Helper → Toggle and create a helper named Urlaubsmodus. Home Assistant creates the entity input_boolean.urlaubsmodus from it.

Why a separate helper when there is already the alarm system? Because the two states answer different questions. The alarm system is also armed when you are just out grocery shopping. Urlaubsmodus says: the house will stay empty for several days, so the simulation should run as well.

Step 2 (Only with an Alarm System): Urlaubsmodus Arms the Alarm System

This step requires the alarm system from the first how-to. Without an alarm system, skip it and continue with step 3; Urlaubsmodus from step 1 then controls the simulation on its own.

The first automation connects both systems. As soon as you turn on Urlaubsmodus, the alarm system arms and you get a confirmation on your phone. That way, you leave the house with a single switch.

Go to Settings → Automations → Create Automation → Start with the Editor and paste the following YAML code:

Note: All automations in this article use the note: field, which lets you comment directly on triggers, conditions, and actions. The notes also show up in the visual editor at the relevant step and mark, among other things, the places where you need to insert your own entity IDs. If your Home Assistant version does not know this field yet, simply delete the note: lines; the automations' function does not change as a result.

alias: "Vacation: Mode Arms Alarm System"
description: >
  Arms the alarm system as soon as Urlaubsmodus is turned on,
  and confirms the activation with a message.

triggers:
  - trigger: state
    entity_id: input_boolean.urlaubsmodus
    to: "on"
    note: "Reacts to the helper from step 1."

actions:
  - action: alarm_control_panel.alarm_arm_away
    target:
      entity_id: alarm_control_panel.alarmanlage
    data:
      code: "YOUR_CODE"
    note: >-
      Adjust the entity ID and PIN to your own alarm system. If
      code_arm_required is disabled, the code line is not needed.
  - action: notify.signal
    data:
      message: >-
        Urlaubsmodus active. The alarm system is being armed, the
        presence simulation takes over from now on.
    note: >-
      Replace notify.signal with your own notification service,
      for example notify.mobile_app_[device_name].

mode: single

Important: Replace YOUR_CODE with your alarm PIN and keep the quotation marks, otherwise codes with a leading zero lose a digit. If the placeholder is accidentally left in place, the Alarm Control Panel silently rejects the arm command: the automation runs, but the system stays disarmed. In that case, the automation's trace (three dots → Trace) shows the rejected step.

Disarming stays manual on purpose. An automation that disarms the system when Urlaubsmodus is turned off would be convenient, but it would mean that a single switch without a PIN undoes the entire security. When you get back, disarm as usual through the alarm panel with your code, and then turn Urlaubsmodus off.

Step 3: Evening Light Based on Real Brightness Instead of the Clock

Now comes the part that sets the simulation apart from a timer. The living room light comes on when the room actually gets dark, as measured by the KL MZ's brightness sensor. On a rainy day, that is earlier; on a clear summer evening, later. That is exactly how an occupied house would behave. The shortening days are covered too: the switch-on time automatically shifts earlier over the course of the vacation as dusk sets in sooner, without anyone having to adjust it.

So that the exact time is not predictable either, the automation waits a random span of up to 20 minutes after the threshold is crossed. Two evenings in a row therefore never look the same.

Preparation: Create the Lux Threshold Helper

The automation needs a brightness threshold below which the light should start. Create it as a number helper, so you can adjust the value later from the dashboard without touching the automation.

Note: If you have already implemented the smart lighting control from our how-to: the two thresholds there stay untouched, and the simulation deliberately does not reuse them. They answer a different question, namely whether light is needed in the room to see. The simulation threshold, by contrast, describes the point at which the house looks dark from the outside, and is therefore set lower. Kept separate, both systems can be adjusted independently of each other.

Go to Settings → Devices & Services → Helpers → Create Helper → Number and create the helper with these values:

  • Name: Lux Schwelle Simulation
  • Minimum: 0, Maximum: 500
  • Step size: 10
  • Unit: lx
  • Initial value: 100

Home Assistant creates the entity input_number.lux_schwelle_simulation from this, which the following automation refers to.

The Automation

alias: "Vacation: Turn On Evening Light When Dark"
description: >
  Turns on the living room light when the KL MZ's brightness sensor
  drops below the threshold. A random delay of up to
  20 minutes makes sure the exact time varies every evening.

triggers:
  - trigger: numeric_state
    entity_id: sensor.multi_zone_presence_sensor_brightness
    below: input_number.lux_schwelle_simulation
    for:
      minutes: 5
    note: >-
      Brightness sensor of the KL MZ, adjust the entity ID if needed.
      The threshold comes from the helper created in the preparation step.
  - trigger: time
    at: "16:00:00"
    note: "Catches days when it was already dark before 4 PM."

conditions:
  - condition: numeric_state
    entity_id: sensor.multi_zone_presence_sensor_brightness
    below: input_number.lux_schwelle_simulation
    note: "Makes sure it is actually dark, for the time trigger."
  - condition: state
    entity_id: input_boolean.urlaubsmodus
    state: "on"
    note: "Only runs while Urlaubsmodus is on."
  - condition: time
    after: "16:00:00"
    before: "23:30:00"
    note: "Prevents false starts on dark mornings and after midnight."
  - condition: state
    entity_id: light.wohnzimmer
    state: "off"
    note: >-
      Insert your own entity ID for the living room light, here and
      in the actions.

actions:
  - delay:
      seconds: "{{ range(0, 1201) | random }}"
    note: "Random delay of 0 to 20 minutes."
  - action: light.turn_on
    target:
      entity_id: light.wohnzimmer
    data:
      brightness_pct: 70

mode: single

Three details in this automation are not a coincidence:

The time condition (after: "16:00:00") prevents the simulation from triggering on a dark winter morning or during a thunderstorm at noon. It does not set the switch-on time, only the window in which the lux value counts at all. The second trigger at 4 PM catches days when the threshold was already crossed earlier, for example during heavy rain or with closed shutters; the lux condition makes sure it only fires when it is actually dark.

The for: 5 minutes on the trigger filters out brief brightness dips, such as a thick cloud passing by.

The random delay lives in the actions, not in the trigger. Home Assistant re-evaluates random() every time it is used. In a condition, the dice roll would come out differently on every check and make the logic unpredictable. As a wait time in the action sequence, it does exactly what it should: roll once, then wait.

Step 4: Evening Routine with a Room Change

An occupied house does not just switch the lights off in the evening. It moves: the living room goes dark, the bedroom light comes on instead, and a while later it is lights-out. The second automation mimics this sequence, again with random time windows.

alias: "Vacation: Move to Bedroom and Lights-Out"
description: >
  Simulates the move from the living room to the bedroom starting around
  10:15 PM. Start time, overlap, and duration vary every evening.

triggers:
  - trigger: time
    at: "22:15:00"
    note: "Earliest possible time for the room change."

conditions:
  - condition: state
    entity_id: input_boolean.urlaubsmodus
    state: "on"
  - condition: state
    entity_id: light.wohnzimmer
    state: "on"
    note: "Only if the evening light from step 3 is on."

actions:
  - delay:
      seconds: "{{ range(0, 2701) | random }}"
    note: "Starts sometime between 10:15 and 11:00 PM."
  - action: light.turn_on
    target:
      entity_id: light.deckenlampe_schlafzimmer
    data:
      brightness_pct: 60
    note: "Insert your own entity ID for the bedroom light."
  - delay:
      seconds: "{{ range(120, 301) | random }}"
    note: "Both lights stay on for 2 to 5 minutes, like an actual move between rooms."
  - action: light.turn_off
    target:
      entity_id: light.wohnzimmer
  - delay:
      seconds: "{{ range(900, 2101) | random }}"
    note: "15 to 35 minutes of light in the bedroom, then lights-out."
  - action: light.turn_off
    target:
      entity_id: light.deckenlampe_schlafzimmer

mode: single

The condition on the living room light being on chains both automations together: the room change only happens if the evening lighting is actually running. On a bright summer evening, when no light was needed yet at 10:15 PM, the routine kicks in later via the lux trigger and the room change is skipped for that day. That, too, is variance.

Step 5: Safety Net for the Night

The long wait times in step 4 have a quirk: if Home Assistant restarts while a delay is running, for example after a power outage or an update, the rest of the action sequence is discarded. In the worst case, the bedroom light would stay on all night, which a careful observer would notice just as easily as a dark house.

A small cleanup automation catches this case:

alias: "Vacation: Safety Net Lights Off"
description: >
  Turns off all simulation lights at 12:45 AM in case an
  interrupted sequence left them on.

triggers:
  - trigger: time
    at: "00:45:00"
    note: "Deliberately set after the latest possible end of the evening routine."

conditions:
  - condition: state
    entity_id: input_boolean.urlaubsmodus
    state: "on"

actions:
  - action: light.turn_off
    target:
      entity_id:
        - light.wohnzimmer
        - light.deckenlampe_schlafzimmer
    note: "List all lights used by the simulation here."

mode: single

Step 6 (Only with an Alarm System): Check the Alarm Notification

We deliberately do not build the push notification for a triggered alarm again here: it is already part of the alarm system from the first how-to (step 7 there) and works unchanged while on vacation, since the system does not distinguish between you being out grocery shopping or away for three weeks. Before you leave, test the complete path once: arm the system, enter the detection area, receive the message on your phone. If you skipped the notification setup back then, do it now, because on vacation it is the only channel through which you learn about an alarm.

This is where it becomes clear why the radar and the light simulation do not interfere with each other: the KL MZ detects people through the reflection of radar waves off movement, down to breathing. A lamp switching on and off produces no such reflection. So the simulation can switch freely while the radar in the same room stays armed. The system only triggers once someone is actually present in the detection area.

Step 7: Dashboard Card

A compact card bundles everything you want to see before departure and from your vacation: the mode switch, the state of the alarm system, and the simulation lights. Add it to your dashboard via Add Card → Manual:

type: entities
title: Urlaubsmodus
entities:
  - entity: input_boolean.urlaubsmodus
    name: Urlaubsmodus
  - entity: alarm_control_panel.alarmanlage
    name: Alarm System
  - entity: binary_sensor.multi_zone_presence_sensor_presence
    name: Living Room Presence
  - entity: sensor.multi_zone_presence_sensor_brightness
    name: Living Room Brightness
  - entity: input_number.lux_schwelle_simulation
    name: Lux Threshold Simulation
  - entity: light.wohnzimmer
    name: Living Room Light
  - entity: light.deckenlampe_schlafzimmer
    name: Bedroom Light

To see this card from the beach too, you need remote access to Home Assistant, for example through Home Assistant Cloud or your own secured reverse proxy. If you have not set that up yet, do it before you leave. An Urlaubsmodus you can only operate from home loses half its value.

Variant: Controlling the Simulation via the Built-in Vacation Mode

In addition to "Away," the Manual Alarm Control Panel comes with its own vacation arming mode: armed_vacation, accessible via the airplane icon on the alarm card. If you run the alarm system from the first how-to, you can do without the helper and the arming automation from steps 1 and 2. Tapping the airplane arms the system and starts the simulation in one step; disarming with the PIN ends both. The system's state is then the single source of truth, and the helper and the alarm can no longer drift out of sync.

Three adjustments are needed for this.

1. Swap the condition in the simulation automations. Open the three automations "Vacation: Turn On Evening Light When Dark", "Vacation: Move to Bedroom and Lights-Out", and "Vacation: Safety Net Lights Off" (steps 3 to 5) one after another, and in each one, in the conditions: section, replace the entry with input_boolean.urlaubsmodus with this block:

- condition: state
  entity_id: alarm_control_panel.alarmanlage
  state: "armed_vacation"

This block belongs in the conditions: section, not with the triggers; all other conditions, such as the time window or light state, stay unchanged. Using the evening-light automation from step 3 as an example, the conditions section then looks like this:

conditions:
  - condition: state
    entity_id: alarm_control_panel.alarmanlage
    state: "armed_vacation"
  - condition: time
    after: "16:00:00"
    before: "23:30:00"
  - condition: state
    entity_id: light.wohnzimmer
    state: "off"

2. Extend the alarm automation to the new mode. This is the most important point of this variant: the automation "Alarm: Presence Detected" from the alarm system how-to only triggers on armed_away. Without the following extension, the system would appear armed in vacation arming mode but stay silent when presence is detected:

conditions:
  - condition: state
    entity_id: alarm_control_panel.alarmanlage
    state:
      - "armed_away"
      - "armed_vacation"

3. Adjust the dashboard. Remove the Urlaubsmodus row from the card in step 7. For the airplane icon to appear on the alarm panel card, add arm_vacation to the states list there.

Note: The confirmation message from step 2 is dropped in this variant. If you want to keep it, create a small automation that sends the message through your own notify service when the alarm system changes to armed_vacation.

Tips & Troubleshooting

Lux value arrives delayed: the brightness value is not transmitted on every change, but with the sensor's periodic status packet. The rate is set by the publish interval in its MQTT configuration (MQTT_PUBLISH_INTERVAL); the device's instructions give 300 seconds as an example. At that value, the evening light can start up to 5 minutes after the threshold is actually crossed. That is not a problem for the simulation, since the random delay spreads out the timing anyway. If you want it more responsive, check the configured interval in the sensor's web interface and reduce it if needed.

Check the sensor's Wi-Fi schedule: the KL MZ can switch its Wi-Fi off on a schedule (WIFI_ON / WIFI_OFF), for example to keep the radio quiet at night. If this feature is active, neither lux values nor presence reports reach Home Assistant during that time. For vacation operation, Wi-Fi should run continuously.

Test the simulation before it counts: turn on Urlaubsmodus as a trial on an evening when you are home, and watch how it runs. Keep in mind that the armed alarm system will then react to your own presence. For the test, you can temporarily comment out the arming in step 2, or disarm the system by hand after turning it on.

Factor in shutters: automatic shutters change the measured lux value. If they come down before it gets dark outside, the brightness in the room drops below the threshold sooner and the light starts correspondingly earlier. That is not a bug, but it should be kept in mind when setting the threshold.

More rooms, more credibility: the routine can be extended with more lights, for example the kitchen or dining room in the early evening. The pattern stays the same: random delays in the actions, mode: single, and a condition for every sequence that ties it to Urlaubsmodus. Our guide to smart lighting control shows how the same lights switch based on presence during everyday life.

Not everything can be automated: an overflowing mailbox gives away your absence more reliably than any dark window. Neighbors who empty the mailbox and maybe adjust the shutters now and then remain the best complement to any simulation.

Conclusion

From one or two helpers, three to four automations, and the presence sensor's brightness sensor, a presence simulation emerges that reacts to real light conditions and never repeats exactly the same way twice. The KL MZ does double duty here: its sensor makes the simulation believable, its radar reports the real emergency, and the siren already sits in the same housing. Everything runs locally on your Home Assistant, with no cloud service and no subscription.

If you have not set up the alarm system from the first how-to yet, a vacation is a good occasion to build both together.

👉 Order the Senvolon Presence Sensor KL MZ in the shop

If you have questions, the Senvolon support team is happy to help: support@senvolon.de

All models compared: Presence sensors