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:
2026-02-03 21:50:32 -06:00
parent 942cdad5b8
commit 1ec67b4033
4 changed files with 152 additions and 14 deletions

View File

@@ -109,7 +109,15 @@ rest_command:
url: "http://YOUR_SERVER:5100/notify"
method: POST
content_type: "application/json"
payload: '{"message": "{{ message }}", "duration": {{ duration | default(5) }}}'
payload: >
{
"message": "{{ message | default('') }}",
"duration": {{ duration | default(5) }},
"emote": "{{ emote | default('') }}",
"color": "{{ color | default('') }}",
"animation": "{{ animation | default('') }}",
"sound": "{{ sound | default('') }}"
}
kao_sleep:
url: "http://YOUR_SERVER:5100/sleep"
@@ -134,6 +142,21 @@ automation:
data:
message: "Someone at the door"
duration: 10
emote: "( °o°)"
color: "#FF9900"
sound: "chime"
- alias: "Timer Complete"
trigger:
platform: event
event_type: timer.finished
action:
service: rest_command.kao_notify
data:
message: "Timer done!"
emote: "\\(^o^)/"
animation: "celebrating"
sound: "success"
- alias: "Kao Sleep at Bedtime"
trigger:
@@ -150,6 +173,12 @@ automation:
service: rest_command.kao_wake
```
**Notify options:**
- `emote`: Any ASCII emote (e.g., `( °o°)`, `\\(^o^)/`)
- `color`: Hex color (e.g., `#FF9900`)
- `animation`: `breathing`, `shaking`, `popping`, `celebrating`, `floating`, `bouncing`, `swaying`
- `sound`: `chime`, `alert`, `warning`, `critical`, `success`, `notify`, `none`
## API Reference
| Endpoint | Method | Description |