Auto-sync: 20260114-002941

This commit is contained in:
Hutson
2026-01-14 00:29:42 -05:00
parent e7c8d7f86f
commit bd3ed4e4ef
2 changed files with 292 additions and 0 deletions

102
QUICK-REF-WELCOME-HOME.md Normal file
View File

@@ -0,0 +1,102 @@
# Welcome Home Automation - Quick Reference
## Quick Test (Manual Trigger)
```bash
HA_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwZThjZmJjMzVlNDA0NzYwOTMzMjg3MTQ5ZjkwOGU2NyIsImlhdCI6MTc2NTk5MjQ4OCwiZXhwIjoyMDgxMzUyNDg4fQ.r743tsb3E5NNlrwEEu9glkZdiI4j_3SKIT1n5PGUytY"
# Test the automation now (ignores conditions)
curl -X POST \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "automation.welcome_home"}' \
"http://10.10.10.210:8123/api/services/automation/trigger"
```
## Current Configuration
**Lights that turn on:**
- Living Room (75%)
- Living Room Lamp (60%)
- Kitchen (80%)
**When:** After sunset (30 min early) OR before sunrise
**Trigger:** Entering home zone (100m radius)
## Quick Modifications
### Add Office Light
```bash
# Get current config
curl -s -H "Authorization: Bearer $HA_TOKEN" \
"http://10.10.10.210:8123/api/config/automation/config/welcome_home" > /tmp/welcome.json
# Edit /tmp/welcome.json and add to "actions" array:
# {
# "target": {"entity_id": "light.office"},
# "data": {"brightness_pct": 70},
# "action": "light.turn_on"
# }
# Update automation
curl -X POST \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d @/tmp/welcome.json \
"http://10.10.10.210:8123/api/config/automation/config/welcome_home"
```
### Change to Scene Instead
Replace all light actions with a single scene:
```json
{
"actions": [
{
"service": "scene.turn_on",
"target": {
"entity_id": "scene.living_room_relax"
}
}
]
}
```
## Status Check
```bash
# Check if automation is enabled
curl -s -H "Authorization: Bearer $HA_TOKEN" \
"http://10.10.10.210:8123/api/states/automation.welcome_home" | \
python3 -c "import json, sys; data=json.load(sys.stdin); print(f\"State: {data['state']}\"); print(f\"Last triggered: {data['attributes']['last_triggered']}\")"
# Check current location
curl -s -H "Authorization: Bearer $HA_TOKEN" \
"http://10.10.10.210:8123/api/states/person.hutson" | \
python3 -c "import json, sys; data=json.load(sys.stdin); print(f\"Location: {data['state']}\"); print(f\"GPS: {data['attributes']['latitude']}, {data['attributes']['longitude']}\"); print(f\"Accuracy: {data['attributes']['gps_accuracy']}m\")"
```
## Toggle On/Off
```bash
# Disable
curl -X POST -H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "automation.welcome_home"}' \
"http://10.10.10.210:8123/api/services/automation/turn_off"
# Enable
curl -X POST -H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "automation.welcome_home"}' \
"http://10.10.10.210:8123/api/services/automation/turn_on"
```
## Web UI
http://10.10.10.210:8123 → Settings → Automations & Scenes → "Welcome Home"
---
*Entity ID: automation.welcome_home*