# Automations and Flows

# Automations and Flows

Create useful automations (Flows) with Everything Presence Lite in Homey.

## Prerequisites

* EPL added in Homey and visible on the Devices tab
* At least one light or scene you can control from Homey
* Zones configured if using zone-based automations (see device Settings)

## Flow Basics

* **When**: the trigger (e.g., Zone 1 occupancy turned on)
* **And**: conditions (e.g., only after sunset)
* **Then**: the action (e.g., turn on a light)

## Recipe 1: Turn on a light when room is occupied


1. In Homey, create a new Flow
2. **When**: Select Everything Presence Lite > Motion Alarm turned on
3. **And** (optional): Only after sunset
4. **Then**: Turn on your chosen light or scene

## Recipe 2: Turn off the light when room is empty


1. Create a second Flow
2. **When**: Select Everything Presence Lite > Motion Alarm turned off
3. **Then**: Turn off the same light


:::tip
Use the **Occupancy Off Delay** setting (device Settings) to prevent lights turning off too quickly. 15-30 seconds is a good starting point.

:::

## Recipe 3: Zone-based lighting

Trigger different lights based on which zone is occupied:

**Flow A - Living room couch zone:**


1. **When**: Zone 1 Occupancy turned on
2. **Then**: Turn on floor lamp

**Flow B - TV area zone:**


1. **When**: Zone 2 Occupancy turned on
2. **Then**: Dim ceiling light to 30%


:::tip
Configure zones in the EPL device Settings before creating these Flows. Use the Everything Presence Zone Configurator in Home Assistant for easier visual setup, then the coordinates will sync to Homey.

:::

## Recipe 4: Entry notification

Get notified when someone enters a specific area:


1. **When**: Zone 1 Occupancy turned on (configure Zone 1 as your entry area)
2. **And**: Only during specific hours
3. **Then**: Send push notification

## Recipe 5: All zones clear = room empty

Turn everything off only when all zones are empty:


1. **When**: Motion Alarm turned off
2. **And**: Zone 1 Occupancy is off
3. **And**: Zone 2 Occupancy is off
4. **Then**: Turn off all lights in room

## Advanced: Target tracking

For advanced use cases, you can trigger Flows based on target position, distance, or speed:

* **measure_distance.target1** - Distance to nearest person
* **measure_speed.target1** - Movement speed (detect running vs walking)
* **measure_angle.target1** - Direction of person

Example: Trigger an alert if someone is moving fast (speed > 1000 mm/s).

## Troubleshooting

| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Flow doesn't trigger | Wrong device or zone selected | Verify device and zone in Flow settings |
| Zone never activates | Zone not configured | Set zone coordinates in device Settings |
| Lights turn off too quickly | Off delay too short | Increase Occupancy Off Delay in Settings |
| Multiple zones trigger at once | Zones overlap | Adjust zone coordinates to avoid overlap |

## Next Steps

* Full capability list: [Homey Sensors and Controls](/doc/6481bdc2-6f19-4bea-ab98-f0319b703b77)
* Zone setup guide: [How to Create Zones](/doc/5b75125c-e11e-4009-a366-59e9e9ff1a72)

---

**Documents**

- [EP1 vs EPL: Which Sensor is Right for You?](https://docs.everythingsmart.io/s/products/doc/ep1-vs-epl-which-sensor-is-right-for-you-5B3RxiY3Kp)
- [Everything Presence One (EP1)](https://docs.everythingsmart.io/s/products/doc/everything-presence-one-ep1-3R178yZSUP)
- [Everything Presence Pro](https://docs.everythingsmart.io/s/products/doc/everything-presence-pro-nh3fIXmow9)
- [Everything Presence Lite (EPL)](https://docs.everythingsmart.io/s/products/doc/everything-presence-lite-epl-ZVnBzYzuX2)
- [Zone Configurator](https://docs.everythingsmart.io/s/products/doc/zone-configurator-93b9scGsa2)
- [Knowledge Base Articles](https://docs.everythingsmart.io/s/products/doc/knowledge-base-articles-KnRRmk4zvt)