The MediaTracker
custom component for Home Assistant creates a sensor that fetches data from Bonukai's MediaTracker API. The sensor state shows the number of upcoming events, and additional attributes provide detailed information about each event.
This sensor can then be used to feed a lovelace card. By default the component attributes work 'out-of-the-box' with the Upcoming Media Card complete with poster and banner art.
-
Download the Component:
- Place the
media_tracker
folder in yourcustom_components
directory within your Home Assistant configuration directory.
- Place the
-
Configure Home Assistant:
- Add the following configuration to your
configuration.yaml
file:media_tracker: name: "Your Sensor Name" host: "your.api.host" port: your_api_port token: "your_api_token" days: number_of_days_to_track ssl: true_or_false small_img: true_or_false json_only: true_or_false
- Add the following configuration to your
-
Restart Home Assistant:
- Restart Home Assistant to apply the new configuration and load the custom component.
name
(Optional): Custom name for the sensor. Default = MediaTracker upcominghost
(Optional): Host or IP of your MediaTracker instance. Default = localhostport
(Optional): Port of your MediaTracker instance. Default = 7481token
(Required): Mediatracker authentication token for the API.days
(Optional): The number of days to look ahead for upcoming media events. Default = 7ssl
(Optional): Set to true if the API uses SSL (HTTPS). Default = falsesmall_img
(Optional): Set to true to fetch small images. This is faster and saves data. Default = falsejson_only
(Optional): Set to true if you only want JSON output. Default = false
- 0.5
- Added 'SMALL_IMG' setting for those looking to save bandwidth.
- 0.4
- Added deeplinks to series view currently as this is more useful than mediatracker individual episode page IMO (tap on the item in Upcoming Media Card).
- 0.3
- Added extra fields including seen/unseen flag.
- 0.2
- Added 'JSON_ONLY' setting for those not using Upcoming media card. Basic markdown example is shown below.
- 0.1
- Initial Release
type: markdown
content: |-
{% for media_item in state_attr('sensor.mediatracker_upcoming', 'data') %}
{% if 'title' in media_item %}
<a href="{{ media_item.deep_link }}">
<img src="{{ media_item.fanart }}" width="75%"></img>
</a>
**{{ media_item.title }}** *{{ media_item.release }}*
({{ media_item.number }}) {{ media_item.episode }}
{% endif %}
{% endfor %}
- Extra sensors for MediaTracker lists (Watchlist etc.)
- What to watch? - Grab a random next episode from the watchlist.
For support and updates, please refer to GitHub repository for this custom component or the Home Assistant Community Forum
If you enjoy using this custom component and want to support my work, why not buy me a coffee? Your appreciation keeps me energized and motivated to continue improving and adding new features!