Celebrate Victory in Style

College football season is officially upon us. During the offseason, I stumbled upon the Team Tracker integration and my mind began to spin with possibilities. Since then I have looked forward to annoying my family with another over the top automation.

I started out by flashing lights green every time Baylor scored. I found that the Team Tracker integration timing didn’t line up perfectly with the television feed, which quickly became distracting. So, this automation now simply fires after every win.

Prerequisites

Before you start:

  • Decide which light you want to flash (example below: light.office_bulb).
  • Confirm your Team Tracker entity exists. Example used below is sensor.team_tracker_baylorfb. Tweak any entities and YAML accordingly. You’ll need to have HACS installed in order to install the Team Tracker integration.

Step 1: Create the Automation

  • Go to Settings → Automations & Scenes → Create Automation.
  • Choose Start with an empty automation.
  • Name it and save.

Step 2: Add the Trigger

  • Trigger type: State
  • Entity: sensor.team_tracker_baylorfb
  • From: IN
  • To: POST (This fires when the game finishes.)

Step 3: Add a Condition

  • Condition type: Template
  • Template code:
condition:
- condition: template
value_template: >
{{ state_attr('sensor.team_tracker_baylorfb','team_score')|int(0)
> state_attr('sensor.team_tracker_baylorfb','opponent_score')|int(0) }}

Step 4: Add Actions

4.1 Snapshot the Light State

This allows us to capture the original light color so we can change it back at the end.

  • Action: Call service → scene.create
    • scene_id: baylor_win_before_lights
    • snapshot_entities: your light (e.g., light.office_bulb)

4.2 Flash Green

  • Action: Repeat → Count: 6
  • Inside the repeat loop:
    • Call service → light.turn_on
      • Target: your light
      • Brightness: 255
      • HS color: [120, 100] (green)
    • Delay: 0.4 seconds
    • Call service → light.turn_off
    • Delay: 0.4 seconds

(This makes the bulb blink green several times. More reliable than the built-in “flash” option, which some bulbs ignore.)

4.3 Restore Light State

  • Call service → scene.activate

You’ll need to run this once or complete this step in YAML, because this scene doesn’t yet exist. We will do it in YAML:

service: scene.turn_on
target:
entity_id: scene.baylor_win_before_lights

Step 5: Mode

  • Automation Mode: Single (should be the default…prevents overlaps).

What other celebratory actions have you automated? Please share in the comments…