A Home Assistant custom integration that creates Media Player entities from the Android Companion App's Media Session sensors.
This integration is Android-only.
- Auto-Discovery: Automatically detects all Android devices with the Companion App that have a Media Session sensor enabled.
- Full Media Player Controls: Play, Pause, Stop, Next Track, Previous Track, and Volume control — all sent via the Companion App's notification commands.
- Multi-Session Support: Each Android device can have multiple active media sessions (e.g., Spotify, YouTube). Sessions are exposed as selectable sources.
- State Caching: Since the Media Session sensor only reports state changes (not current state on demand), this integration maintains a persistent cache of all session states.
- Session Timeout: Sessions that haven't reported activity within a configurable timeout (default: 30 minutes) are automatically marked as inactive.
- Sensor Update Trigger: After every control command, a sensor update is triggered on the device to get faster state feedback.
- Home Assistant 2026.1.0 or newer
- Android device(s) with the Home Assistant Companion App installed
- Media Session sensor enabled in the Companion App (Settings → Companion-App → Manage Sensors → Media Session)
- Notification Listener permission granted to the Companion App
- For volume control: the
volume_level_musicsensor must be enabled in the Companion App (Settings → Companion-App → Manage Sensors → Audio Sensors)
- Open HACS in your Home Assistant instance
- Click on Integrations
- Click the three dots in the top right and select Custom repositories
- Add
https://github.com/echocat/ha-companion-media-playeras an Integration - Click Install
- Restart Home Assistant
You probably do not want to do this! Use the HACS method above unless you know what you are doing and have a good reason as to why you are installing manually
- Download the latest release
- Copy the
custom_components/companion_media_playerfolder into your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for Companion Media Player
- The integration will automatically find all devices with a Media Session sensor
The integration will automatically add new media players for available companion apps when they become available via Mobile App integration in your Home Assistant.
- If you trigger actions from Home Assistant (Play/Pause/Next/Previous/Volume), the command is sent to the Android device almost in real time.
- If playback or volume changes are triggered directly on the Android device, how quickly Home Assistant sees these updates depends on how the Companion App reports sensor updates.
See sensor documentation for more details
| Option | Default | Description |
|---|---|---|
| Session Timeout | 30 minutes | Time after which an inactive media session is considered idle (regardless if it is playing or not). |
To see more details how to develop with this project - see the DEVELOPMENT.md file.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.