Hello there,
Today I would like to share with you a really small project, which I made out of curiosity.
I am spending quite some time developing a couple of HA custom integrations and was always interested in one question β do people actually use them? As you know, HA has an Analytics integration which shows data on the number of HA installations and integrations used by users. But, not for custom integrations.
Except if you will directly access the custom_integrations.json
from the analytics web page.
Since obviously, just reading the number is not as interesting (and because I like to show off), I decided to create one of the Shields.io badges. As any of you probably know, these badges are used everywhere and for anything. So, letβs create one for our custom integrations. For this, Shields does support custom endpoints. You just need to provide JSON data with 3 required fields - schemaVersion
, label
and message
.
https://img.shields.io/endpoint?url=YOUR_ENDPOINT
So, behold, one bad Python script later (because we are for HA integrations, we should use Python), there is a library of installation badges for all the custom integrations tracked by HA.
Since I like to share useful things, you are welcome to use the automatically generated badges library from my GitHub Page (updated every 6 hours). Or just generate your own library.
Examples
Anyway, here are a couple of examples:
- my integration statistics for all the versions
- all the HACS installations
- installations of latest (3.0.0) version of Frigate, no styles.
Endpoints to use
https://vaskivskyi.github.io/ha-custom-analytics/badges/INTEGRATION_NAME/total.json
https://vaskivskyi.github.io/ha-custom-analytics/badges/INTEGRATION_NAME/version-VERSION.json
Example of badge address:
https://img.shields.io/endpoint?url=https://vaskivskyi.github.io/ha-custom-analytics/badges/hacs/version-1.28.3.json
Result:
All the Shields styles are available as usual.
Keep in mind
The analytics data is available only for custom integrations, which are added to HA brands.
Obviously, the data is only valid for HA installations, which are sharing the analytics.
More features coming
Some more features might come to the custom HA analytics. As usual, I have lots of useful ideas.
Links
Repository: Vaskivskyi/ha-custom-analytics: Custom HA analytics tools and generated data (github.com)