Automation Examples
Automation Examples
Create powerful automations with Everything Presence Lite in Home Assistant.
Prerequisites
EPL added to Home Assistant and entities available (see Home Assistant Entities)
At least one light or scene controllable in Home Assistant
(Optional) Zones configured for zone-based automations
Automation Basics
Trigger: when something happens (e.g., Occupancy turns on)
Condition (optional): only at certain times or if a device is off
Action: what to do (e.g., turn on a light)
Example 1: Turn on a light when room is occupied
The simplest automation—lights on when someone enters.
Go to Settings → Automations & Scenes → Create Automation
Click Add Trigger → State
Select your EPL Occupancy entity
Set To:
on(Optional) Add a Condition → Sun → After sunset
Click Add Action → Device → Select your light → Turn on
Save the automation
Example 2: Turn off the light when room is clear
Create a new automation
Trigger: State → EPL Occupancy → To:
off→ For: 2 minutes(Optional) Condition: State → Your light → is
onAction: Turn off the same light
The EPL has an Occupancy Off Delay setting (default 15 seconds). Combined with the automation's "For" duration, this prevents false-offs when people are sitting still.
Example 3: Zone-based lighting
Trigger different lights based on which zone is occupied. This is where the EPL really shines!
Automation A - Desk zone:
Trigger: State → Zone 1 Occupancy → To:
onAction: Turn on desk lamp
Automation B - Couch zone:
Trigger: State → Zone 2 Occupancy → To:
onAction: Dim living room lights to 30%
Set up zones first using the Zone Configurator before creating zone-based automations.
Example 4: All zones clear = room empty
Only turn off lights when ALL zones are empty:
Trigger: State → EPL Occupancy → To:
off→ For: 1 minuteConditions (all must be true):
State → Zone 1 Occupancy → is
offState → Zone 2 Occupancy → is
off
Action: Turn off all room lights
This ensures lights stay on if someone moves between zones.
Example 5: Entry notification
Get notified when someone enters a specific area (useful for doorways or security):
Trigger: State → Zone 1 Occupancy → To:
on(configure Zone 1 as your entry area)Condition: Time → After 11:00 PM, Before 6:00 AM
Action: Send notification to your phone
Example 6: Target count-based actions
The EPL can count how many people are in a zone:
Turn on extra lights when multiple people present:
Trigger: Numeric state → Zone 1 Target Count → Above: 1
Action: Turn on additional lights
Trigger alarm if too many people detected:
Trigger: Numeric state → EPL Target Count → Above: 3
Action: Send alert notification
Example 7: Distance-based dimming (Advanced)
Use target distance to control brightness:
Trigger: State → Target 1 Active → To:
onAction: Call service →
light.turn_onTarget: Your light
Brightness: Template:
{{ 255 - (states('sensor.epl_target_1_distance') | float * 40) | int }}
This dims the light as you move further from the sensor.
Verify Your Automation
Walk into the room/zone and watch the automation run
Check Settings → Automations → [Your Automation] → Traces if it didn't fire
Open the Zone Configurator to see exactly where targets are detected
Troubleshooting
Symptom | Likely Cause | Fix |
|---|---|---|
Automation never triggers | Wrong entity or state | Verify entity name in Developer Tools → States |
Zone automation doesn't fire | Zone not enabled | Enable zone entities in device settings |
Lights turn off too quickly | Off delay too short | Increase Occupancy Off Delay in EPL settings |
Multiple zones trigger at once | Zones overlap | Adjust zone boundaries in Zone Configurator |
Next Steps
Home Assistant Entities - All available sensors and controls
How to Create Zones - Set up detection zones
How to Tune Your EPL Sensor - Optimize detection
Troubleshooting - Common issues and solutions