NFL game sensor (scores, possession, etc)

Here is my automation


And here is the card

The win prob does update correctly too btw - just took the snip when they scored

You’re assuming that the state is the score, but the state is just IN. I think if you add a .team_score before the |int it will work.

I see that now - not sure what I did but I thought I had used the latest one dave posted but I guess not

Thanks for catching that - now hoping they score again to test

I see the timeouts updating now

1 Like

Well, my living room lights change to red when the Chiefs have the ball, so that’s fun. Time to get obnoxious with outdoor lighting.

4 Likes

This is awesome! I just stumbled upon this and love that DA BEARS was one of the screenshots! I’ll be back next Sunday to see what’s new! HA is the Best!

This look amazing. I was here looking for something else for projects and saw this. I am now sidetracked lol

Does anyone have an issue with duplicate sensors being created when rebooting home assistant?

Yes, that is an issue. It doesn’t happen if you configure via the UI, and I have a fix coming up to address it for those of us who add via the config!

Oh my thanks @zacs I will move over to the config via UI as I did not see that as an option. Thanks again

First I want to say this is awesome! Thanks to everybody here that put the work in to make a super easy, beautiful card to track my division. I have just got back into home assistant after attending to some family issues so Im a small bit lost, on how to fix the duplicate sensors when I restart HA. I did install with HACS then used the UI to set up the teams that I want to track. I see others had the same issue. Shoud Inot use the UI to set the teams up?
nfl
If not, how else shoud I go about doing it? Thanks in advance to any help anybody could provide.

Corey

EDIT: Im sorry, I thnk I just figured it out. I had YAML sensors configured also.I must have tried that in the beginning.

EDIT:EDIT: Nope still duplicate sensrs… Im lost here…

I’m tracking the teams in the AFC North as well. Since you have duplicate sensors, it sounds like you’re not assigning unique friendly names when you create the sensors. For example, when you install a sensor in the UI for the Browns, the default friendly name is ‘NFL’. Change the friendly name to Browns, and sensors.browns will be created.

Agree with you that the integration and card are both awesome. I’m thankful to those that developed these.

Love this great work. Here is my setup

If I were you I would delete all the sensors (config and UI), reboot, and just add via the UI.

I have a fix in the dev branch, just wanted to test it before merging it to the main branch.

1 Like

I deleted everything, restarted HA and added to the UI and gave friendly names to each team.

The sensors work so well that they were updated befor my live tv (using YoutubeTv) did lol

Jefe this is a tough division,im a big browns fan but I still wish you luck!

1 Like

I just published version 0.2 with a couple small updates, though nothing major.

  • Fixed the bug where config-based (ie YAML) sensors would clone themselves on every reboot.
  • Added initial bye week logic. This new state value is BYE.
  • Removed interval from the UI setup, since the interval is auto-configured based on game start time now.
1 Like

Quick update to 0.2.1 – now that bye weeks are a reality, I had real data to check against. You’ll now get a BYE state during your team’s week, but the only attributes available are: team_abbr, team_name, and team_logo.

@D34DC3N73R should have everything he needs to design a very simple card for bye weeks now :wink: .

Footnote that if your team can’t be found in the list of active games or the bye list, it will go into a NOT_FOUND state. This should technically only happen for teams that miss the playoffs, starting in week 18. If anyone sees it before then, please please file an issue so I can look into it!

@zacs Can you also include team record in the bye stats? Or is that data not available when teams are on bye?

Sadly those three are the only fields available when the team is on the bye list.

I will look into retaining some attributes like that across API calls, though. Hadn’t thought of that but it could be possible, although I think a reboot would wipe it out with the way I am thinking to implement. I’ll give it a shot.