Skip to content

Instantly share code, notes, and snippets.

@agners
Created May 9, 2025 12:09
Show Gist options
  • Save agners/525efb15a7358e9e9889732bac4cde2d to your computer and use it in GitHub Desktop.
Save agners/525efb15a7358e9e9889732bac4cde2d to your computer and use it in GitHub Desktop.
Fetch Home Assistant Core statistics and group reported users per major release
curl -s https://analytics.home-assistant.io/data.json | jq -r '
.current.versions
| to_entries
| map({
minor: (
.key
| sub("\\.dev.*$"; "")
| split(".")[0:2]
| map(tonumber)
),
count: .value
})
| group_by(.minor)
| sort_by(.[0].minor)
| map({
minor: (.[0].minor | join(".")),
total: (map(.count) | add)
})
| (["minor_version","total_count"] | @csv),
(.[] | [.minor, (.total | tostring)] | @csv)
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment