vasqued2 / ha-teamtracker

Home Assistant integration that provides real-time scores in multiple professional (NBA, NFL, NHL, MLB, MLS, and more), college (NCAA), and international (soccer, golf, tennis, mma, racing) sports using ESPN APIs.
174 stars 20 forks source link

Tennis ? #62

Closed schumi2309 closed 1 year ago

schumi2309 commented 1 year ago

Hello,

The tennis season is starting again and I realize that I can't get the players I want to follow, probably due to the name I put in the configuration: ex: for Nadal (who plays this January 17) I can put nadal or rafael-nadal, I always have the result 'not_found'

Capture d’écran 2023-01-17 à 15 21 46

Thanks if you could give me a hand...

For exemple. Thanks

schumi2309 commented 1 year ago

did you receive both files by email?

vasqued2 commented 1 year ago

I got them. Thanks. I'll pull into the next release.

schumi2309 commented 1 year ago

my pleasure.

vasqued2 commented 1 year ago

I will be releasing these changes in v0.7.0 later today. I will include the French translations that you provided and the hack that will force an English response for Tennis so it doesn't error out when passed a French language request.

I've watched the performance of the ESPN API through multiple matches in the Australian Open and it has been extremely inconsistent. Some games are updated in near real-time. Other updates are significantly delayed. In all cases of delay, the sensor and card are just displaying what the ESPN API is returning.

For example, during the Semifinals, the Djokovic match was being updated live for me but now for the Finals, it is not. I can see no pattern. For a while I thought an update in the Final score could be related to matched where a player retired before the match was completed but there we exceptions to that theory too.

The Australian Open is by far the largest tournament I have seen to-date with over 300 separate competitions. I'm not sure if the API is choking on the pure number of matches it is supporting or something else. What makes it even stranger is that the ESPN scoreboard pages are updated in real-time. This is the first time I've seen the info returned by the API differ from what ESPN displays on their website.

I've noted on the Wiki that the tennis API performs inconsistently. If you ever notice a pattern, feel free to open a new issue and share it.

If you ever want to see what the API is returning, the best way to do so is to go to https://jsonparser.org/, click on Load URL button and paste in http://site.api.espn.com/apis/site/v2/sports/tennis/atp/scoreboard. This will load in the data returned by the API. You can then use the search box in the upper right corner to search for a specific player or match and see what info is returned about it.

This is how you can confirm the problem is with the URL not returning the correct information/status.

Thanks for bringing this issue to my attention. I will monitor it off and on and see if I can detect any patterns. Right now it seems very random as to which matches ESPN updates and which ones they don't.

vasqued2 commented 1 year ago

Just released v0.7.0.

schumi2309 commented 1 year ago

Hello, I am back after a few days of vacation. I read your articles well. we will watch this very closely during the next tennis tournament and see if we still have the same problems. in the meantime, congratulations on the good job you have done so far. that's great. tomorrow I will test version 0.7.0 I'll let you know if I encounter a problem. thank you again for listening.