Repository navigation
v30 — play_media + stop_media commands
What's in v30
Two new kiosk_commands:
- `play_media` — takes an audio URL in `value`. Plays via Android MediaPlayer on STREAM_ALARM so it bypasses silent/DND, ducks Spotify automatically, and gets out of the way of the music when done. Single-track at a time: firing again replaces.
- `stop_media` — stops any in-progress play_media.
Primary use case: HA-driven alarm clocks.
Example: 7:00 AM wakeup automation
```yaml
- alias: Bedroom wakeup
trigger:- platform: time
at: "07:00:00"
action: - event: kiosk_command
event_data:
device: Bedroom Dashboard
command: play_media
value: "http://homeassistant.local:8123/local/wakeup.mp3"
```
- platform: time
Store `wakeup.mp3` in HA's `config/www/` folder; it's served at `/local/`. Or use an HA TTS proxy URL for spoken alarms (e.g. `http://.../api/tts_proxy/.mp3`).
Notes
- URL must be reachable from the kiosk's network (same Wi-Fi LAN as HA).
- File formats: anything Android MediaPlayer supports — MP3, AAC, OGG, WAV, FLAC, M4A.
- Spotify keeps playing under the alarm (ducked); stop the alarm via `stop_media` or let it complete naturally to return Spotify to normal volume.
- Volume: defaults to whatever the device's STREAM_ALARM is set to (~40% out of the box). Can be turned up via the device's hardware volume keys while playing.