JayBlackedOut / hass-nhlapi

NHL Stats API Integration Into Home Assistant
69 stars 18 forks source link

Tracker updates slow #72

Open IHavikl opened 1 week ago

IHavikl commented 1 week ago

Describe the bug The tracker seems to be delayed by 5 minutes. I have my polling set to 5 seconds but the attributes aren't updating on time

To Reproduce NHL website shows correct stats and time but the tracker through home assistant does not update in time

Expected behavior Should be updating at least every 5 seconds

Home Assistant Information

Configuration sensor:

Additional context Add any other context about the problem here.

JayBlackedOut commented 5 days ago

Hi, I don't believe the sensor itself is the cause of the issue. There are many factors including your ISP and the NHL's API itself. I have a similar set up to you and my updates happen on time. Try removing the scan_interval from your config which will change it to the default of every second. Restart Home Assistant and see if that helps. Thanks,

IHavikl commented 5 days ago

When watching the game, I checked NHL.com and the stats were up to date. The sensor has a delay in updates, not sure why. In the logs it even said something about the sensor taking a while to update. I've disabled the integration for now but will update you with the logs on the next game. I've had issues with the Tuya integration recently as well and that's been causing slow startup times for my HA, not sure if that could be somehow related.

JayBlackedOut commented 5 days ago

Any activity requires processing power so if there are too many instructions in queue, it can delay execution.

IHavikl commented 5 days ago

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1272 First occurred: 12:03:28 PM (1 occurrences) Last logged: 12:03:28 PM

Update of sensor.team_tracker is taking over 10 seconds

This is from the log, but it's weird yours is updating just fine. I guess there's some troubleshooting I need to do on my end.

nickv1091 commented 2 days ago

I have the exact log issue on mine.

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1272 First occurred: 9:30:07 PM (6 occurrences) Last logged: 9:31:38 PM

Update of sensor.capitals_game is taking over 10 seconds

ctml91 commented 2 days ago

Turn off torrents if you have any running.

IHavikl commented 2 days ago

I can guarantee it's not anything to do with my network

Turn off torrents if you have any running.