NFL game sensor (scores, possession, etc)

No worries bro! i so appreciate everybody in this community. im not very good at templates yet.

I don’t mind the process of trying to figure things out, thats how I learn! I worked on this for hours and what I came up with (with the help of others in this thread) might have worked, but I used yours and they are working perfectly. Thank you so much. I know using automations is probably a bit much in my case, but like others hereif I can automate something I will! lol

Again thank you everybody who helped with this project, its something that I have been trying to perfect for a few years now, and this one is perfect!

1 Like

Just stumbled upon this thread and want to give a shout out to everyone that helped develop this! I had used the xml version for getting scores last year and was struggling to find a new solution since that xml site wasn’t being updated anymore. THANK YOU!

1 Like

I have a problem with the installation and hope someone here can help.
I have set up everything but unfortunately I am stuck in state “NOT_Found”.
I don’t see the problem, I have set up everything as written in the instructions but it always remains on “NOT_Found”.

I hope someone here has the idea that I don’t see at the moment.

What acronym did you enter when you configured?

I have entered TB

EDIT:
I have carried out a new test installation at my office.
Everything works here. The status is PRE.

The only problem I can think of now is that Pi-Hole blocks something at home.
But I cannot see anything in the logs so far.
I will carry out another installation with pi-hole disabled.

Yah it shows up fine when I test it. Pihole shouldn’t be an issue, as the only URL is an espn.com domain (I also run Pihole and haven’t had an issue). Can you open http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard in your browser at home?

Can someone help me out here - I can’t get this input to trigger no matter what I try. This is my current code.

alias: NFL - Input Boolean Control - Turn On/Off Win Input Boolean
description: Turns on input boolean for five minutes when team wins
trigger:
  - platform: state
    entity_id: sensor.nfl
    attribute: attribution
    from: IN
    to: POST
condition:
  - condition: template
    value_template: >-
      {{ states("sensor.nfl_score")|int >
      states("sensor.nfl_opponent_score")|int }}
action:
  - service: input_boolean.turn_on
    data: {}
    entity_id: input_boolean.nfl_win_detector
  - delay: '00:05:00'
  - service: input_boolean.turn_off
    data: {}
    entity_id: input_boolean.nfl_win_detector
mode: single
1 Like

unless you’re using some custom template sensors, I think you’d want something like for the integration

{{ state_attr('sensor.nfl', 'team_score') > state_attr('sensor.nfl', 'opponent_score') }}
1 Like

I’d delete the integration (but not uninstall) and just configure it again. Make sure there are no extra spaces or commas etc in the team acronym. I also run pi-hole and haven’t run into this issue.

I would remove the attribute: attribution since it is only used to reference attrs and you want the real state of the sensor.

Ok so I’ll remove that. Should I use D34 suggestion as well?

Yes his condition guidance is correct.

This what I currently have and hopefully will be able to get a Bears win to see if it works.

alias: NFL - Input Boolean Control - Turn On/Off Win Input Boolean
description: Turns on input boolean for five minutes when team wins
trigger:
  - platform: state
    entity_id: sensor.nfl
    from: IN
    to: POST
condition:
  - condition: template
    value_template: >-
      {{ state_attr('sensor.nfl', 'team_score') > state_attr('sensor.nfl',
      'opponent_score') }}
action:
  - service: input_boolean.turn_on
    data: {}
    entity_id: input_boolean.nfl_win_detector
  - delay: '00:05:00'
  - service: input_boolean.turn_off
    data: {}
    entity_id: input_boolean.nfl_win_detector
mode: single

you could test it out by changing the attributes and state in developer tools > states and then clicking “Set State”

You would think I would remember that lol. Just tested and everything works perfectly - Thanks all for the help!

Love the intergration and Im curious if it would be possible to auto create the cards for all the games every week. Thanks for everything

all good, the games self populated :grinning:

Does it show the sensor unavailable for anyone else?

was working yesterday but my dashboard doesn’t have the card displayed and says unavailable.

Update: I was able to add a random team LAC - it shows. I deleted my entry for CHI and re-added. Still does not work. Shows unavailable still

Eagles were showing that way for me for a few hours this morning. Seems to have resolved itself…might have something to do with the last minute schedule changes this week :man_shrugging:

Yeah I just peaked at it again and it’s showing now. That’s what I would assume.

I mean lets be honest though - not like I need this card with how trash Bears have been…

1 Like