6
MOES ZSS-QY-HP Presence Light Blueprint
Kasper edited this page 2026-08-21 15:37:27 +02:00

MOES ZSS-QY-HP Presence Light

Overview

This Home Assistant Blueprint is designed for the MOES ZSS-QY-HP mmWave Human Presence Sensor.

The blueprint automatically controls one or more lights based on human presence and ambient light level.

The main purpose is to provide automatic lighting that only turns on when someone is present and the surrounding light level is below a configurable threshold.

Features

  • 👤 Detects human presence using an occupancy sensor
  • 💡 Automatically turns lights on when presence is detected
  • ☀️ Uses an illuminance/lux sensor to determine whether lighting is needed
  • 🔆 Configurable light brightness
  • 🌊 Configurable transition time
  • ⏱️ Configurable delay before turning lights off
  • 🕐 Optional time restriction
  • 💡 Supports one or multiple lights
  • ⚙️ Fully configurable through the Home Assistant Blueprint UI

How it Works

The automation uses human presence together with the current illuminance level.

Presence detected
       │
       ▼
Lux below limit?
   │         │
  YES        NO
   │          │
   ▼          ▼
LIGHT ON    No action
   │
   │
Presence cleared
   │
   ▼
Wait configured
  off-delay
   │
   ▼
LIGHT OFF

Presence Detection

When the selected presence sensor changes to ON, the blueprint checks whether the current illuminance is below the configured lux limit.

If the lux level is low enough, the selected lights are turned on.

Example

Presence: ON
Lux: 120 lx
Lux limit: 500 lx

→ Lights ON

If the lux level is above the configured limit, the lights are not turned on.

Presence: ON
Lux: 750 lx
Lux limit: 500 lx

→ No action

Illuminance / Lux

The blueprint uses a separate illuminance sensor to determine whether additional lighting is required.

The configured Maximum lux value determines when the lights are allowed to turn on.

For example:

Maximum lux: 500 lx

The lights will only turn on when:

Current lux < 500 lx

This prevents the lights from turning on during daylight or when there is already sufficient ambient light.

Brightness

The brightness of the lights can be configured from 1% to 100%.

Example:

Brightness: 50%

When presence is detected and the lux level is below the limit, the lights will be turned on at 50% brightness.

Transition

The blueprint supports a configurable transition time when turning the lights on or off.

Example:

Transition: 3 seconds

This causes the light to fade rather than changing instantly.

Set the transition to:

0 seconds

for immediate switching.

Off Delay

When occupancy is cleared, the blueprint waits for the configured Off Delay before switching the lights off.

Example:

Off Delay: 30 seconds

The sequence becomes:

Presence detected
        │
        ▼
     Lights ON
        │
        ▼
Presence cleared
        │
        ▼
    Wait 30 sec
        │
        ▼
     Lights OFF

Time Restriction

The blueprint can optionally restrict when the lights are allowed to turn on.

When Begræns til tidspunkt? is disabled, the automation can turn the lights on at any time, provided the presence and lux conditions are met.

When enabled, the lights will only turn on between the configured start and end time.

Example

Enable time restriction: ON
Start time: 06:00
End time: 23:00

Presence detected at:

22:00 → Lights may turn on

Presence detected at:

02:00 → Lights will not turn on

The off action is not restricted by this time window.

Blueprint Inputs

Input Description Default
Presence sensor Occupancy sensor used for presence detection —
Illuminance sensor Sensor providing the current lux level —
Light(s) Light entities controlled by the blueprint —
Maximum lux Maximum lux level at which lights may turn on 500 lx
Brightness Light brightness when activated 50%
Transition Fade time when switching lights 0 s
Off delay Time presence must be cleared before lights turn off 30 s
Enable time restriction Restrict activation to a specific time period Disabled
Start time Beginning of the allowed activation period 00:00
End time End of the allowed activation period 23:59

A typical hallway or entrance configuration could be:

Maximum lux:       500 lx
Brightness:         50%
Transition:           2 s
Off delay:           30 s

Time restriction:   Disabled

For a bedroom or bathroom where lighting should only activate during specific hours:

Maximum lux:       300 lx
Brightness:         30%
Transition:           2 s
Off delay:           60 s

Time restriction:   Enabled
Start time:        06:00
End time:          23:00

Example: Typical Operation

Assuming:

Maximum lux: 500 lx
Brightness: 50%
Off delay: 30 seconds

Daytime

Presence detected
        │
        ▼
   Lux = 850 lx
        │
        ▼
   Above 500 lx
        │
        ▼
     No action

Evening

Presence detected
        │
        ▼
   Lux = 150 lx
        │
        ▼
   Below 500 lx
        │
        ▼
  Lights ON at 50%

Person leaves

Presence OFF
        │
        ▼
  Wait 30 seconds
        │
        ▼
     Lights OFF

Requirements

  • Home Assistant
  • MOES ZSS-QY-HP or another compatible occupancy sensor
  • An illuminance/lux sensor
  • One or more Home Assistant light entities

The presence sensor must expose:

binary_sensor
device_class: occupancy

Installation

The easiest way to install this Blueprint is to use the Import Blueprint button below.

Automatic Installation

  1. Click Import Blueprint below.

  2. Home Assistant will open the Blueprint import page.

  3. Select Import Blueprint.

  4. Once imported, the Blueprint will be available under:

    Settings → Automations & Scenes → Blueprints
    
  5. Create a new automation from the Blueprint.

  6. Select your MOES ZSS-QY-HP presence sensor.

  7. Select the illuminance/lux sensor.

  8. Select the light(s) you want to control.

  9. Configure the desired lux threshold, brightness, transition and off-delay.

  10. Save the automation.

Import Blueprint

Manual Installation

If the automatic import does not work, the Blueprint can also be installed manually.

  1. Open the Blueprint YAML file in the repository.

  2. Copy the complete YAML content.

  3. In Home Assistant, go to:

    Settings → Automations & Scenes → Blueprints
    
  4. Select Import Blueprint.

  5. Paste the following raw YAML URL:

    https://gitea.kskovmose.dk/Kasper/HAOS/raw/branch/main/Blueprints/moes_presence_light.yaml
    
  6. Confirm the import.

  7. Create a new automation from the Blueprint.

  8. Configure the presence sensor, illuminance sensor and lights.

Notes

The blueprint uses the occupancy state of the selected sensor rather than traditional motion detection.

This makes it particularly suitable for mmWave presence sensors such as the MOES ZSS-QY-HP, which can continue reporting occupancy while a person remains relatively still.

The lux check is performed when presence is detected. Once the lights have been activated, clearing the occupancy state will turn the lights off after the configured delay.

Limitations

The current version does not:

  • Re-check lux continuously while presence remains active
  • Change brightness based on lux
  • Use different brightness levels depending on time of day
  • Restore the previous light state
  • Provide separate settings for different lights
  • Use sun elevation as an additional condition

Changelog

v1.0

  • Initial release
  • MOES ZSS-QY-HP occupancy support
  • Lux-based light activation
  • Configurable brightness
  • Configurable transition
  • Configurable off delay
  • Optional time restriction
  • Support for multiple lights