Limited to an individual team? #51
-
It appears that the team is a required field. Is there a way to get a list of all NHL games for the day, or all NCAA Top 25 games? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
No. Sensor was designed to track an individual team and the API calls are not optimized to track all teams in an league at one time. Instead of calling the API once and using it for all teams, it will call it once for each team, and do so every 5 seconds for each game that is in progress. This isn't good for HA performance and I don't know what sort of checks ESPN has on IP addresses that are calling it's APIs, but it's easy to see how this amount of volume could trigger some sort of throttling or even banning action on their side as well as they interpret it as cyber activity. Someone actually at one point wanted to have 300 sensors, one for each college football team running at once. Yikes! I'm looking into ways to reuse the API data across multiple sensors when possible, but so far I haven't found a good way to do so. I won't enable an "easy" way to set up multiple teams until/unless I find a way to optimize the API calls. I also would advise against manually setting up too many teams pinging the API at the same time for the reasons I outlined above. My general thinking is that people who want to view all teams in a league actually want different functionality than this sensor provides and it may make sense to have a completely different integration. It would show standings when games aren't going on and then limited, less frequently-updated in-game info (score, clock) when they are. Not all the play by play details. It probably makes sense to condense the card to display the info in a more compact form. Obviously this would be a completely different sensor and card. If I am able to figure out a way to optimize the API calls, I would then need to figure out a way to return the data for multiple games w/o breaking any existing automations that people already have set up, which would eliminate the most obvious way of return arrays of values instead of a single value. TLDR: No |
Beta Was this translation helpful? Give feedback.
-
That's what I expected and aligns w/ my thinking. I think people are asking for lots of teams are looking for something similar to what you are and it probably makes sense to start from scratch using a different API than trying to force it to do something it was never intended to do. If I get ambitious, I may look into it at some point. In the meantime, here are some posts that describes a "standings" API that you might be able to get to do what you want using a REST sensor. Not sure if it works for everything or not. [https://community.home-assistant.io/t/real-time-sports-scores-w-teamtracker-and-teamtracker-card-beta/456923/22](https://community.home-assistant.io/t/real-time-sports-scores-w-teamtracker-and-teamtracker-card-beta/456923/22 |
Beta Was this translation helpful? Give feedback.
No.
Sensor was designed to track an individual team and the API calls are not optimized to track all teams in an league at one time. Instead of calling the API once and using it for all teams, it will call it once for each team, and do so every 5 seconds for each game that is in progress. This isn't good for HA performance and I don't know what sort of checks ESPN has on IP addresses that are calling it's APIs, but it's easy to see how this amount of volume could trigger some sort of throttling or even banning action on their side as well as they interpret it as cyber activity. Someone actually at one point wanted to have 300 sensors, one for each college football team running at once. Yi…