# Security Automations

## Overview

5 automations cover security and safety alerting — water leaks, smart lock timeout, garage door left open, UPS power loss, and backyard light control.

---

## Water Leak Alert

**Entity:** `automation.water_leak_alert` | **State:** on

Sends an immediate notification when any Aqara Water Leak Sensor detects water.

| Property | Value |
|---|---|
| Trigger | Any `binary_sensor.aqara_water_leak_sensor_water_leak` → on |
| Sensors covered | Multiple locations (kitchen, bathrooms, basement, guest bathroom) |
| Action | Push notification (iOS / Pushover) |

> **Critical automation.** Aqara Water Leak Sensors are deployed in multiple locations. All sensors feed this single automation.

---

## Smart Lock Unlocked 30 Min Alert

**Entity:** `automation.smart_lock_unlocked_30_min_alert` | **State:** on

Sends a reminder notification if any smart lock remains in the `unlocked` state for more than 30 minutes.

| Property | Value |
|---|---|
| Trigger | `lock.kitchen_smart_lock` OR `lock.aqara_smart_lock_u100` (Garage) → unlocked for 30 min |
| Action | Push notification warning |

---

## Notify if Garage Door Open

**Entity:** `automation.notify_if_garage_door_open` | **State:** on

Sends a notification if the garage door is left open for an extended period.

| Property | Value |
|---|---|
| Trigger | `cover.garage_door` remains open for configurable duration |
| Action | Push notification |

---

## UPS Power Outage Notification

**Entity:** `automation.ups_power_outage_notification` | **State:** on

Notifies when the Media Room UPS (CPS CP1500AVRLCD) switches from grid power to battery — indicating a power outage.

| Property | Value |
|---|---|
| Trigger | NUT UPS status → on battery |
| Action | Push notification |

---

## Control Backyard Light

**Entity:** `automation.control_backyard_light` | **State:** on

Manages the backyard light based on schedule, sunset/sunrise, or motion events.

| Property | Value |
|---|---|
| Trigger | Sunset / sunrise / motion |
| Action | Toggle Backyard Light (TP-Link KS205) |

---

## Notes

- Notification targets for security automations are typically `notify.mobile_app_iceheart` (iPhone push) and/or `notify.pushover`.
- The Smart Lock Unlocked 30 Min Alert covers only `kitchen_smart_lock` and `aqara_smart_lock_u100` (Garage lock). The `ratgdov2.5i lock remotes` is not a physical door lock.

## Last Updated

2026-06-24