Fussball
Display live football scores from Home Assistant
| System | Home Assistant Blueprint |
|---|---|
| Firmware | AWTRIX NG |
| Topic | Miscellaneous |
| Built by | Hank_the_Tank |
| File | eUrDhXvQAFGo.yaml · 9.1 KB |
| Icons | — |
| Published | 8 Aug 2026 · updated 8 Aug 2026 |
| Downloads | 1 |
#UPDATE#
now with Game-Prediction-Bar
⚽ AWTRIX NG Fußball Scoreboard
Display live football scores from Home Assistant directly on your AWTRIX NG.
The blueprint uses a sensor from the Team Tracker integration and automatically creates a pushed app when the selected match is live.
Features
- Displays the current score on AWTRIX NG
- Supports one or multiple AWTRIX NG devices
- Automatically appears when the match status changes to
IN - Updates whenever either team scores
- Automatically removes the app after the match
- Uses the home and away team colors supplied by Team Tracker
- Provides two selectable fallback colors
- Automatically uses the fallback colors when Team Tracker returns
#000000for both team colors - Immediately switches to the scoreboard after an update
- Configurable display duration
- Configurable AWTRIX NG pushed-app name
Requirements
- Home Assistant 2024.11 or newer
- MQTT integration
- AWTRIX NG with Home Assistant discovery enabled
- Team Tracker integration
- A configured Team Tracker sensor
Configuration
AWTRIX NG devices
Select one or more AWTRIX NG devices on which the scoreboard should appear.
AWTRIX app name
Enter a unique name for the pushed app.
Only the following characters are supported:
A-Z, a-z, 0-9, _ and -
For example:
VFLOsnabrueck
Do not use spaces, umlauts, accented characters or other special characters in the app name.
Display duration
Defines how many seconds the scoreboard remains visible during each rotation.
Team Tracker sensor
Select the Team Tracker sensor representing your team.
Team fallback color 1
The primary replacement color used when Team Tracker reports both team colors as black.
Team fallback color 2
The secondary replacement color used when Team Tracker reports both team colors as black.
Team Color Fallback
Team Tracker occasionally returns the following colors for teams without valid color information:
team_colors:
- "#000000"
- "#000000"
When this happens, the blueprint automatically replaces them with the two fallback colors selected during setup.
If Team Tracker provides valid team colors, the sensor colors are used instead.
How It Works
When the Team Tracker sensor changes to IN, the blueprint creates an AWTRIX NG pushed app containing the current score.
The scoreboard is updated whenever the team_score or opponent_score attribute changes.
When the sensor changes to PRE, POST or NOT_FOUND, the pushed app is removed from AWTRIX NG.
eUrDhXvQAFGo.yaml
blueprint:
name: ⚽ AWTRIX NG – Fußball Scoreboard ⚽
author: Hank_the_Tank / AWTRIX NG migration
description: >-
# Fußball Scoreboard for AWTRIX NG ver. 1.1
Displays a live football score from the HACS Team Tracker integration on
one or more AWTRIX NG devices. The colors on the left and right represent
the home and away teams. The pushed app is shown when the match starts or
the score changes, and is removed when the match is no longer live.
## Requirements
- Home Assistant 2024.11 or newer
- MQTT integration
- AWTRIX NG with Home Assistant discovery enabled
- HACS Team Tracker integration
domain: automation
input:
awtrix_devices:
name: AWTRIX NG devices
description: Select one or more AWTRIX NG devices.
selector:
device:
multiple: true
filter:
- integration: mqtt
manufacturer: Blueforcer
model: AWTRIX NG
app_name:
name: AWTRIX app name
description: >-
Unique pushed-app name. Use only letters, numbers, underscores and
hyphens, with a maximum length of 32 characters.
default: football_score
selector:
text:
message_duration:
name: Display duration
description: How long the scoreboard should remain visible per rotation.
default: 15
selector:
number:
min: 0
max: 300
step: 1
mode: box
unit_of_measurement: s
team_sensor:
name: Team Tracker sensor
description: Select the Team Tracker sensor for your team.
selector:
entity:
fallback_team_color_1:
name: Team fallback color 1
description: Used as the primary team color when Team Tracker returns black for both colors.
default: [102, 0, 153]
selector:
color_rgb:
fallback_team_color_2:
name: Team fallback color 2
description: Used as the secondary team color when Team Tracker returns black for both colors.
default: [255, 255, 255]
selector:
color_rgb:
mode: restart
triggers:
- trigger: state
entity_id: !input team_sensor
to: IN
id: game_live
- trigger: state
entity_id: !input team_sensor
to: PRE
id: game_not_live
- trigger: state
entity_id: !input team_sensor
to: POST
id: game_not_live
- trigger: state
entity_id: !input team_sensor
to: NOT_FOUND
id: game_not_live
- trigger: state
entity_id: !input team_sensor
attribute: team_score
id: score_changed
- trigger: state
entity_id: !input team_sensor
attribute: opponent_score
id: score_changed
- trigger: state
entity_id: !input team_sensor
attribute: last_play
id: prediction_changed
variables:
device_ids: !input awtrix_devices
app_name: !input app_name
team_sensor: !input team_sensor
message_duration: !input message_duration
fallback_team_color_1_rgb: !input fallback_team_color_1
fallback_team_color_2_rgb: !input fallback_team_color_2
fallback_team_color_1: >-
{{ '#%02X%02X%02X' | format(
fallback_team_color_1_rgb[0],
fallback_team_color_1_rgb[1],
fallback_team_color_1_rgb[2]
) }}
fallback_team_color_2: >-
{{ '#%02X%02X%02X' | format(
fallback_team_color_2_rgb[0],
fallback_team_color_2_rgb[1],
fallback_team_color_2_rgb[2]
) }}
mqtt_prefixes: >-
{% set ns = namespace(prefixes=[]) %}
{% for device_id in device_ids %}
{% set entities = device_entities(device_id)
| select('search', 'mqtt_prefix') | list %}
{% if entities | length > 0 %}
{% set prefix = states(entities[0]) | trim %}
{% if prefix not in ['', 'unknown', 'unavailable'] %}
{% set ns.prefixes = ns.prefixes + [prefix] %}
{% endif %}
{% endif %}
{% endfor %}
{{ ns.prefixes | unique | list }}
home_game: "{{ state_attr(team_sensor, 'team_homeaway') == 'home' }}"
team_colors: >-
{% set colors = state_attr(team_sensor, 'team_colors') or [] %}
{% set color_1 = colors[0] | lower if colors | length > 0 else '' %}
{% set color_2 = colors[1] | lower if colors | length > 1 else '' %}
{% if color_1 in ['#000000', '000000']
and color_2 in ['#000000', '000000'] %}
{{ [fallback_team_color_1, fallback_team_color_2] }}
{% elif colors | length > 0 %}
{{ colors }}
{% else %}
{{ [fallback_team_color_1, fallback_team_color_2] }}
{% endif %}
opponent_colors: >-
{{ state_attr(team_sensor, 'opponent_colors')
or ['#FFFFFF', '#808080'] }}
home_colors: "{{ team_colors if home_game else opponent_colors }}"
away_colors: "{{ opponent_colors if home_game else team_colors }}"
home_color_1: >-
{{ home_colors[0] if home_colors | length > 0 else '#FFFFFF' }}
home_color_2: >-
{{ home_colors[1] if home_colors | length > 1 else home_color_1 }}
away_color_1: >-
{{ away_colors[0] if away_colors | length > 0 else '#FFFFFF' }}
away_color_2: >-
{{ away_colors[1] if away_colors | length > 1 else away_color_1 }}
prediction_values: >-
{{ (state_attr(team_sensor, 'last_play') or '')
| regex_findall('([0-9]+(?:\.[0-9]+)?)%') }}
team_prediction: >-
{{ prediction_values[0] | float(0)
if prediction_values | length >= 2 else 0 }}
opponent_prediction: >-
{{ prediction_values[1] | float(0)
if prediction_values | length >= 2 else 0 }}
home_prediction: >-
{{ team_prediction if home_game else opponent_prediction }}
prediction_pixels: >-
{% set bar = namespace(items=[]) %}
{% if prediction_values | length >= 2 %}
{% set home_width = (home_prediction | float(0) * 16 / 100)
| round(0) | int %}
{% set home_width = 0 if home_width < 0
else 16 if home_width > 16 else home_width %}
{% for x in range(16) %}
{% set color = home_color_1
if x < home_width else away_color_1 %}
{% set bar.items =
bar.items + [['pixel', 8 + x, 7, color]] %}
{% endfor %}
{% endif %}
{{ bar.items }}
home_score: >-
{{ (state_attr(team_sensor, 'team_score') if home_game
else state_attr(team_sensor, 'opponent_score')) | default(0, true) }}
away_score: >-
{{ (state_attr(team_sensor, 'opponent_score') if home_game
else state_attr(team_sensor, 'team_score')) | default(0, true) }}
conditions: []
actions:
- repeat:
for_each: "{{ mqtt_prefixes }}"
sequence:
- choose:
- conditions:
- condition: trigger
id:
- game_live
- score_changed
- prediction_changed
- condition: template
value_template: "{{ is_state(team_sensor, 'IN') }}"
sequence:
- action: mqtt.publish
data:
qos: 0
retain: false
topic: >-
{{ repeat.item ~ '/cmd/apps/pushed/' ~ app_name }}
payload: >-
{{
{
'text': home_score ~ ':' ~ away_score,
'textColor': '#FFFFFF',
'textCenter': true,
'scroll': 'static',
'draw': [
['rectFill', 0, 1, 8, 2, home_color_1],
['rectFill', 1, 3, 6, 5, home_color_1],
['line', 3, 0, 4, 0, home_color_1],
['line', 2, 2, 2, 7, home_color_2],
['line', 5, 2, 5, 7, home_color_2],
['rectFill', 24, 1, 8, 2, away_color_1],
['rectFill', 25, 3, 6, 5, away_color_1],
['line', 27, 0, 28, 0, away_color_1],
['line', 26, 2, 26, 7, away_color_2],
['line', 29, 2, 29, 7, away_color_2]
] + prediction_pixels,
'durationMs': (message_duration | int) * 1000,
'backgroundColor': '#006C28'
} | to_json
}}
- action: mqtt.publish
data:
qos: 0
retain: false
topic: "{{ repeat.item ~ '/cmd/apps/switch' }}"
payload: >-
{{ {'name': app_name, 'fast': true} | to_json }}
- conditions:
- condition: trigger
id: game_not_live
sequence:
- action: mqtt.publish
data:
qos: 0
retain: false
topic: >-
{{ repeat.item ~ '/cmd/apps/pushed/' ~ app_name }}
payload: ""
More flows for Home Assistant Blueprint or Miscellaneous
Something wrong with this flow? Report it.