I’m trying to get an automation to trigger based on the outcome of a game in team tracker (win or loss) but haven’t figured out how to get it to work. I’ve tried a few different configurations but nothing has worked. Below are two things I’ve tried. I’ve also tried having nothing in the from state for team_winner and it still didn’t work. Can anyone help with what I might be doing wrong? Thanks in advance
alias: "Sports: Lions Win"
description: ""
trigger:
- platform: state
entity_id:
- sensor.lions
to: POST
for:
hours: 0
minutes: 0
seconds: 10
condition:
- condition: state
entity_id: sensor.lions
state: "true"
enabled: true
attribute: team_winner
alias: "Sports: MSU Win New"
description: ""
trigger:
- platform: state
entity_id:
- sensor.msu_football
attribute: team_winner
to: "true"
from: Unknown
Have a similar setup for the Jets. See my YAML below. Minor differences to yours (no quotes around “true” for team winner. My “state:” instead says “trigger”.
But I do know that this automation works. (Well… since the Jets haven’t won in 4 weeks I’m assuming… but the automation DID fire weeks back when they won.)
alias: Sports - Jets Win!
description: ""
mode: single
triggers:
- entity_id:
- sensor.ny_jets
to: POST
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
conditions:
- condition: state
entity_id: sensor.ny_jets
attribute: team_winner
state: true
(I only sent you the trigger/conditions… but figured you’d appreciate the whole automation… when the Jets win… I have a WLED light in my living room that does a Green 1D Fireworks routine, and the “J! E! T! S! Jets! Jets! Jets!” chant (recorded at the stadium) plays on the Sonos through the whole house.)
That’s awesome. I’m still trying to figure out exactly what I want to do with it. So far I only have a few light bars I’m messing around with but I want to expand it and get some more stuff to make it more fun.