Update MOES ZSS-QY-HP Presence Light Blueprint

2026-08-20 16:56:33 +02:00
parent 2549110eea
commit d79423c0a4

@@ -1,107 +1,295 @@
# MOES ZSS-QY-HP Presence Light Blueprint # MOES ZSS-QY-HP Presence Light
## Overview ## Overview
This Home Assistant Blueprint is designed for the **MOES ZSS-QY-HP** mmWave Human Presence Sensor (and compatible occupancy sensors). 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: The blueprint automatically controls one or more lights based on human presence and ambient light level.
- Human presence detection 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.
- Ambient light level (lux)
- Adjustable off delay
- Optional time restrictions
The goal is to create reliable and responsive lighting that only turns on when it is actually needed.
## Features ## Features
- Supports the MOES ZSS-QY-HP mmWave Presence Sensor - 👤 Detects human presence using an occupancy sensor
- Works with any binary_sensor using the occupancy device class - 💡 Automatically turns lights on when presence is detected
- Uses a separate illuminance sensor - ☀️ Uses an illuminance/lux sensor to determine whether lighting is needed
- Configurable lux threshold - 🔆 Configurable light brightness
- Adjustable brightness - 🌊 Configurable transition time
- Smooth fade in/out using transition time - ⏱️ Configurable delay before turning lights off
- Adjustable delay before turning lights off - 🕐 Optional time restriction
- Optional time schedule - 💡 Supports one or multiple lights
- Supports multiple lights - ⚙️ Fully configurable through the Home Assistant Blueprint UI
## How it Works ## How it Works
### Light ON
The light turns on when all of the following conditions are true: The automation uses human presence together with the current illuminance level.
- Presence is detected Presence detected
- Illuminance is below the configured lux threshold │
- (Optional) Current time is inside the configured time window ▼
Lux below limit?
│ │
YES NO
│ │
▼ ▼
LIGHT ON No action
│
│
Presence cleared
│
▼
Wait configured
off-delay
│
▼
LIGHT OFF
### Light OFF ## Presence Detection
The light turns off when: When the selected presence sensor changes to `ON`, the blueprint checks whether the current illuminance is below the configured lux limit.
- Presence is no longer detected If the lux level is low enough, the selected lights are turned on.
- The configured off-delay has expired
### 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 ## Blueprint Inputs
| Input | Description | | Input | Description | Default |
| --- | --- | |---|---|---|
| Presence Sensor | Occupancy sensor (binary_sensor)l | | Presence sensor | Occupancy sensor used for presence detection | — |
| Illuminance Sensor | Lux sensor | | Illuminance sensor | Sensor providing the current lux level | — |
| Lights | One or more lights to control | | Light(s) | Light entities controlled by the blueprint | — |
| Maximum Lux | Maximum lux before lights will turn on | | Maximum lux | Maximum lux level at which lights may turn on | 500 lx |
| Brightness | Set light brightness (%) | | Brightness | Light brightness when activated | 50% |
| Transition | Fade time when turning lights on/off | | Transition | Fade time when switching lights | 0 s |
| Off Delay | Time to wait after occupancy is cleared | | Off delay | Time presence must be cleared before lights turn off | 30 s |
| Enable Time Restriction | Enable or disable time schedule | | Enable time restriction | Restrict activation to a specific time period | Disabled |
| Start Time | Earliest time automation is allowed | | Start time | Beginning of the allowed activation period | 00:00 |
| End Time | Latest time automation is allowed | | End time | End of the allowed activation period | 23:59 |
## Recommended Settings
## Example A typical hallway or entrance configuration could be:
### Bathroom Maximum lux: 500 lx
Presence detected → Lux < 100 lx ? → Yes → Turn light ON → Occupancy cleared → Wait 30 seconds → Turn light OFF Brightness: 50%
Transition: 2 s
Off delay: 30 s
## Compatible Sensors Time restriction: Disabled
The blueprint is designed for the **MOES ZSS-QY-HP**, but should also work with any occupancy sensor exposing: For a bedroom or bathroom where lighting should only activate during specific hours:
- binary_sensor Maximum lux: 300 lx
- device_class: occupancy Brightness: 30%
Transition: 2 s
Off delay: 60 s
Examples include: Time restriction: Enabled
Start time: 06:00
End time: 23:00
- MOES ZSS-QY-HP ## Example: Typical Operation
- Aqara FP1
- Aqara FP2 (via Home Assistant) Assuming:
- Tuya mmWave Presence Sensors
- Other Zigbee2MQTT occupancy sensors 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 ## Requirements
- Home Assistant - Home Assistant
- A supported occupancy sensor - MOES ZSS-QY-HP or another compatible occupancy sensor
- An illuminance sensor - An illuminance/lux sensor
- One or more light entities - One or more Home Assistant light entities
The presence sensor must expose:
binary_sensor
device_class: occupancy
## Installation ## Installation
1. Download the blueprint YAML file. 1. Download the Blueprint YAML file.
2. Open Home Assistant. 2. Open **Home Assistant**.
3. Navigate to: 3. Go to:
Settings Settings → Automations & Scenes → Blueprints
→ Automations & Scenes
→ Blueprints
→ Import Blueprint
4. Import the YAML file. 4. Import the Blueprint.
5. Create a new automation from the blueprint. 5. Create a new automation from the Blueprint.
6. Select your sensors and lights. 6. Select the presence sensor, illuminance sensor and lights.
7. Configure the desired values.
## ⬇ Download Blueprint ## Notes
[**Download MOES Presence Blueprint**](../src/branch/main/Blueprints/moes_presence_light.yaml) The blueprint uses the occupancy state of the selected sensor rather than traditional motion detection.
## License 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.
This blueprint is provided as-is and may be freely modified and shared under the MIT License. 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