Enhance /notify with custom emote, color, animation, sound
- /notify now accepts optional: emote, color, animation, sound - Backend passes custom properties to status response - Frontend handles custom sounds (chime, alert, success, etc.) - Added new sound effects: chime, alert, success - Updated documentation with full notify options - Added HA automation examples for doorbell and timer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
24
CLAUDE.md
24
CLAUDE.md
@@ -73,12 +73,34 @@ All detectors support: `AGGREGATOR_URL`, `CHECK_INTERVAL`, `THRESHOLD_WARNING`,
|
||||
|----------|--------|-------------|
|
||||
| `/event` | POST | Register event: `{"id": "name", "priority": 1-4, "message": "optional", "ttl": seconds}` |
|
||||
| `/clear` | POST | Clear event: `{"id": "name"}` |
|
||||
| `/notify` | POST | Simple notification: `{"message": "text", "duration": 5}` |
|
||||
| `/notify` | POST | Notification with optional customization (see below) |
|
||||
| `/sleep` | POST | Enter sleep mode |
|
||||
| `/wake` | POST | Exit sleep mode |
|
||||
| `/status` | GET | Current state JSON |
|
||||
| `/events` | GET | List active events |
|
||||
|
||||
### `/notify` Endpoint
|
||||
|
||||
```json
|
||||
{
|
||||
"message": "Someone at the door",
|
||||
"duration": 10,
|
||||
"emote": "( °o°)",
|
||||
"color": "#FF9900",
|
||||
"animation": "popping",
|
||||
"sound": "chime"
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Required | Description |
|
||||
|-------|----------|-------------|
|
||||
| `message` | No | Text to display below emote |
|
||||
| `duration` | No | Seconds before auto-expire (default: 5) |
|
||||
| `emote` | No | Custom emote to display |
|
||||
| `color` | No | Custom color (hex, e.g., `#FF9900`) |
|
||||
| `animation` | No | One of: `breathing`, `shaking`, `popping`, `celebrating`, `floating`, `bouncing`, `swaying` |
|
||||
| `sound` | No | One of: `chime`, `alert`, `warning`, `critical`, `success`, `notify`, `none` |
|
||||
|
||||
## Priority System
|
||||
|
||||
Lower number = higher priority. Events with a `ttl` auto-expire (heartbeat pattern).
|
||||
|
||||
Reference in New Issue
Block a user