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.
138 stars 19 forks source link

Fetching tennis data with date 1/30/1900 #117

Closed amiler closed 5 months ago

amiler commented 7 months ago

First of all, great plug-in. Thank you. I tried adding basketball teams that I follow - all good and working. I tried adding a tennis player that is currently playing on one of the ATP tournaments to test (Monfils - I am not following him, just testing). I enabled debugging and it seems that plug-in is fetching data from various tournaments currently played. However, the date used to check is Jan 30, 1900. I can see that on the tracker card that says "No upcoming games through 1/30/1900". Sensor is reporting as NOT FOUND (most likely because the date comparison. Debug logs show "No competitor information 'MONFILS' returned by API".

The link used to extract scores is correct and searching data in that link shows that "monfils" players is there with several results in it. My language is set to "english" - some previous issues (#62) exposed some problems with some languages.

I guess the issue is the date. I am not sure from where plug-in is getting this date but, for NBA scores, it is working as expected. Anybody else has similar issue with tennis scores?

vasqued2 commented 7 months ago

Thanks for bringing this up. Looking at the json response, ESPN changed their API for tennis to handle events that have both singles and doubles, men and women. I'll have to release a new version of the sensor to handle it. Unfortunately there is no easy fix.

vasqued2 commented 5 months ago

v0.10.0 will process the new JSON structure used by Tennis. Let me know if there are any issues.