Skip to content

Instantly share code, notes, and snippets.

@andrew-codechimp
Last active November 9, 2022 11:09
Show Gist options
  • Save andrew-codechimp/bd1ee24424a148789a84aae14ceae520 to your computer and use it in GitHub Desktop.
Save andrew-codechimp/bd1ee24424a148789a84aae14ceae520 to your computer and use it in GitHub Desktop.
# First get your user id by entering your full @user@domain into
# https://prouser123.me/mastodon-userid-lookup/
# Add the rest sensor into your configuration.yaml, replacing bracketed values as appropriate
sensor:
...
- platform: rest
resource: https://[YOUR MASTODON SERVER]/api/v1/accounts/[YOUR USER ID]
name: "[YOUR NAME] follower count"
value_template: '{{ value_json.followers_count }}'
state_class: total
scan_interval: 3600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment