Compteur de téléchargements dans HACS

Bonjour,

Mon problème

Quand je regarde mes publications dans HACS, je vois ça :

Comme vous pouvez le constater, j’ai bien un compteur de téléchargements pour la ligne VTherm UI Card mais pas pour les autres.

Si quelqu’un sait comment ça marche, je ne trouve rien sur cette fonction.

Ma configuration


System Information

version core-2025.2.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.1
os_name Linux
os_version 6.6.73-haos
arch aarch64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 1545
Downloaded Repositories 45
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.2
update_channel stable
supervisor_version supervisor-2025.02.1
agent_version 1.6.0
docker_version 27.2.0
disk_total 28.0 GB
disk_used 22.5 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board green
supervisor_api ok
version_api ok
installed_addons Matter Server (7.0.0), Home Assistant Google Drive Backup (0.112.1), Samba share (12.4.0), InfluxDB (5.0.1), Glances (0.21.1), NGINX Home Assistant SSL proxy (3.11.1), SQLite Web (4.3.0), AppDaemon (0.16.7), Piper (1.5.2), Whisper (2.4.0), Mosquitto broker (6.5.0), Zigbee2MQTT (2.1.1-1), Studio Code Server (5.18.1), Silicon Labs Flasher (0.3.2), OpenThread Border Router (2.13.0), Tesla HTTP Proxy (2.2.8), Terminal & SSH (9.16.0), Let’s Encrypt (5.3.0)
Dashboards
dashboards 8
resources 27
views 45
mode storage
Network Configuration
adapters lo (disabled), end0 (enabled, default, auto), docker0 (disabled), hassio (disabled), veth15fca9f (disabled), veth1db2536 (disabled), veth8ab4b4e (disabled), veth9c46a0b (disabled), vethb1dcbf3 (disabled), veth6e61f9c (disabled), veth74f7ada (disabled), veth1d95703 (disabled), wpan0 (disabled), veth913c61d (disabled), vethc8d16ec (disabled), veth4a40ce1 (disabled), vetheccd087 (disabled), veth588156a (disabled), veth51d9202 (disabled), veth6576fd9 (disabled), veth2ab946b (disabled)
ipv4_addresses lo (127.0.0.1/8), end0 (192.168.1.113/24), docker0 (172.30.232.1/23), hassio (172.30.32.1/23), veth15fca9f (), veth1db2536 (), veth8ab4b4e (), veth9c46a0b (), vethb1dcbf3 (), veth6e61f9c (), veth74f7ada (), veth1d95703 (), wpan0 (), veth913c61d (), vethc8d16ec (), veth4a40ce1 (), vetheccd087 (), veth588156a (), veth51d9202 (), veth6576fd9 (), veth2ab946b ()
ipv6_addresses lo (::1/128), end0 (2a01:cb00:ddb:1800:b00e:d2da:cced:44a0/64, fdd8:7f2b:dea5:eb3b:5269:c324:c238:b5de/64, fe80::8a31:a5a1:2293:b4ae/64), docker0 (fe80::42:ffff:fe0e:ffea/64), hassio (fe80::42:30ff:fec9:624e/64), veth15fca9f (fe80::d482:1eff:fe27:6288/64), veth1db2536 (fe80::8c84:33ff:fe54:92ed/64), veth8ab4b4e (fe80::70bf:afff:fe98:8b20/64), veth9c46a0b (fe80::584e:deff:fefd:3a47/64), vethb1dcbf3 (fe80::f435:97ff:feeb:b0/64), veth6e61f9c (fe80::b4e2:ffff:fe87:8b07/64), veth74f7ada (fe80::14e9:60ff:fe69:70b/64), veth1d95703 (fe80::7c76:feff:fea3:1da2/64), wpan0 (fda6:d78c:e856:ac0:0:ff:fe00:fc11/64, fdcb:f913:457:1:2767:702e:bcc4:1db6/64, fda6:d78c:e856:ac0:0:ff:fe00:fc38/64, fda6:d78c:e856:ac0:0:ff:fe00:fc10/64, fda6:d78c:e856:ac0:0:ff:fe00:c800/64, fda6:d78c:e856:ac0:6045:77c9:cd43:b98e/64, fe80::20f2:98c4:22bc:e356/64), veth913c61d (fe80::d4:caff:fefd:a6b5/64), vethc8d16ec (fe80::9445:1cff:fe62:659a/64), veth4a40ce1 (fe80::500a:e2ff:fe41:c757/64), vetheccd087 (fe80::c44e:80ff:fe7d:2750/64), veth588156a (fe80::ecc1:72ff:fe58:5141/64), veth51d9202 (fe80::5401:e2ff:fe3c:457a/64), veth6576fd9 (fe80::9c9a:2fff:feab:7a67/64), veth2ab946b (fe80::1078:eff:fe75:b032/64)
announce_addresses 192.168.1.113, 2a01:cb00:ddb:1800:b00e:d2da:cced:44a0, fdd8:7f2b:dea5:eb3b:5269:c324:c238:b5de, fe80::8a31:a5a1:2293:b4ae
Recorder
oldest_recorder_run 8 février 2025 à 21:57
current_recorder_run 16 février 2025 à 12:37
estimated_db_size 644.94 MiB
database_engine sqlite
database_version 3.47.1
Sonoff
version 3.8.2 (c4b6fda)
cloud_online 5 / 5
local_online 5 / 5
debug failed to load:
___

Salut

ça depend de la méthode de déploiement.
Tu dois créer un fichier zip.

Modifie ton fichiers hacs.json :

Et utilise ce flow dans github pour faire une release : hass-ecoledirecte/.github/workflows/release.yaml at main · hacf-fr/hass-ecoledirecte · GitHub

2 « J'aime »

Merci pour l’info ! Je ne m’étais jamais posé la question, faudra également que je le mette en place pour mes repo du coup. :ok_hand:

Hello @Giga77,

Super ça marche merci !

Pour info, il a fallu que je créé une action guthub de release qui créé le fichier .zip.

En voici une qui marche:

name: Release

on:
  release:
    types: [published]

jobs:
  release:
    name: Prepare release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: "Set version number"
        run: |
          yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
            "${{ github.workspace }}/custom_components/versatile_thermostat/manifest.json"
      # Pack the HACS dir as a zip and upload to the release
      - name: ZIP Versatile Thermostat Dir
        run: |
          cd "${{ github.workspace }}/custom_components/versatile_thermostat"
          zip versatile_thermostat.zip -r ./
      - name: Upload zip to release
        uses: softprops/action-gh-release@v2.2.1
        with:
          files: ${{ github.workspace }}/custom_components/versatile_thermostat/versatile_thermostat.zip


Ce qui permet aussi de mettre à jour automatiquement la release dans le manifest.json, un autre point qui me chatouillait depuis longtemps.

Mon hacs.json:

{
    "name": "Versatile Thermostat",
    "content_in_root": false,
    "render_readme": true,
    "hide_default_branch": false,
    "filename": "versatile_thermostat.zip",
    "homeassistant": "2025.1.2"
}

EDIT: ta méthode pour mettre à jour la release avec jq me parait bien plus robuste que celle à base de sed. Je prends:

run: |
          yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
            "${{ github.workspace }}/custom_components/ecole_directe/manifest.json"

Un lien utile (à mettre dans un navigateur) pour checker ce que vois HACS:
https://api.github.com/repos/jmcollin78/versatile_thermostat/releases

1 « J'aime »

Le must serait de combiner ça à de la semantic release, et on aurait un workflow au top.
Merci pour le partage :+1:

Tu veux dire générer des n° de release tout seul en respectant le semver ?

Yes, ça se base sur les conventionals commits qui permet de standardiser le nommage des commits.

1 « J'aime »

Je viens d’apprendre un truc de plus. :+1:

C’est presque étonnant que personne n’ait fait un github action qui fait ça…

EDIT: bon évidemment ça existe :

GitHub Actions can be used to ensure that all commits adhere to the Conventional Commits standard, which is a lightweight convention on top of commit messages that provides an easy set of rules for creating an explicit commit history.

One such action is the webiny/action-conventional-commits
 , which ensures that all commit messages follow the Conventional Commits specification. This action can be integrated into a workflow file to validate commit messages during pull requests or other events.

Another action is ytanikin/pr-conventional-commits
 , which checks that the pull request title adheres to the Conventional Commits specification. It can also validate ticket numbers and add labels based on the task type specified in the commit messages.

Additionally, the soamee/gh-action-conventional-commits
 action is designed to automate the version bump for npm packages based on the commit messages, incrementing the version number according to the changes described in the commits.
1 « J'aime »

Si, si, j’utilise ça au boulot.
Je vais voir si je peux le transposer sur une intégration

1 « J'aime »

Perso au boulot j’utilise cette action : ietf-tools/semver-action@v1, elle marche bien :+1:

1 « J'aime »