Also interested in the light show. As far as the attributes go what displays when the team scores? Or what would you use to trigger the automation to flash the lights?
@@kylegurney8610 I’d say you should either use TeamScore or OpponentScore attribute. Or both actually. You can set each of them as separate triggers and then assign actions accordingly (flash red for opponent, flash whatever for your team)
Got it, has there been any breaking changes to this? It keeps asking me to add a 2-character language code to use for the API call. Or is that only for leagues not native to the integration?
hi . i have a question , template must be configurated in configuration.yaml?
You use yaml within automation itself, not the configuration.yaml
I'm having major issues with this - would you mind pasting the entire automation yaml please?
Most The automation follows the following logic (replace square brackets with angled ones):
alias: Sports Football Teams
description: ""
trigger:
- platform: state
entity_id:
- sensor.man_city
attribute: team_score
id: Mancityscored
- platform: state
entity_id:
- sensor.mu
attribute: team_score
id: Manuscored
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.man_city
state: IN
- condition: state
entity_id: sensor.mu
state: IN
action:
- choose:
- conditions:
- condition: trigger
id:
- Mancityscored
sequence:
- data:
title: Man City scored
message: >-
[[ state_attr('sensor.man_city', 'team_name') ]]
[[state_attr('sensor.man_city', 'team_score') ]] :
[[state_attr('sensor.man_city', 'opponent_score') ]]
[[state_attr('sensor.man_city', 'opponent_name') ]]
action: notify.mobile_app_w_iphone_15_pro
- conditions:
- condition: trigger
id:
- Mancityopponentscored
sequence:
- data:
title: Man City conceded
message: >-
[[state_attr('sensor.man_city', 'team_name') ]]
[[state_attr('sensor.man_city', 'team_score') ]] :
[[state_attr('sensor.man_city', 'opponent_score') ]]
[[state_attr('sensor.man_city', 'opponent_name') ]]
action: notify.mobile_app_w_iphone_15_pro
- conditions:
- condition: trigger
id:
- Manuscored
sequence:
- data:
title: Man U scored
message: >-
[[state_attr('sensor.mu', 'team_name') ]]
[[state_attr('sensor.mu', 'team_score') ]] :
[[state_attr('sensor.mu', 'opponent_score') ]]
[[state_attr('sensor.mu', 'opponent_name') ]]
action: notify.mobile_app_w_iphone_15_pro
- conditions:
- condition: trigger
id:
- Manuopponentscored
sequence:
- data:
title: Man U conceded
message: >-
[[state_attr('sensor.mu', 'team_name') ]]
[[state_attr('sensor.mu', 'team_score') ]] :
[[state_attr('sensor.mu', 'opponent_score') ]]
[[state_attr('sensor.mu', 'opponent_name') ]]
action: notify.mobile_app_w_iphone_15_pro
Thanks for the video! How updated is this info? Would love to create an automation to flash some lights if my team scores. Is that possible?
In my experience it’s pretty much instant. And I am sure you can use it automation the way you want - will try myself actually - great shout!
Also interested in the light show. As far as the attributes go what displays when the team scores? Or what would you use to trigger the automation to flash the lights?
@@kylegurney8610 I’d say you should either use TeamScore or OpponentScore attribute. Or both actually. You can set each of them as separate triggers and then assign actions accordingly (flash red for opponent, flash whatever for your team)
Got it, has there been any breaking changes to this? It keeps asking me to add a 2-character language code to use for the API call. Or is that only for leagues not native to the integration?
Probably... have you tried to enter EN for the language code?
Its a bit to slow explained and very nice music.
Thank you for your feedback!