daviswieck / ha-college-football

5 stars 1 forks source link

Teams switched mid-game #1

Closed tahlequawesome closed 1 year ago

tahlequawesome commented 2 years ago

First off, awesome integration, sensor, and lovelace card! I am very grateful for the work you have done on this, it has added a really fun element to game day. Now, the issue... Scoreboard looked great and automations based on cf_opponent and cf_your_team worked well Saturday 9/3/22. Scoreboard changed Tuesday morning for the game 9/10/22. During the first half of the game scoreboard looked good and automations were correct. Sometime in the second half (OU vs. Kent State) the teams switched to TTU / Houston. I have since removed and re-added the integration and it keeps coming up with cf_your_team as Houston. I have verified the API .py file has the correct value for the BIG12. At the time the change occured, during the OU game, I had not restarted HA since restarting the previous weekend while adding the integration. I am on 2022.8.3 and have added the corresponding config. Any guidance would be appreciated.

daviswieck commented 2 years ago

This is interesting... Its seeing the "OU" in "HOU" and pulling Houston's game info. For the time being, change the URL to "https://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard". This will pull all top 25 games now. When it updates tomorrow, 9/13, Houston will drop out of Top 25 so it will only pull OU's. I'll look into this some more!

daviswieck commented 2 years ago

This problem could come up with multiple teams that only have 2 letters in their acronym. I think I am going to update it to look for the Full Name instead of the Team Acronym instead. I've tested it and so far it works. Going to actually test it this weekend to confirm. If you would like to do the same, go to the init file and change 162 if team_id in event["shortName"]: to 162 if team_id in event["name"]

Then in your config change your team_id: 'Oklahoma Sooners' or just 'Sooners', if you only put 'Oklahoma' it could find Oklahoma State instead.

tahlequawesome commented 2 years ago

Okay. I'll make those changes and report back.

Thank you

On Tue, Sep 13, 2022 at 8:52 AM gopher_dave @.***> wrote:

This problem could come up with multiple teams that only have 2 letters in their acronym. I think I am going to update it to look for the Full Name instead of the Team Acronym instead. I've tested it and so far it works. Going to actually test it this weekend to confirm. If you would like to do the same, go to the init file and change 162 if team_id in event["shortName"]: to 162 if team_id in event["name"]

Then in your config change your team_id: 'Oklahoma Sooners' or just 'Sooners', if you only put 'Oklahoma' it could find Oklahoma State instead.

— Reply to this email directly, view it on GitHub https://github.com/daviswieck/ha-college-football/issues/1#issuecomment-1245445509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGH3CEF4SZS2EDBSGP2IBDV6CBITANCNFSM6AAAAAAQK5IJMI . You are receiving this because you authored the thread.Message ID: @.***>

tahlequawesome commented 2 years ago

Made the suggested changes and everything looks good now. Thank you.

daviswieck commented 2 years ago

Please monitor this weekend. See if any other problems appear within the sensor, like if one of the attributes is not acting right. If all is good then I will make the breaking change. Thanks!

daviswieck commented 1 year ago

Closing this as its uncommon... I will look into updating it with team names instead of acronyms in future.