Limych / ha-average

Average Sensor for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HACS Has faulty download url for release 2.3.1

FloSeidel opened this issue · comments

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

A download of version 2.3.1 via HACS does not seem to be possible for me. For some reason the download url is wrong. The release zip file is called average.zip. HACS tries to download https://github.com/Limych/ha-average/releases/download/tags/2.3.1/average_sensor.zip

2024-01-22 21:55:50.272 ERROR (MainThread) [custom_components.hacs] <Integration Limych/ha-average> Failed to download https://github.com/Limych/ha-average/releases/download/tags/2.3.1/average_sensor.zip
2024-01-22 21:55:50.273 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139846613747136] Error handling message: Unknown error (unknown_error) <username> from <ip> (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download
    await repository.async_install()
  File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install
    await self.async_install_repository(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 990, in async_install_repository
    raise HacsException("Could not download, see log for details")
custom_components.hacs.exceptions.HacsException: Could not download, see log for details

Describe the solution you'd like

I would like to have access to the most recent release via HACS.

Describe alternatives you've considered

An alternative would be to download the sources directly and install the version manually. In order to make sure to get the next update I would prefer installing via HACS. What did work was the download of Version 2.3.0.

Additional context

Core: 2024.1.5
Supervisor: 2023.12.1
Operating System: 11.4
Frontend: 20240104.0

I'm seeing the same issue. Looks like its caused by the following:

"filename": "average_sensor.zip",

Yet the package is being named average.zip by github actions, which uses the directory name:

- working-directory: ./custom_components
run: |
echo "package=$(ls -F | grep \/$ | sed -n "s/\///g;1p")" >> $GITHUB_ENV

and zipped using

- name: "Zip component dir"
if: env.release_version != '' && success()
working-directory: ./custom_components/${{ env.package }}
run: |
zip ${{ env.package }}.zip -r ./