The dieliga sensor provides information about your sports league from DieLiga, compatible with scoreboard systems based on "dieLiga" (tested with Volleyball-Freizeit Ost).
- Modern Architecture: Uses
DataUpdateCoordinatorfor efficient API polling. - Scoreboard: See your team's current position or the league name.
- Schedule: Track upcoming games and season progress (percentage of completed games).
- Notifications: Get alerts for rank changes and game reminders via Home Assistant automations.
- Open HACS in your Home Assistant instance.
- Click the three dots in the top right corner and select Custom repositories.
- Add Repository:
https://github.com/FaserF/ha-dieliga - Category: Integration
- Click Add.
- Search for "die Liga" and click Download.
- Download the latest Release.
- Extract the ZIP file.
- Copy the
custom_components/dieligafolder to your<config>/custom_components/directory. - Restart Home Assistant.
- Go to Settings -> Devices & Services.
- Click Add Integration.
- Search for "die Liga".
| Variable | Description |
|---|---|
| Base URL | The URL of the DieLiga instance (e.g., https://www.ost.volleyball-freizeit.de). |
| Liga ID | The numeric ID of your league. Found in the URL of your league's schedule page (e.g., 1031). |
| Team Name | (Optional) Your team's name exactly as it appears on the website. Used for filtering the schedule and showing your rank. |
The integration provides the following entities to keep you up to date:
| Platform | Entity | Description |
|---|---|---|
sensor |
Scoreboard π | Your team's current position in the league or the league name. |
sensor |
Schedule π | The progress of the season (%) and a full list of matches in attributes. |
calendar |
Match Calendar ποΈ | All upcoming matches displayed directly in your Home Assistant calendar. |
binary_sensor |
Match Today β‘ | Turns on if your team has a game today. perfect for automation triggers! |
Tip
Pro Tip: The Match Today sensor is disabled by default to keep your setup clean. You can manually enable it under Settings -> Devices & Services -> dieLiga -> Entities. π οΈ
Below are several examples of how you can use the sensor data in your automations.
1. Basic: Rank Change Notification
This automation sends a notification whenever your team's position in the league table changes.
alias: "dieLiga: Notify Rank Change"
trigger:
platform: state
entity_id: sensor.dieliga_scoreboard_myteam
condition:
# Ensure the state is a number (position) and has actually changed
- condition: template
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
service: notify.mobile_app_myphone
data:
title: "League Update! π"
message: >
Your team is now in position {{ states('sensor.dieliga_scoreboard_myteam') }}.2. Intermediate: Match Day Reminder (1 day before)
Sends a reminder at 8 PM the day before a game.
alias: "dieLiga: Game Tomorrow Reminder"
trigger:
platform: time
at: "20:00:00"
condition:
- condition: template
value_template: >
{% set games = state_attr('sensor.dieliga_schedule_myteam', 'games') %}
{% if games %}
{% set next_game = games | selectattr('state', 'ne', 'Completed') | first %}
{% if next_game %}
{{ (strptime(next_game.date, '%Y-%m-%d').date() - now().date()).days == 1 }}
{% else %}
false
{% endif %}
{% else %}
false
{% endif %}
action:
service: notify.mobile_app_myphone
data:
title: "Match Day Tomorrow! π"
message: >
Reminder: You play against {{ state_attr('sensor.dieliga_schedule_myteam', 'games')[0].team_a_name if state_attr('sensor.dieliga_schedule_myteam', 'games')[0].team_b_name == 'My Team Name' else state_attr('sensor.dieliga_schedule_myteam', 'games')[0].team_b_name }} tomorrow!3. Advanced: Post-Match Result Notification
This automation triggers when the season progress increases (meaning a game was completed) and sends the result of the last game.
alias: "dieLiga: Post-Match Result"
trigger:
platform: state
entity_id: sensor.dieliga_schedule_myteam
condition:
# Only trigger if the completed percentage increased
- condition: template
value_template: "{{ trigger.to_state.state | int > trigger.from_state.state | int }}"
action:
- set_variable:
last_game: >
{% set games = state_attr('sensor.dieliga_schedule_myteam', 'games') %}
{{ games | selectattr('state', 'eq', 'Completed') | list | last }}
- service: notify.mobile_app_myphone
data:
title: "Game Result π"
message: >
Result for {{ last_game.team_a_name }} vs {{ last_game.team_b_name }}:
{{ last_game.team_a_sets }} : {{ last_game.team_b_sets }} sets.4. Dashboard: Next 3 Matches (Markdown)
You can use this template in a manual markdown card to see your upcoming schedule.
type: markdown
content: >
### Upcoming Matches π
| Date | Opponent | Time |
| :--- | :--- | :--- |
{% set games = state_attr('sensor.dieliga_schedule_myteam', 'games') | selectattr('state', 'ne', 'Completed') | list %}
{% for game in games[:3] %}
| {{ game.date }} | {{ game.team_b_name if game.team_a_name == 'My Team Name' else game.team_a_name }} | {{ game.time }} |
{% endfor %}Please open an issue on GitHub. For debugging, add this to your configuration.yaml:
logger:
logs:
custom_components.dieliga: debugTests can be run using pytest:
pip install pytest pytest-homeassistant-custom-component
pytest