/HA-Mastodon-Profile-Stats

A Home Assistant integration to provide stats of Mastodon user profiles

Primary LanguagePythonMIT LicenseMIT

Home Assistant Mastodon Profile Stats Integration

GitHub Release GitHub Activity Downloads License hacs Community Forum

Integration to get profile stats from Mastodon instances (multiple supported).

Please ⭐ this repo if you find it useful
If you want to show your support please

"Buy Me A Coffee"

Mastodon Profile Stats

This integration will set up the following platforms.

Platform Description
sensor Show info from Mastodon profile API, polled every 60 minutes

Sensors

Sensor Description
[PROFILE NAME]_[MASTODON INSTANCE]_followers Number of followers
[PROFILE NAME]_[MASTODON INSTANCE]_following Number of following
[PROFILE NAME]_[MASTODON INSTANCE]_statuses Number of posts

Installation

HACS

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Or
Search for Mastodon Profile Stats in HACS and install it under the "Integrations" category.
Restart Home Assistant
In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Mastodon Profile Stats"

Manual Installation

Show detailed instructions

Installation via HACS is recommended, but a manual setup is supported.

  1. Manually copy custom_components/mastodon_profile_stats folder from latest release to custom_components folder in your config folder.
  2. Restart Home Assistant.
  3. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Mastodon Profile Stats"

Configuration is done in the UI

Add a profile via either @profilename@mastodoninstance or the url

Multiple profiles are supported and the stats are updated every 60 minutes

If you find this useful and want to show your support

"Buy Me A Coffee"

Translations

You can help by adding missing translations when you are a native speaker. Or add a complete new language when there is no language file available.

Mastodon Profile Stats uses Crowdin to make contributing easy.

Show detailed instructions

Changing or adding to existing language

First register and join the translation project

Next translate a string

  • Select the language you want to contribute to from the dashboard.
  • Click Translate All.
  • Find the string you want to edit, missing translation are marked red.
  • Fill in or modify the translation and click Save.
  • Repeat for other translations.

Mastodon Profile Stats will automatically pull in latest changes to translations every day and create a Pull Request. After that is reviewed by a maintainer it will be included in the next release of Battery Notes.

Adding a new language

Create an Issue requesting a new language. We will do the necessary work to add the new translation to the integration and Crowdin site, when it's ready for you to contribute we'll comment on the issue you raised.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines