python-wled
python-wled copied to clipboard
WLED latest version fetched on every update
Problem/Motivation
Related to: https://github.com/home-assistant/core/issues/93475 Every time the state gets updated, the update sensor in HA goes unavailable. It looks like this is caused by this library as every time this https://github.com/frenck/python-wled/blob/d2cdb35f63ebaf032c0d0dc50bbf3e30d0921598/src/wled/wled.py#L236 function is called, the version is fetched from GitHub.
Expected behavior
After the versions have been fetched, cache and re-use them (unless the full_update parameter is set to True).
Actual behavior
Version gets fetched again.
Steps to reproduce
- Use the WLED integration in HomeAssistant and toggle a the light switch
- Watch how the firmware update sensor goes to
Unkown
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Still an issue.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Still an issue.
Having the same issue
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Still an issue.
I have no idea if this is related but today GitHub has massively throttled the download speed of a release file. After turning on my VPN (so changing my IP address), the down speed jumped from 200kb/s to so fast that the 150mb file was finished before I had time to look at the speed.. so about 50mb/s I think (max possible). This was not related to my GH account since it was also that slow without being signed in. It was limited by my IP address.
Nevertheless, this issue should really get addressed to reduce the API call amount on GH servers.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Still an issue.
I have some WLED controllers coming in and was taking a look at the integration and this library. I decided to dig into this out of curiosity.
If I am reading the code correctly the call to get_wled_versions_from_github() is in fact using a cache for both the stable and beta versions. What ended up convincing you it was python-wled that was making the calls?
This will be addressed by #1334
In which, the WLED instance isn't doing any communication with GitHub anymore. Instead, I've separated the WLED & GitHub versioning checking, allowing Home Assistant to run a single, dedicated coordinator for getting update information without interfering with any WLED device communication.
Fixed in this library by #1334